diff --git a/package.json b/package.json index 934e563c..72b18c36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@al/core", - "version": "1.0.9", + "version": "1.0.10", "description": "Nepal Core", "main": "./dist/index.cjs.js", "types": "./dist/index.d.ts", diff --git a/src/aims-client/aims-client.ts b/src/aims-client/aims-client.ts index 2a8ae694..9767fe11 100644 --- a/src/aims-client/aims-client.ts +++ b/src/aims-client/aims-client.ts @@ -371,6 +371,21 @@ export class AIMSClientInstance { return role as AIMSRole; } + /** + * Get assigned roles + * GET + * /aims/v1/:account_id/users/:user_id/roles + * "https://api.cloudinsight.alertlogic.com/aims/v1/12345678/users/715A4EC0-9833-4D6E-9C03-A537E3F98D23/roles" + */ + async getAssignedRoles( accountId:string, userId:string ):Promise { + const roles = await this.client.get({ + service_name: this.serviceName, + account_id: accountId, + path: `/users/${userId}/roles` + }); + return roles.roles; + } + /** * List global roles, roles that are shared among all accounts. * GET