okta-sdk-nodejs

okta.ResourceSetApi

All URIs are relative to https://subdomain.okta.com

Method HTTP request Description
addMembersToBinding PATCH /api/v1/iam/resource-sets/{resourceSetId}/bindings/{roleIdOrLabel}/members Add more members to a Binding
createResourceSet POST /api/v1/iam/resource-sets Create a Resource Set
createResourceSetBinding POST /api/v1/iam/resource-sets/{resourceSetId}/bindings Create a Resource Set Binding
deleteBinding DELETE /api/v1/iam/resource-sets/{resourceSetId}/bindings/{roleIdOrLabel} Delete a Binding
deleteResourceSet DELETE /api/v1/iam/resource-sets/{resourceSetId} Delete a Resource Set
getBinding GET /api/v1/iam/resource-sets/{resourceSetId}/bindings/{roleIdOrLabel} Retrieve a Binding
getResourceSet GET /api/v1/iam/resource-sets/{resourceSetId} Retrieve a Resource Set
listBindings GET /api/v1/iam/resource-sets/{resourceSetId}/bindings List all Bindings
listMembersOfBinding GET /api/v1/iam/resource-sets/{resourceSetId}/bindings/{roleIdOrLabel}/members List all members of a Binding
listResourceSets GET /api/v1/iam/resource-sets List all Resource Sets
replaceResourceSet PUT /api/v1/iam/resource-sets/{resourceSetId} Replace a Resource Set

addMembersToBinding

ResourceSetBindingResponse addMembersToBinding(instance)

Adds more members to a resource set binding

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiAddMembersToBindingRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
  // string | `id` or `label` of the role
  roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
  // ResourceSetBindingAddMembersRequest
  instance: {
    additions: [
      "additions_example",
    ],
  },
};

apiInstance.addMembersToBinding(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
instance ResourceSetBindingAddMembersRequest    
resourceSetId [string] `id` of a resource set defaults to undefined
roleIdOrLabel [string] `id` or `label` of the role defaults to undefined

Return type

ResourceSetBindingResponse

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 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]

createResourceSet

ResourceSet createResourceSet(instance)

Creates a new resource set

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiCreateResourceSetRequest = {
  // ResourceSet
  instance: {
    description: "description_example",
    label: "label_example",
  },
};

apiInstance.createResourceSet(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
instance ResourceSet    

Return type

ResourceSet

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

createResourceSetBinding

ResourceSetBindingResponse createResourceSetBinding(instance)

Creates a new resource set binding

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiCreateResourceSetBindingRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
  // ResourceSetBindingCreateRequest
  instance: {
    members: [
      "members_example",
    ],
    role: "role_example",
  },
};

apiInstance.createResourceSetBinding(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
instance ResourceSetBindingCreateRequest    
resourceSetId [string] `id` of a resource set defaults to undefined

Return type

ResourceSetBindingResponse

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 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]

deleteBinding

void deleteBinding()

Deletes a resource set binding by resourceSetId and roleIdOrLabel

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiDeleteBindingRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
  // string | `id` or `label` of the role
  roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
};

apiInstance.deleteBinding(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resourceSetId [string] `id` of a resource set defaults to undefined
roleIdOrLabel [string] `id` or `label` of the role defaults to undefined

Return type

void

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

deleteResourceSet

void deleteResourceSet()

Deletes a role by resourceSetId

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiDeleteResourceSetRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
};

apiInstance.deleteResourceSet(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resourceSetId [string] `id` of a resource set defaults to undefined

Return type

void

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

getBinding

ResourceSetBindingResponse getBinding()

Retrieves a resource set binding by resourceSetId and roleIdOrLabel

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiGetBindingRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
  // string | `id` or `label` of the role
  roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
};

apiInstance.getBinding(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resourceSetId [string] `id` of a resource set defaults to undefined
roleIdOrLabel [string] `id` or `label` of the role defaults to undefined

Return type

ResourceSetBindingResponse

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

getResourceSet

ResourceSet getResourceSet()

Retrieve a resource set by resourceSetId

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiGetResourceSetRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
};

apiInstance.getResourceSet(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resourceSetId [string] `id` of a resource set defaults to undefined

Return type

ResourceSet

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

listBindings

ResourceSetBindings listBindings()

Lists all resource set bindings with pagination support

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiListBindingsRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
  // 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.listBindings(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resourceSetId [string] `id` of a resource set defaults to undefined
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

Return type

ResourceSetBindings

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

listMembersOfBinding

ResourceSetBindingMembers listMembersOfBinding()

Lists all members of a resource set binding with pagination support

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiListMembersOfBindingRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
  // string | `id` or `label` of the role
  roleIdOrLabel: "cr0Yq6IJxGIr0ouum0g3",
  // 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.listMembersOfBinding(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resourceSetId [string] `id` of a resource set defaults to undefined
roleIdOrLabel [string] `id` or `label` of the role defaults to undefined
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

Return type

ResourceSetBindingMembers

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

listResourceSets

ResourceSets listResourceSets()

Lists all resource sets with pagination support

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiListResourceSetsRequest = {
  // 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.listResourceSets(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

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

Return type

ResourceSets

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]

replaceResourceSet

ResourceSet replaceResourceSet(instance)

Replaces a resource set by resourceSetId

Example

import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';

const configuration = okta.createConfiguration();
const apiInstance = new okta.ResourceSetApi(configuration);

let body:okta.ResourceSetApiReplaceResourceSetRequest = {
  // string | `id` of a resource set
  resourceSetId: "iamoJDFKaJxGIr0oamd9g",
  // ResourceSet
  instance: {
    description: "description_example",
    label: "label_example",
  },
};

apiInstance.replaceResourceSet(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
instance ResourceSet    
resourceSetId [string] `id` of a resource set defaults to undefined

Return type

ResourceSet

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| 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]