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 |
UserType CreateUserType (UserType userType)
Create a User Type
Creates a new User Type. Okta automatically creates a default
User Type for your org. You may add up to nine additional User Types. > Note: New User Types are based on the current default schema template. Modifications to this schema do not automatically propagate to previously created User Types.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateUserTypeExample
{
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 UserTypeApi(config);
var userType = new UserType(); // UserType |
try
{
// Create a User Type
UserType result = apiInstance.CreateUserType(userType);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserTypeApi.CreateUserType: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
userType | UserType |
- 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 DeleteUserType (string typeId)
Delete a User Type
Deletes a User Type permanently. > Note: You can't delete the default User Type or a User Type that is currently assigned to users.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteUserTypeExample
{
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 UserTypeApi(config);
var typeId = "typeId_example"; // string |
try
{
// Delete a User Type
apiInstance.DeleteUserType(typeId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserTypeApi.DeleteUserType: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
typeId | string |
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]
UserType GetUserType (string typeId)
Retrieve a User Type
Retrieves a User Type by ID. Use default
to fetch the default User Type.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetUserTypeExample
{
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 UserTypeApi(config);
var typeId = "typeId_example"; // string |
try
{
// Retrieve a User Type
UserType result = apiInstance.GetUserType(typeId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserTypeApi.GetUserType: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
typeId | string |
- Content-Type: Not defined
- Accept: application/json
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]
List<UserType> ListUserTypes ()
List all User Types
Lists all User Types in your org
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListUserTypesExample
{
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 UserTypeApi(config);
try
{
// List all User Types
List<UserType> result = apiInstance.ListUserTypes().ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserTypeApi.ListUserTypes: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
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]
UserType ReplaceUserType (string typeId, UserTypePutRequest userType = null)
Replace a User Type
Replaces an existing User Type. This operation is a full update. > Note: The name
of an existing User Type can't be changed, but must be part of the request body. You can only replace the displayName
and description
elements.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceUserTypeExample
{
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 UserTypeApi(config);
var typeId = "typeId_example"; // string |
var userType = new UserTypePutRequest(); // UserTypePutRequest | (optional)
try
{
// Replace a User Type
UserType result = apiInstance.ReplaceUserType(typeId, userType);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserTypeApi.ReplaceUserType: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
typeId | string | ||
userType | UserTypePutRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
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]
UserType UpdateUserType (string typeId, UserTypePostRequest userType)
Update a User Type
Updates an existing User Type. This operation is a partial update. > Note: You can only update the displayName
and description
elements. The name
of an existing User Type can't be changed.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class UpdateUserTypeExample
{
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 UserTypeApi(config);
var typeId = "typeId_example"; // string |
var userType = new UserTypePostRequest(); // UserTypePostRequest |
try
{
// Update a User Type
UserType result = apiInstance.UpdateUserType(typeId, userType);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserTypeApi.UpdateUserType: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
typeId | string | ||
userType | UserTypePostRequest |
- Content-Type: application/json
- Accept: application/json
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]