All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
addRolePermission | POST /api/v1/iam/roles/{roleIdOrLabel}/permissions/{permissionType} | Create a Permission |
createRole | POST /api/v1/iam/roles | Create a Role |
deleteRole | DELETE /api/v1/iam/roles/{roleIdOrLabel} | Delete a Role |
deleteRolePermission | DELETE /api/v1/iam/roles/{roleIdOrLabel}/permissions/{permissionType} | Delete a Permission |
getRole | GET /api/v1/iam/roles/{roleIdOrLabel} | Retrieve a Role |
getRolePermission | GET /api/v1/iam/roles/{roleIdOrLabel}/permissions/{permissionType} | Retrieve a Permission |
listRolePermissions | GET /api/v1/iam/roles/{roleIdOrLabel}/permissions | List all Permissions |
listRoles | GET /api/v1/iam/roles | List all Roles |
replaceRole | PUT /api/v1/iam/roles/{roleIdOrLabel} | Replace a Role |
void addRolePermission()
Adds a permission specified by permissionType
to the role
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiAddRolePermissionRequest = {
// string | `id` or `label` of the role
roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
// string | An okta permission type
permissionType: "okta.users.manage",
};
apiInstance.addRolePermission(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | [string] | `id` or `label` of the role | defaults to undefined |
permissionType | [string] | An okta permission type | defaults to undefined |
void
| Status code | Description | Response headers | |————-|————-|——————| 204 | No Content | - | 400 | Bad Request | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamRole createRole(instance)
Creates a new role
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiCreateRoleRequest = {
// IamRole
instance: {
description: "description_example",
label: "label_example",
permissions: [
"okta.apps.assignment.manage",
],
},
};
apiInstance.createRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
instance | IamRole |
IamRole
| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 400 | Bad Request | - | 403 | Forbidden | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void deleteRole()
Deletes a role by roleIdOrLabel
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiDeleteRoleRequest = {
// string | `id` or `label` of the role
roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
};
apiInstance.deleteRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | [string] | `id` or `label` of the role | defaults to undefined |
void
| Status code | Description | Response headers | |————-|————-|——————| 204 | No Content | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void deleteRolePermission()
Deletes a permission from a role by permissionType
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiDeleteRolePermissionRequest = {
// string | `id` or `label` of the role
roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
// string | An okta permission type
permissionType: "okta.users.manage",
};
apiInstance.deleteRolePermission(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | [string] | `id` or `label` of the role | defaults to undefined |
permissionType | [string] | An okta permission type | defaults to undefined |
void
| Status code | Description | Response headers | |————-|————-|——————| 204 | No Content | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamRole getRole()
Retrieve a role by roleIdOrLabel
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiGetRoleRequest = {
// string | `id` or `label` of the role
roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
};
apiInstance.getRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | [string] | `id` or `label` of the role | defaults to undefined |
IamRole
| Status code | Description | Response headers | |————-|————-|——————| 200 | OK | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Permission getRolePermission()
Retrieves a permission by permissionType
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiGetRolePermissionRequest = {
// string | `id` or `label` of the role
roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
// string | An okta permission type
permissionType: "okta.users.manage",
};
apiInstance.getRolePermission(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | [string] | `id` or `label` of the role | defaults to undefined |
permissionType | [string] | An okta permission type | defaults to undefined |
Permission
| Status code | Description | Response headers | |————-|————-|——————| 200 | OK | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Permissions listRolePermissions()
Lists all permissions of the role by roleIdOrLabel
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiListRolePermissionsRequest = {
// string | `id` or `label` of the role
roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
};
apiInstance.listRolePermissions(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | [string] | `id` or `label` of the role | defaults to undefined |
Permissions
| Status code | Description | Response headers | |————-|————-|——————| 200 | OK | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamRoles listRoles()
Lists all roles with pagination support
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiListRolesRequest = {
// string | The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](/#pagination) for more information. (optional)
after: "after_example",
};
apiInstance.listRoles(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
after | [string] | The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See Pagination for more information. | (optional) defaults to undefined |
IamRoles
| Status code | Description | Response headers | |————-|————-|——————| 200 | OK | - | 403 | Forbidden | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamRole replaceRole(instance)
Replaces a role by roleIdOrLabel
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.RoleApi(configuration);
let body:okta.RoleApiReplaceRoleRequest = {
// string | `id` or `label` of the role
roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
// IamRole
instance: {
description: "description_example",
label: "label_example",
permissions: [
"okta.apps.assignment.manage",
],
},
};
apiInstance.replaceRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
instance | IamRole | ||
roleIdOrLabel | [string] | `id` or `label` of the role | defaults to undefined |
IamRole
| Status code | Description | Response headers | |————-|————-|——————| 200 | OK | - | 400 | Bad Request | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]