All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
activatePolicy | POST /api/v1/policies/{policyId}/lifecycle/activate | Activate a Policy |
activatePolicyRule | POST /api/v1/policies/{policyId}/rules/{ruleId}/lifecycle/activate | Activate a Policy Rule |
clonePolicy | POST /api/v1/policies/{policyId}/clone | Clone an existing policy |
createPolicy | POST /api/v1/policies | Create a Policy |
createPolicyRule | POST /api/v1/policies/{policyId}/rules | Create a Policy Rule |
deactivatePolicy | POST /api/v1/policies/{policyId}/lifecycle/deactivate | Deactivate a Policy |
deactivatePolicyRule | POST /api/v1/policies/{policyId}/rules/{ruleId}/lifecycle/deactivate | Deactivate a Policy Rule |
deletePolicy | DELETE /api/v1/policies/{policyId} | Delete a Policy |
deletePolicyRule | DELETE /api/v1/policies/{policyId}/rules/{ruleId} | Delete a Policy Rule |
getPolicy | GET /api/v1/policies/{policyId} | Retrieve a Policy |
getPolicyRule | GET /api/v1/policies/{policyId}/rules/{ruleId} | Retrieve a Policy Rule |
listPolicies | GET /api/v1/policies | List all Policies |
listPolicyRules | GET /api/v1/policies/{policyId}/rules | List all Policy Rules |
updatePolicy | PUT /api/v1/policies/{policyId} | Replace a Policy |
updatePolicyRule | PUT /api/v1/policies/{policyId}/rules/{ruleId} | Replace a Policy Rule |
void activatePolicy()
Activates a policy.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiActivatePolicyRequest = {
// string
policyId: "policyId_example",
};
apiInstance.activatePolicy(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | 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 activatePolicyRule()
Activates a policy rule.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiActivatePolicyRuleRequest = {
// string
policyId: "policyId_example",
// string
ruleId: "ruleId_example",
};
apiInstance.activatePolicyRule(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | defaults to undefined | |
ruleId | [string] | 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]
Policy clonePolicy()
Clones an existing policy.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiClonePolicyRequest = {
// string
policyId: "policyId_example",
};
apiInstance.clonePolicy(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | defaults to undefined |
Policy
| 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]
Policy createPolicy(policy)
Creates a policy.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiCreatePolicyRequest = {
// Policy
policy: {},
// boolean (optional)
activate: true,
};
apiInstance.createPolicy(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policy | Policy | ||
activate | [boolean] | (optional) defaults to undefined |
Policy
| 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]
PolicyRule createPolicyRule(policyRule)
Creates a policy rule.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiCreatePolicyRuleRequest = {
// string
policyId: "policyId_example",
// PolicyRule
policyRule: {},
};
apiInstance.createPolicyRule(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyRule | PolicyRule | ||
policyId | [string] | defaults to undefined |
PolicyRule
| 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]
void deactivatePolicy()
Deactivates a policy.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiDeactivatePolicyRequest = {
// string
policyId: "policyId_example",
};
apiInstance.deactivatePolicy(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | 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 deactivatePolicyRule()
Deactivates a policy rule.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiDeactivatePolicyRuleRequest = {
// string
policyId: "policyId_example",
// string
ruleId: "ruleId_example",
};
apiInstance.deactivatePolicyRule(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | defaults to undefined | |
ruleId | [string] | 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 deletePolicy()
Removes a policy.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiDeletePolicyRequest = {
// string
policyId: "policyId_example",
};
apiInstance.deletePolicy(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | 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 deletePolicyRule()
Removes a policy rule.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiDeletePolicyRuleRequest = {
// string
policyId: "policyId_example",
// string
ruleId: "ruleId_example",
};
apiInstance.deletePolicyRule(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | defaults to undefined | |
ruleId | [string] | 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]
Policy getPolicy()
Gets a policy.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiGetPolicyRequest = {
// string
policyId: "policyId_example",
// string (optional)
expand: "",
};
apiInstance.getPolicy(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | defaults to undefined | |
expand | [string] | (optional) defaults to ‘’ |
Policy
| 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]
PolicyRule getPolicyRule()
Gets a policy rule.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiGetPolicyRuleRequest = {
// string
policyId: "policyId_example",
// string
ruleId: "ruleId_example",
};
apiInstance.getPolicyRule(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | defaults to undefined | |
ruleId | [string] | defaults to undefined |
PolicyRule
| 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]
Array
listPolicies()
Gets all policies with the specified type.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiListPoliciesRequest = {
// string
type: "type_example",
// string (optional)
status: "status_example",
// string (optional)
expand: "",
};
apiInstance.listPolicies(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
type | [string] | defaults to undefined | |
status | [string] | (optional) defaults to undefined | |
expand | [string] | (optional) defaults to ‘’ |
**Array
| 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]
Array
listPolicyRules()
Enumerates all policy rules.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiListPolicyRulesRequest = {
// string
policyId: "policyId_example",
};
apiInstance.listPolicyRules(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyId | [string] | defaults to undefined |
**Array
| 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]
Policy updatePolicy(policy)
Updates a policy.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiUpdatePolicyRequest = {
// string
policyId: "policyId_example",
// Policy
policy: {},
};
apiInstance.updatePolicy(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policy | Policy | ||
policyId | [string] | defaults to undefined |
Policy
| 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]
PolicyRule updatePolicyRule(policyRule)
Updates a policy rule.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.PolicyApi(configuration);
let body:okta.PolicyApiUpdatePolicyRuleRequest = {
// string
policyId: "policyId_example",
// string
ruleId: "ruleId_example",
// PolicyRule
policyRule: {},
};
apiInstance.updatePolicyRule(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
policyRule | PolicyRule | ||
policyId | [string] | defaults to undefined | |
ruleId | [string] | defaults to undefined |
PolicyRule
| 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]