Me

Operations related to the logged in user

Get my user information

get
/me

Get my user information by me (logged in user)

Authorizations
Responses
200

OK

application/json
Responseall of
and
get
/me
GET /api/me HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "_id": "63ea10b94a472e003305232b",
  "username": "[email protected]",
  "language": "en",
  "region": "us",
  "firstName": "John",
  "lastName": "Doe",
  "status": 1,
  "attributes": {
    "iamUserId": "1234567890"
  },
  "avatarUrl": "text",
  "settings": {
    "mailOnBuildCompleted": true,
    "mailOnCodePushCompleted": true
  },
  "lastLoginAt": "2020-07-23T12:00:00.000Z",
  "createdAt": "2020-07-23T12:00:00.000Z",
  "updatedAt": "2020-07-23T12:00:00.000Z",
  "organization": {
    "_id": "63ea10b94a472e003305232b",
    "name": "Akinon",
    "slug": "hello-world",
    "description": "Akinon is a software company",
    "owner": "63ea10b94a472e003305232b",
    "isExecutive": false,
    "status": 1,
    "privileges": [
      "project:read",
      "project:write"
    ],
    "imageUrl": "https://akinon.com/wp-content/uploads/akinon-logo-2.svg",
    "createdAt": "2020-07-23T12:00:00.000Z",
    "updatedAt": "2020-07-23T12:00:00.000Z"
  },
  "roles": [
    {
      "_id": "63ea10b94a472e003305232b",
      "name": "Presentation",
      "description": "Presentation role",
      "organization": {
        "_id": "63ea10b94a472e003305232b",
        "name": "Akinon",
        "slug": "hello-world",
        "description": "Akinon is a software company",
        "owner": "63ea10b94a472e003305232b",
        "isExecutive": false,
        "status": 1,
        "privileges": [
          "project:read",
          "project:write"
        ],
        "imageUrl": "https://akinon.com/wp-content/uploads/akinon-logo-2.svg",
        "createdAt": "2020-07-23T12:00:00.000Z",
        "updatedAt": "2020-07-23T12:00:00.000Z"
      },
      "privileges": [
        "project:read",
        "project:write"
      ],
      "createdAt": "2020-07-23T12:00:00.000Z",
      "updatedAt": "2020-07-23T12:00:00.000Z"
    },
    {
      "organization": "63ea10b94a472e003305232b"
    }
  ],
  "userType": "user"
}

Change my password

post
/me

Change my password by me (logged in user)

Authorizations
Body
passwordstring · min: 3 · max: 255Required

The user old password

Example: 123456
newPasswordstring · min: 3 · max: 255Required

The user new password

Example: 123456
Responses
201

Created

No content

post
/me
POST /api/me HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "password": 123456,
  "newPassword": 123456
}

No content

Update my user information

patch
/me

Update my user information by me (logged in user)

Authorizations
Body
firstNamestring · min: 5 · max: 255Optional

The user first name

Example: John
lastNamestring · min: 5 · max: 255Optional

The user last name

Example: Doe
languagestring · min: 2 · max: 2Optional

The user language

Example: en
regionstring · min: 2 · max: 2Optional

The user region

Example: US
statusinteger · enumOptional

The status

Example: 1Possible values:
avatarUrlstringOptional

The user avatar URL

Example: https://akinon.s3.amazonaws.com/.../avatar.jpg
Responses
200

OK

application/json
Responseall of
and
patch
/me
PATCH /api/me HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 211

{
  "firstName": "John",
  "lastName": "Doe",
  "language": "en",
  "region": "US",
  "status": 1,
  "avatarUrl": "https://akinon.s3.amazonaws.com/.../avatar.jpg",
  "settings": {
    "mailOnBuildCompleted": true,
    "mailOnCodePushCompleted": true
  }
}
{
  "_id": "63ea10b94a472e003305232b",
  "username": "[email protected]",
  "language": "en",
  "region": "us",
  "firstName": "John",
  "lastName": "Doe",
  "status": 1,
  "attributes": {
    "iamUserId": "1234567890"
  },
  "avatarUrl": "text",
  "settings": {
    "mailOnBuildCompleted": true,
    "mailOnCodePushCompleted": true
  },
  "lastLoginAt": "2020-07-23T12:00:00.000Z",
  "createdAt": "2020-07-23T12:00:00.000Z",
  "updatedAt": "2020-07-23T12:00:00.000Z",
  "organization": {
    "_id": "63ea10b94a472e003305232b",
    "name": "Akinon",
    "slug": "hello-world",
    "description": "Akinon is a software company",
    "owner": "63ea10b94a472e003305232b",
    "isExecutive": false,
    "status": 1,
    "privileges": [
      "project:read",
      "project:write"
    ],
    "imageUrl": "https://akinon.com/wp-content/uploads/akinon-logo-2.svg",
    "createdAt": "2020-07-23T12:00:00.000Z",
    "updatedAt": "2020-07-23T12:00:00.000Z"
  },
  "roles": [
    {
      "_id": "63ea10b94a472e003305232b",
      "name": "Presentation",
      "description": "Presentation role",
      "organization": {
        "_id": "63ea10b94a472e003305232b",
        "name": "Akinon",
        "slug": "hello-world",
        "description": "Akinon is a software company",
        "owner": "63ea10b94a472e003305232b",
        "isExecutive": false,
        "status": 1,
        "privileges": [
          "project:read",
          "project:write"
        ],
        "imageUrl": "https://akinon.com/wp-content/uploads/akinon-logo-2.svg",
        "createdAt": "2020-07-23T12:00:00.000Z",
        "updatedAt": "2020-07-23T12:00:00.000Z"
      },
      "privileges": [
        "project:read",
        "project:write"
      ],
      "createdAt": "2020-07-23T12:00:00.000Z",
      "updatedAt": "2020-07-23T12:00:00.000Z"
    },
    {
      "organization": "63ea10b94a472e003305232b"
    }
  ],
  "userType": "user"
}

