All URIs are relative to https://your-api-subdomain.onelogin.com
Method | HTTP request | Description |
---|---|---|
createScope | POST /api/2/api_authorizations/{api_auth_id}/scopes | Create Api Auth Server Scope |
deleteScope | DELETE /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Delete Api Auth Server Scope |
getScopes | GET /api/2/api_authorizations/{api_auth_id}/scopes | Get Api Auth Server Scopes |
updateScope | PUT /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Update Api Auth Server Scope |
AuthScope createScope(apiAuthId, contentType, authScope)
Create Api Auth Server Scope
Create API Auth Server Scope
// Import classes:
import com.onelogin.client.ApiClient;
import com.onelogin.client.ApiException;
import com.onelogin.client.Configuration;
import com.onelogin.client.auth.*;
import com.onelogin.client.models.*;
import com.onelogin.client.api.ApiAuthScopesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-api-subdomain.onelogin.com");
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
ApiAuthScopesApi apiInstance = new ApiAuthScopesApi(defaultClient);
String apiAuthId = "apiAuthId_example"; // String |
String contentType = "application/json"; // String |
AuthScope authScope = new AuthScope(); // AuthScope |
try {
AuthScope result = apiInstance.createScope(apiAuthId, contentType, authScope);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApiAuthScopesApi#createScope");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiAuthId | String | ||
contentType | String | [optional] [default to application/json] | |
authScope | AuthScope | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized | - |
404 | Not Found | - |
422 | Unprocessable Entity | - |
deleteScope(apiAuthId, scopeId, contentType)
Delete Api Auth Server Scope
Delete Scope
// Import classes:
import com.onelogin.client.ApiClient;
import com.onelogin.client.ApiException;
import com.onelogin.client.Configuration;
import com.onelogin.client.auth.*;
import com.onelogin.client.models.*;
import com.onelogin.client.api.ApiAuthScopesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-api-subdomain.onelogin.com");
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
ApiAuthScopesApi apiInstance = new ApiAuthScopesApi(defaultClient);
String apiAuthId = "apiAuthId_example"; // String |
Integer scopeId = 56; // Integer |
String contentType = "application/json"; // String |
try {
apiInstance.deleteScope(apiAuthId, scopeId, contentType);
} catch (ApiException e) {
System.err.println("Exception when calling ApiAuthScopesApi#deleteScope");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiAuthId | String | ||
scopeId | Integer | ||
contentType | String | [optional] [default to application/json] |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Success. The scope is deleted. No content is returned. | - |
401 | Unauthorized | - |
404 | Not Found | - |
List<AuthScope> getScopes(apiAuthId, contentType)
Get Api Auth Server Scopes
List Authorization Scopes
// Import classes:
import com.onelogin.client.ApiClient;
import com.onelogin.client.ApiException;
import com.onelogin.client.Configuration;
import com.onelogin.client.auth.*;
import com.onelogin.client.models.*;
import com.onelogin.client.api.ApiAuthScopesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-api-subdomain.onelogin.com");
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
ApiAuthScopesApi apiInstance = new ApiAuthScopesApi(defaultClient);
String apiAuthId = "apiAuthId_example"; // String |
String contentType = "application/json"; // String |
try {
List<AuthScope> result = apiInstance.getScopes(apiAuthId, contentType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApiAuthScopesApi#getScopes");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiAuthId | String | ||
contentType | String | [optional] [default to application/json] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized | - |
AuthId updateScope(apiAuthId, scopeId, contentType, authScope)
Update Api Auth Server Scope
Update Scope
// Import classes:
import com.onelogin.client.ApiClient;
import com.onelogin.client.ApiException;
import com.onelogin.client.Configuration;
import com.onelogin.client.auth.*;
import com.onelogin.client.models.*;
import com.onelogin.client.api.ApiAuthScopesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-api-subdomain.onelogin.com");
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
ApiAuthScopesApi apiInstance = new ApiAuthScopesApi(defaultClient);
String apiAuthId = "apiAuthId_example"; // String |
Integer scopeId = 56; // Integer |
String contentType = "application/json"; // String |
AuthScope authScope = new AuthScope(); // AuthScope |
try {
AuthId result = apiInstance.updateScope(apiAuthId, scopeId, contentType, authScope);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApiAuthScopesApi#updateScope");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiAuthId | String | ||
scopeId | Integer | ||
contentType | String | [optional] [default to application/json] | |
authScope | AuthScope | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized | - |
404 | Not Found | - |
422 | Unprocessable Entity | - |