All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
CreateRole | POST /api/v1/iam/roles | Create a Role |
CreateRolePermission | POST /api/v1/iam/roles/{roleIdOrLabel}/permissions/{permissionType} | Create a Permission |
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 |
ReplaceRolePermission | PUT /api/v1/iam/roles/{roleIdOrLabel}/permissions/{permissionType} | Replace a Permission |
IamRole CreateRole (CreateIamRoleRequest instance)
Create a Role
Creates a new role
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateRoleExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var instance = new CreateIamRoleRequest(); // CreateIamRoleRequest |
try
{
// Create a Role
IamRole result = apiInstance.CreateRole(instance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.CreateRole: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
instance | CreateIamRoleRequest |
- Content-Type: application/json
- Accept: application/json
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 CreateRolePermission (string roleIdOrLabel, string permissionType, CreateUpdateIamRolePermissionRequest instance = null)
Create a Permission
Creates a permission specified by permissionType
to the role
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateRolePermissionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
var permissionType = okta.users.manage; // string | An okta permission type
var instance = new CreateUpdateIamRolePermissionRequest(); // CreateUpdateIamRolePermissionRequest | (optional)
try
{
// Create a Permission
apiInstance.CreateRolePermission(roleIdOrLabel, permissionType, instance);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.CreateRolePermission: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role | |
permissionType | string | An okta permission type | |
instance | CreateUpdateIamRolePermissionRequest | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
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]
void DeleteRole (string roleIdOrLabel)
Delete a Role
Deletes a role by roleIdOrLabel
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteRoleExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
try
{
// Delete a Role
apiInstance.DeleteRole(roleIdOrLabel);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.DeleteRole: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
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 (string roleIdOrLabel, string permissionType)
Delete a Permission
Deletes a permission from a role by permissionType
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteRolePermissionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
var permissionType = okta.users.manage; // string | An okta permission type
try
{
// Delete a Permission
apiInstance.DeleteRolePermission(roleIdOrLabel, permissionType);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.DeleteRolePermission: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role | |
permissionType | string | An okta permission type |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
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 (string roleIdOrLabel)
Retrieve a Role
Retrieves a role by roleIdOrLabel
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetRoleExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
try
{
// Retrieve a Role
IamRole result = apiInstance.GetRole(roleIdOrLabel);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.GetRole: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role |
- Content-Type: Not defined
- Accept: application/json
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 (string roleIdOrLabel, string permissionType)
Retrieve a Permission
Retrieves a permission by permissionType
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetRolePermissionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
var permissionType = okta.users.manage; // string | An okta permission type
try
{
// Retrieve a Permission
Permission result = apiInstance.GetRolePermission(roleIdOrLabel, permissionType);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.GetRolePermission: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role | |
permissionType | string | An okta permission type |
- Content-Type: Not defined
- Accept: application/json
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 (string roleIdOrLabel)
List all Permissions
Lists all permissions of the role by roleIdOrLabel
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListRolePermissionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
try
{
// List all Permissions
Permissions result = apiInstance.ListRolePermissions(roleIdOrLabel);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.ListRolePermissions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role |
- Content-Type: Not defined
- Accept: application/json
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 (string after = null)
List all Roles
Lists all roles with pagination support
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListRolesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var after = "after_example"; // 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). (optional)
try
{
// List all Roles
IamRoles result = apiInstance.ListRoles(after);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.ListRoles: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
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. | [optional] |
- Content-Type: Not defined
- Accept: application/json
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 (string roleIdOrLabel, UpdateIamRoleRequest instance)
Replace a Role
Replaces a role by roleIdOrLabel
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceRoleExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
var instance = new UpdateIamRoleRequest(); // UpdateIamRoleRequest |
try
{
// Replace a Role
IamRole result = apiInstance.ReplaceRole(roleIdOrLabel, instance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.ReplaceRole: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role | |
instance | UpdateIamRoleRequest |
- Content-Type: application/json
- Accept: application/json
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]
Permission ReplaceRolePermission (string roleIdOrLabel, string permissionType, CreateUpdateIamRolePermissionRequest instance = null)
Replace a Permission
Replaces a permission specified by permissionType
in the role
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceRolePermissionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RoleApi(config);
var roleIdOrLabel = cr0Yq6IJxGIr0ouum0g3; // string | `id` or `label` of the role
var permissionType = okta.users.manage; // string | An okta permission type
var instance = new CreateUpdateIamRolePermissionRequest(); // CreateUpdateIamRolePermissionRequest | (optional)
try
{
// Replace a Permission
Permission result = apiInstance.ReplaceRolePermission(roleIdOrLabel, permissionType, instance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RoleApi.ReplaceRolePermission: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
roleIdOrLabel | string | `id` or `label` of the role | |
permissionType | string | An okta permission type | |
instance | CreateUpdateIamRolePermissionRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
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]