docs.AuthorizationServerAssocApi.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of okta-sdk-api Show documentation
Show all versions of okta-sdk-api Show documentation
The Okta Java SDK API .jar provides a Java API that your code can use to make calls to the Okta
API. This .jar is the only compile-time dependency within the Okta SDK project that your code should
depend on. Implementations of this API (implementation .jars) should be runtime dependencies only.
The newest version!
# AuthorizationServerAssocApi
All URIs are relative to *https://subdomain.okta.com*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**createAssociatedServers**](AuthorizationServerAssocApi.md#createAssociatedServers) | **POST** /api/v1/authorizationServers/{authServerId}/associatedServers | Create an associated Authorization Server |
| [**deleteAssociatedServer**](AuthorizationServerAssocApi.md#deleteAssociatedServer) | **DELETE** /api/v1/authorizationServers/{authServerId}/associatedServers/{associatedServerId} | Delete an associated Authorization Server |
| [**listAssociatedServersByTrustedType**](AuthorizationServerAssocApi.md#listAssociatedServersByTrustedType) | **GET** /api/v1/authorizationServers/{authServerId}/associatedServers | List all associated Authorization Servers |
## createAssociatedServers
> List<AuthorizationServer> createAssociatedServers(authServerId, associatedServerMediated)
Create an associated Authorization Server
Creates trusted relationships between the given authorization server and other authorization servers
### Example
```java
// Import classes:
import com.okta.sdk.resource.client.ApiClient;
import com.okta.sdk.resource.client.ApiException;
import com.okta.sdk.resource.client.Configuration;
import com.okta.sdk.resource.client.auth.*;
import com.okta.sdk.resource.client.models.*;
import com.okta.sdk.resource.api.AuthorizationServerAssocApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://subdomain.okta.com");
// Configure API key authorization: apiToken
ApiKeyAuth apiToken = (ApiKeyAuth) defaultClient.getAuthentication("apiToken");
apiToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiToken.setApiKeyPrefix("Token");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
AuthorizationServerAssocApi apiInstance = new AuthorizationServerAssocApi(defaultClient);
String authServerId = "GeGRTEr7f3yu2n7grw22"; // String | `id` of the Authorization Server
AssociatedServerMediated associatedServerMediated = new AssociatedServerMediated(); // AssociatedServerMediated |
try {
List result = apiInstance.createAssociatedServers(authServerId, associatedServerMediated);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthorizationServerAssocApi#createAssociatedServers");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **authServerId** | **String**| `id` of the Authorization Server | |
| **associatedServerMediated** | [**AssociatedServerMediated**](AssociatedServerMediated.md)| | |
### Return type
[**List<AuthorizationServer>**](AuthorizationServer.md)
### Authorization
[apiToken](../README.md#apiToken), [oauth2](../README.md#oauth2)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success | - |
| **400** | Bad Request | - |
| **403** | Forbidden | - |
| **404** | Not Found | - |
| **429** | Too Many Requests | - |
## deleteAssociatedServer
> deleteAssociatedServer(authServerId, associatedServerId)
Delete an associated Authorization Server
Deletes an associated Authorization Server
### Example
```java
// Import classes:
import com.okta.sdk.resource.client.ApiClient;
import com.okta.sdk.resource.client.ApiException;
import com.okta.sdk.resource.client.Configuration;
import com.okta.sdk.resource.client.auth.*;
import com.okta.sdk.resource.client.models.*;
import com.okta.sdk.resource.api.AuthorizationServerAssocApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://subdomain.okta.com");
// Configure API key authorization: apiToken
ApiKeyAuth apiToken = (ApiKeyAuth) defaultClient.getAuthentication("apiToken");
apiToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiToken.setApiKeyPrefix("Token");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
AuthorizationServerAssocApi apiInstance = new AuthorizationServerAssocApi(defaultClient);
String authServerId = "GeGRTEr7f3yu2n7grw22"; // String | `id` of the Authorization Server
String associatedServerId = "aus6xt9jKPmCyn6kg0g4"; // String | `id` of the associated Authorization Server
try {
apiInstance.deleteAssociatedServer(authServerId, associatedServerId);
} catch (ApiException e) {
System.err.println("Exception when calling AuthorizationServerAssocApi#deleteAssociatedServer");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **authServerId** | **String**| `id` of the Authorization Server | |
| **associatedServerId** | **String**| `id` of the associated Authorization Server | |
### Return type
null (empty response body)
### Authorization
[apiToken](../README.md#apiToken), [oauth2](../README.md#oauth2)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **204** | No Content | - |
| **403** | Forbidden | - |
| **404** | Not Found | - |
| **429** | Too Many Requests | - |
## listAssociatedServersByTrustedType
> List<AuthorizationServer> listAssociatedServersByTrustedType(authServerId, trusted, q, limit, after)
List all associated Authorization Servers
Lists all associated Authorization Servers by trusted type for the given `authServerId`
### Example
```java
// Import classes:
import com.okta.sdk.resource.client.ApiClient;
import com.okta.sdk.resource.client.ApiException;
import com.okta.sdk.resource.client.Configuration;
import com.okta.sdk.resource.client.auth.*;
import com.okta.sdk.resource.client.models.*;
import com.okta.sdk.resource.api.AuthorizationServerAssocApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://subdomain.okta.com");
// Configure API key authorization: apiToken
ApiKeyAuth apiToken = (ApiKeyAuth) defaultClient.getAuthentication("apiToken");
apiToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiToken.setApiKeyPrefix("Token");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
AuthorizationServerAssocApi apiInstance = new AuthorizationServerAssocApi(defaultClient);
String authServerId = "GeGRTEr7f3yu2n7grw22"; // String | `id` of the Authorization Server
Boolean trusted = true; // Boolean | Searches trusted authorization servers when `true` or searches untrusted authorization servers when `false`
String q = "customasone"; // String | Searches for the name or audience of the associated authorization servers
Integer limit = 200; // Integer | Specifies the number of results for a page
String after = "after_example"; // String | Specifies the pagination cursor for the next page of the associated authorization servers
try {
List result = apiInstance.listAssociatedServersByTrustedType(authServerId, trusted, q, limit, after);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthorizationServerAssocApi#listAssociatedServersByTrustedType");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **authServerId** | **String**| `id` of the Authorization Server | |
| **trusted** | **Boolean**| Searches trusted authorization servers when `true` or searches untrusted authorization servers when `false` | [optional] |
| **q** | **String**| Searches for the name or audience of the associated authorization servers | [optional] |
| **limit** | **Integer**| Specifies the number of results for a page | [optional] [default to 200] |
| **after** | **String**| Specifies the pagination cursor for the next page of the associated authorization servers | [optional] |
### Return type
[**List<AuthorizationServer>**](AuthorizationServer.md)
### Authorization
[apiToken](../README.md#apiToken), [oauth2](../README.md#oauth2)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success | - |
| **403** | Forbidden | - |
| **404** | Not Found | - |
| **429** | Too Many Requests | - |
© 2015 - 2025 Weber Informatics LLC | Privacy Policy