Update application scopes
The endpoint provides functionality to assign/remove scopes to/from an OAuth 2.0 / OIDC application.
HTTP request
PATCH https://$instanceId.id.nevis.cloud/nevis/api/v1/applications/$applicationId/scopes
Parameters
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
applicationId | path | string | required | The ID of the application |
Request body
Parameter | Type | Required / Optional | Description |
---|---|---|---|
profile | Boolean | Optional | True if the profile scope for openid is assigned to the application. |
email | Boolean | Optional | True if the email scope for openid is assigned to the application. |
address | Boolean | Optional | True if the address scope for openid is assigned to the application. |
phone | Boolean | Optional | True if the phone scope for openid is assigned to the application. |
openid | Boolean | Optional | True if the openid scope is assigned to the application. |
offlineAccess | Boolean | Optional | True if offlineAccess scope is assigned to the application. |
customScopes | array of custom scopes | Optional | The collection of custom scopes. |
Example request
Set the ID of the application
applicationId=your-application-id-123
curl --request GET "https://$instanceId.id.nevis.cloud/nevis/api/v1/applications/$applicationId/scopes" \
--header "Authorization: Bearer $accessKey" \
--header "Content-Type: application/json" \
--data "{ \"email\" : \"true\", \"address\" : \"true\", \"customScopes\" : [ { \"scopeId\" : \"ecb557b9de1631201d66bccb\", \"assigned\" : \"true\" }, { \"scopeId\" : \"7a89b5db9b10bb3667b22181\", \"assigned\" : \"false\" } ] }"
HTTP response
On success
HTTP/1.1 200
is returned if the application with scopes is successfully modified.
The response contains which scopes are assigned to the OAuth 2.0 / OIDC application.
Example response
{
"offlineAccess": true,
"address": true,
"phone": true,
"openid": true,
"profile": true,
"email": true
"customScopes": [
{
"scopeId": "ecb557b9de1631201d66bccb",
"name": "read",
"assigned": true
},
{
"scopeId": "7a89b5db9b10bb3667b22181",
"name": "write",
"assigned": false
}
]
}
On failure
HTTP/1.1 401
is returned if the authorization failed due to an invalid access key.
HTTP/1.1 404
is returned if the OAuth 2.0 / OIDC application with given id is not found.
HTTP/1.1 422
is returned if invalid request content is given.
HTTP/1.1 500
is returned if an unexpected error occurred.