API resource management API
Base URL: https://api.asgardeo.io/t/<ORGANIZATION_NAME>/api/server/v1
The WSO2 Identity Platform - API Resource Management Rest API (version v1).
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
authorizationCode flow, token URL http://api.asgardeo.io/t/{organization-name}/oauth2/token, authorization URL https://api.asgardeo.io/t/{organization-name}/oauth2/authorize
API Resources
List all API resources in the server
GET /api-resources
List all API resources in the server
Scope(Permission) required: internal_api_resource_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
before | query | string | Base64 encoded cursor value for backward pagination. | |
after | query | string | Base64 encoded cursor value for forward pagination. | |
filter | query | string | Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations. | |
limit | query | integer | Maximum number of records to return. | |
attributes | query | string | Specifies the required attributes in the response. Only 'properties' attribute is currently supported. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIResourceListResponse |
401 | Unauthorized | |
403 | Forbidden | |
500 | Server Error | Error |
Add a new API resource
POST /api-resources
Add a new API resource
Scope(Permission) required: internal_api_resource_create
Request body (required): application/json
This represents the API resource to be created.
Schema: APIResourceCreationModel
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
identifier | string | Yes | |
description | string | ||
requiresAuthorization | boolean | ||
scopes | array of ScopeCreationModel |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIResourceResponse |
400 | Bad Request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found | Error |
409 | Conflict | Error |
500 | Server Error | Error |
Get API resource specified by the id
GET /api-resources/{apiResourceId}
Get API resource specified by the id
Scope(Permission) required: internal_api_resource_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
apiResourceId | path | string | Yes | ID of the API Resource. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIResourceResponse |
401 | Unauthorized | |
403 | Forbidden | |
500 | Server Error | Error |
Delete API resource specified by the id
DEL /api-resources/{apiResourceId}
Delete API resource specified by the id
Scope(Permission) required: internal_api_resource_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
apiResourceId | path | string | Yes | ID of the API Resource. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
500 | Server Error | Error |
Patch API resource specified by the id
PATCH /api-resources/{apiResourceId}
Patch API resource specified by the id. Patch operation only supports "name", "description" updating and "addedScopes" fields at the moment. "removedScopes" field is not yet supported.
Scope(Permission) required: internal_api_resource_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
apiResourceId | path | string | Yes | ID of the API Resource. |
Request body (required): application/json
This represents the API resource to be patched.
Schema: APIResourcePatchModel
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ||
description | string | ||
addedScopes | array of ScopeCreationModel | ||
removedScopes | array of string | This field is not supported yet. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Not Content | |
400 | Bad Request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found | Error |
409 | Conflict | Error |
500 | Server Error | Error |
501 | Not Implemented | Error |
API Resource Scopes
Get API resource scopes
GET /api-resources/{apiResourceId}/scopes
Get API resource scopes specified by the id
Scope(Permission) required: internal_api_resource_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
apiResourceId | path | string | Yes | ID of the API Resource. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | array of ScopeGetModel |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
Add scopes to API resource
PUT /api-resources/{apiResourceId}/scopes
Put scopes API resource specified by the id
Scope(Permission) required: internal_api_resource_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
apiResourceId | path | string | Yes | ID of the API Resource. |
Request body (required): application/json
This represents the API resource to be patched.
Schema: array of ScopeCreationModel
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | |
400 | Bad Request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found | Error |
409 | Conflict | Error |
500 | Server Error | Error |
Delete API scope specified by the name
DEL /api-resources/{apiResourceId}/scopes/{scopeName}
Delete API scope specified by the name
Scope(Permission) required: internal_api_resource_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
apiResourceId | path | string | Yes | ID of the API Resource. |
scopeName | path | string | Yes | Name of the Scope. |
Responses
| Code | Description | Schema |
|---|---|---|
401 | Unauthorized | |
403 | Forbidden | |
500 | Server Error | Error |
Get all scopes in the tenant
GET /scopes
Get all scopes in the tenant
Scope(Permission) required: internal_api_resource_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | Condition to filter the retrieval of scopes by name. Supports 'sw', 'co', 'ew' and 'eq' operations. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | array of ScopeGetModel |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
API Resource Collections
List all API resource collections in the server
GET /meta/api-resource-collections
List all API resource collections in the server
Scope(Permission) required: internal_api_resource_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations. | |
attributes | query | string | Specifies the required attributes in the response. Only 'apiResources' attribute is currently supported. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIResourceCollectionListResponse |
401 | Unauthorized | |
403 | Forbidden | |
500 | Server Error | Error |
Get API resource collection specified by the id
GET /meta/api-resource-collections/{collectionId}
Get API resource collection specified by the id
Scope(Permission) required: internal_api_resource_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
collectionId | path | string | Yes | ID of the API Resource Collection. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIResourceCollectionResponse |
401 | Unauthorized | |
403 | Forbidden | |
500 | Server Error | Error |
Schemas
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | ||
message | string | ||
description | string | ||
traceId | string |
APIResourceListItem
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
identifier | string | Yes | |
type | string | ||
requiresAuthorization | boolean | ||
properties | array of Property | ||
self | string | Yes |
APIResourceResponse
Type: object
10 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
description | string | ||
identifier | string | Yes | |
type | string | ||
requiresAuthorization | boolean | ||
scopes | array of ScopeGetModel | ||
subscribedApplications | array of SubscribedApplicationGetModel | ||
properties | array of Property | ||
self | string | Yes |
APIResourceCreationModel
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
identifier | string | Yes | |
description | string | ||
requiresAuthorization | boolean | ||
scopes | array of ScopeCreationModel |
APIResourcePatchModel
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ||
description | string | ||
addedScopes | array of ScopeCreationModel | ||
removedScopes | array of string | This field is not supported yet. |
APIResourceListResponse
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | ||
links | array of PaginationLink | Yes | |
APIResources | array of APIResourceListItem |
APIResourceMap
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
read | array of APIResourceCollectionItem | ||
write | array of APIResourceCollectionItem |
APIResourceCollectionListItem
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
displayName | string | Yes | |
type | string | ||
apiResources | APIResourceMap | ||
self | string | Yes |
APIResourceCollectionListResponse
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | ||
apiResourceCollections | array of APIResourceCollectionListItem |
APIResourceCollectionItem
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
description | string | ||
identifier | string | ||
type | string | ||
scopes | array of ScopeGetModel | ||
self | string | Yes |
APIResourceCollectionResponse
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
displayName | string | Yes | |
type | string | ||
apiResources | APIResourceMap |
ScopeGetModel
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
displayName | string | Yes | |
name | string | Yes | |
description | string |
ScopeCreationModel
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
displayName | string | ||
description | string |
Was this page helpful?