okta-sdk-nodejs

okta.UserTypeApi

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

Method HTTP request Description
createUserType POST /api/v1/meta/types/user Create a User Type
deleteUserType DELETE /api/v1/meta/types/user/{typeId} Delete a User Type
getUserType GET /api/v1/meta/types/user/{typeId} Retrieve a User Type
listUserTypes GET /api/v1/meta/types/user List all User Types
replaceUserType PUT /api/v1/meta/types/user/{typeId} Replace a User Type
updateUserType POST /api/v1/meta/types/user/{typeId} Update a User Type

createUserType

UserType createUserType(userType)

Creates a new User Type. A default User Type is automatically created along with your org, and you may add another 9 User Types for a maximum of 10.

Example

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

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

let body:okta.UserTypeApiCreateUserTypeRequest = {
  // UserType
  userType: {
    description: "description_example",
    displayName: "displayName_example",
    id: "id_example",
    name: "name_example",
  },
};

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

Parameters

Name Type Description Notes
userType UserType    

Return type

UserType

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]

deleteUserType

void deleteUserType()

Deletes a User Type permanently. This operation is not permitted for the default type, nor for any User Type that has existing users

Example

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

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

let body:okta.UserTypeApiDeleteUserTypeRequest = {
  // string
  typeId: "typeId_example",
};

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

Parameters

Name Type Description Notes
typeId [string]   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]

getUserType

UserType getUserType()

Fetches a User Type by ID. The special identifier default may be used to fetch the default User Type.

Example

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

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

let body:okta.UserTypeApiGetUserTypeRequest = {
  // string
  typeId: "typeId_example",
};

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

Parameters

Name Type Description Notes
typeId [string]   defaults to undefined

Return type

UserType

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listUserTypes

Array listUserTypes()

Fetches all User Types in your org

Example

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

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

let body:any = {};

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

Parameters

This endpoint does not need any parameter.

Return type

**Array**

Authorization

API_Token, OAuth_2.0

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 403 | Forbidden | - | 429 | Too Many Requests | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replaceUserType

UserType replaceUserType(userType)

Replace an existing User Type

Example

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

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

let body:okta.UserTypeApiReplaceUserTypeRequest = {
  // string
  typeId: "typeId_example",
  // UserType
  userType: {
    description: "description_example",
    displayName: "displayName_example",
    id: "id_example",
    name: "name_example",
  },
};

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

Parameters

Name Type Description Notes
userType UserType    
typeId [string]   defaults to undefined

Return type

UserType

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]

updateUserType

UserType updateUserType(userType)

Updates an existing User Type

Example

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

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

let body:okta.UserTypeApiUpdateUserTypeRequest = {
  // string
  typeId: "typeId_example",
  // UserType
  userType: {
    description: "description_example",
    displayName: "displayName_example",
    id: "id_example",
    name: "name_example",
  },
};

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

Parameters

Name Type Description Notes
userType UserType    
typeId [string]   defaults to undefined

Return type

UserType

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]