Skip to main content
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

API resource management API

Download OpenAPI (YAML)Version v1

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

NameInTypeRequiredDescription
beforequerystring

Base64 encoded cursor value for backward pagination.

afterquerystring

Base64 encoded cursor value for forward pagination.

filterquerystring

Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations.

limitqueryinteger

Maximum number of records to return.

attributesquerystring

Specifies the required attributes in the response. Only 'properties' attribute is currently supported.

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
namestringYes
identifierstringYes
descriptionstring
requiresAuthorizationboolean
scopesarray of ScopeCreationModel

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
apiResourceIdpathstringYes

ID of the API Resource.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
apiResourceIdpathstringYes

ID of the API Resource.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
apiResourceIdpathstringYes

ID of the API Resource.

Request body (required): application/json

This represents the API resource to be patched.

Schema: APIResourcePatchModel

4 properties
NameTypeRequiredDescription
namestring
descriptionstring
addedScopesarray of ScopeCreationModel
removedScopesarray of string

This field is not supported yet.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
apiResourceIdpathstringYes

ID of the API Resource.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
apiResourceIdpathstringYes

ID of the API Resource.

Request body (required): application/json

This represents the API resource to be patched.

Schema: array of ScopeCreationModel

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
apiResourceIdpathstringYes

ID of the API Resource.

scopeNamepathstringYes

Name of the Scope.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
filterquerystring

Condition to filter the retrieval of scopes by name. Supports 'sw', 'co', 'ew' and 'eq' operations.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
filterquerystring

Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations.

attributesquerystring

Specifies the required attributes in the response. Only 'apiResources' attribute is currently supported.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
collectionIdpathstringYes

ID of the API Resource Collection.

Responses

CodeDescriptionSchema
200

OK

APIResourceCollectionResponse
401

Unauthorized

403

Forbidden

500

Server Error

Error

Schemas​

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestring
messagestring
descriptionstring
traceIdstring

APIResourceListItem​

Type: object

7 properties
NameTypeRequiredDescription
idstringYes
namestringYes
identifierstringYes
typestring
requiresAuthorizationboolean
propertiesarray of Property
selfstringYes

APIResourceResponse​

Type: object

10 properties
NameTypeRequiredDescription
idstringYes
namestringYes
descriptionstring
identifierstringYes
typestring
requiresAuthorizationboolean
scopesarray of ScopeGetModel
subscribedApplicationsarray of SubscribedApplicationGetModel
propertiesarray of Property
selfstringYes

APIResourceCreationModel​

Type: object

5 properties
NameTypeRequiredDescription
namestringYes
identifierstringYes
descriptionstring
requiresAuthorizationboolean
scopesarray of ScopeCreationModel

APIResourcePatchModel​

Type: object

4 properties
NameTypeRequiredDescription
namestring
descriptionstring
addedScopesarray of ScopeCreationModel
removedScopesarray of string

This field is not supported yet.

Type: object

2 properties
NameTypeRequiredDescription
relstring
hrefstring

APIResourceListResponse​

Type: object

3 properties
NameTypeRequiredDescription
totalResultsinteger
linksarray of PaginationLinkYes
APIResourcesarray of APIResourceListItem

APIResourceMap​

Type: object

2 properties
NameTypeRequiredDescription
readarray of APIResourceCollectionItem
writearray of APIResourceCollectionItem

APIResourceCollectionListItem​

Type: object

6 properties
NameTypeRequiredDescription
idstringYes
namestringYes
displayNamestringYes
typestring
apiResourcesAPIResourceMap
selfstringYes

APIResourceCollectionListResponse​

Type: object

2 properties
NameTypeRequiredDescription
totalResultsinteger
apiResourceCollectionsarray of APIResourceCollectionListItem

APIResourceCollectionItem​

Type: object

7 properties
NameTypeRequiredDescription
idstringYes
namestringYes
descriptionstring
identifierstring
typestring
scopesarray of ScopeGetModel
selfstringYes

APIResourceCollectionResponse​

Type: object

5 properties
NameTypeRequiredDescription
idstringYes
namestringYes
displayNamestringYes
typestring
apiResourcesAPIResourceMap

ScopeGetModel​

Type: object

4 properties
NameTypeRequiredDescription
idstringYes
displayNamestringYes
namestringYes
descriptionstring

ScopeCreationModel​

Type: object

3 properties
NameTypeRequiredDescription
namestringYes
displayNamestring
descriptionstring

SubscribedApplicationGetModel​

Type: object

2 properties
NameTypeRequiredDescription
namestring
idstring

Property​

Type: object

2 properties
NameTypeRequiredDescription
namestringYes
valuestringYes

Was this page helpful?