Get my public keys

get
/me/public-keys

Get my public keys by me (logged in user)

Authorizations
Responses
200

OK

application/json
get
/me/public-keys
GET /api/me/public-keys HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[]

Create a public key

post
/me/public-keys

Create a public key by me (logged in user)

Authorizations
Body
labelstring · min: 3 · max: 100Required

The public key label

Example: My public key
publicKeystring · min: 1024 · max: 16384Required

The public key

Example: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQ4QXQ...
filePathstringOptional

The public key file path

Responses
201

Created

application/json
post
/me/public-keys
POST /api/me/public-keys HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "label": "My public key",
  "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQ4QXQ...",
  "filePath": "text"
}
{
  "_id": "63ea10b94a472e003305232b",
  "label": "My public key",
  "status": 1,
  "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQ4QXQ...",
  "awsPublicKeyId": "text",
  "filePath": "text",
  "createdAt": "2020-07-23T12:00:00.000Z",
  "updatedAt": "2020-07-23T12:00:00.000Z"
}

Get a public key

get
/me/public-keys/{publicKeyId}

Get a public key by me (logged in user)

Authorizations
Path parameters
publicKeyIdstringRequired

The MongoDB ID

Example: 63ea10b94a472e003305232bPattern: ^[0-9a-fA-F]{24}$
Responses
200

OK

application/json
get
/me/public-keys/{publicKeyId}
GET /api/me/public-keys/{publicKeyId} HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "_id": "63ea10b94a472e003305232b",
  "label": "My public key",
  "status": 1,
  "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQ4QXQ...",
  "awsPublicKeyId": "text",
  "filePath": "text",
  "createdAt": "2020-07-23T12:00:00.000Z",
  "updatedAt": "2020-07-23T12:00:00.000Z"
}

Delete a public key

delete
/me/public-keys/{publicKeyId}

Delete a public key by me (logged in user)

Authorizations
Path parameters
publicKeyIdstringRequired

The MongoDB ID

Example: 63ea10b94a472e003305232bPattern: ^[0-9a-fA-F]{24}$
Responses
204

No Content

No content

delete
/me/public-keys/{publicKeyId}
DELETE /api/me/public-keys/{publicKeyId} HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get user access tokens

get
/me/tokens

Get user access tokens by me (logged in user)

Authorizations
Responses
200

OK

application/json
Responseany of
get
/me/tokens
GET /api/me/tokens HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "_id": "63ea10b94a472e003305232b",
    "name": "My Token",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
    "privileges": [
      "project:read"
    ],
    "userId": "63ea10b94a472e003305232b",
    "organizationId": "63ea10b94a472e003305232b",
    "expiresOn": "2020-07-23T12:00:00.000Z",
    "createdAt": "2020-07-23T12:00:00.000Z",
    "updatedAt": "2020-07-23T12:00:00.000Z"
  }
]

Create a user access token

post
/me/tokens

Create a user access token by me (logged in user)

Authorizations
Body
namestringRequired

The access token name

Example: My Token
lifetimestring · enumRequired

The token lifetime

Possible values:
privilegesstring[]Optional

The token privileges

Example: organization:user:read
Responses
201

OK

application/json
post
/me/tokens
POST /api/me/tokens HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 81

{
  "name": "My Token",
  "lifetime": "one-week",
  "privileges": [
    "organization:user:read"
  ]
}
{
  "_id": "63ea10b94a472e003305232b",
  "name": "My Token",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
  "privileges": [
    "project:read"
  ],
  "userId": "63ea10b94a472e003305232b",
  "organizationId": "63ea10b94a472e003305232b",
  "expiresOn": "2020-07-23T12:00:00.000Z",
  "createdAt": "2020-07-23T12:00:00.000Z",
  "updatedAt": "2020-07-23T12:00:00.000Z"
}

Delete a user access token

delete
/me/tokens/{tokenId}

Delete a user access token by me (logged in user)

Authorizations
Path parameters
tokenIdstringRequired

The MongoDB ID

Example: 63ea10b94a472e003305232bPattern: ^[0-9a-fA-F]{24}$
Responses
204

No Content

No content

delete
/me/tokens/{tokenId}
DELETE /api/me/tokens/{tokenId} HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?