Skip to main content

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

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance
applicationIdpathstringrequiredThe ID of the application

Request body

ParameterTypeRequired / OptionalDescription
profileBooleanOptionalTrue if the profile scope for openid is assigned to the application.
emailBooleanOptionalTrue if the email scope for openid is assigned to the application.
addressBooleanOptionalTrue if the address scope for openid is assigned to the application.
phoneBooleanOptionalTrue if the phone scope for openid is assigned to the application.
openidBooleanOptionalTrue if the openid scope is assigned to the application.
offlineAccessBooleanOptionalTrue if offlineAccess scope is assigned to the application.
customScopesarray of custom scopesOptionalThe 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.