All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
activateDevice | POST /api/v1/devices/{deviceId}/lifecycle/activate | Activate a Device |
deactivateDevice | POST /api/v1/devices/{deviceId}/lifecycle/deactivate | Deactivate a Device |
deleteDevice | DELETE /api/v1/devices/{deviceId} | Delete a Device |
getDevice | GET /api/v1/devices/{deviceId} | Retrieve a Device |
listDevices | GET /api/v1/devices | List all Devices |
suspendDevice | POST /api/v1/devices/{deviceId}/lifecycle/suspend | Suspend a Device |
unsuspendDevice | POST /api/v1/devices/{deviceId}/lifecycle/unsuspend | Unsuspend a Device |
void activateDevice()
Activates a device by deviceId
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.DeviceApi(configuration);
let body:okta.DeviceApiActivateDeviceRequest = {
// string | `id` of the device
deviceId: "guo4a5u7JHHhjXrMK0g4",
};
apiInstance.activateDevice(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
deviceId | [string] | `id` of the device | 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 deactivateDevice()
Deactivates a device by deviceId
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.DeviceApi(configuration);
let body:okta.DeviceApiDeactivateDeviceRequest = {
// string | `id` of the device
deviceId: "guo4a5u7JHHhjXrMK0g4",
};
apiInstance.deactivateDevice(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
deviceId | [string] | `id` of the device | 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 deleteDevice()
Deletes a device by deviceId
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.DeviceApi(configuration);
let body:okta.DeviceApiDeleteDeviceRequest = {
// string | `id` of the device
deviceId: "guo4a5u7JHHhjXrMK0g4",
};
apiInstance.deleteDevice(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
deviceId | [string] | `id` of the device | 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]
Device getDevice()
Retrieve a device by deviceId
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.DeviceApi(configuration);
let body:okta.DeviceApiGetDeviceRequest = {
// string | `id` of the device
deviceId: "guo4a5u7JHHhjXrMK0g4",
};
apiInstance.getDevice(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
deviceId | [string] | `id` of the device | defaults to undefined |
Device
| 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]
Array
listDevices()
Lists all devices with pagination support. A subset of Devices can be returned that match a supported search criteria using the search
query parameter. Searches for devices based on the properties specified in the search
parameter conforming SCIM filter specifications (case-insensitive). This data is eventually consistent. The API returns different results depending on specified queries in the request. Empty list is returned if no objects match search
request. > Note: Listing devices with search
should not be used as a part of any critical flows—such as authentication or updates—to prevent potential data loss. search
results may not reflect the latest information, as this endpoint uses a search index which may not be up-to-date with recent updates to the object.
Don’t use search results directly for record updates, as the data might be stale and therefore overwrite newer data, resulting in data loss.
Use an id
lookup for records that you update to ensure your results contain the latest data. This operation equires URL encoding. For example, search=profile.displayName eq \"Bob\"
is encoded as search=profile.displayName%20eq%20%22Bob%22
.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.DeviceApi(configuration);
let body:okta.DeviceApiListDevicesRequest = {
// 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",
// number | A limit on the number of objects to return. (optional)
limit: 20,
// string | SCIM filter expression that filters the results. Searches include all Device `profile` properties, as well as the Device `id`, `status` and `lastUpdated` properties. (optional)
search: "status eq "ACTIVE"",
};
apiInstance.listDevices(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 |
limit | [number] | A limit on the number of objects to return. | (optional) defaults to 20 |
search | [string] | SCIM filter expression that filters the results. Searches include all Device `profile` properties, as well as the Device `id`, `status` and `lastUpdated` properties. | (optional) defaults to undefined |
**Array
| 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]
void suspendDevice()
Suspends a device by deviceId
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.DeviceApi(configuration);
let body:okta.DeviceApiSuspendDeviceRequest = {
// string | `id` of the device
deviceId: "guo4a5u7JHHhjXrMK0g4",
};
apiInstance.suspendDevice(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
deviceId | [string] | `id` of the device | 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 unsuspendDevice()
Unsuspends a device by deviceId
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.DeviceApi(configuration);
let body:okta.DeviceApiUnsuspendDeviceRequest = {
// string | `id` of the device
deviceId: "guo4a5u7JHHhjXrMK0g4",
};
apiInstance.unsuspendDevice(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
deviceId | [string] | `id` of the device | 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]