Using the Authorization Providers REST API

Example POST an authorization provider

This operation will create a new authorization provider with the URL of the Identity Cloud Service instance, the client ID, secret and scope of the Client Application previously created, and give it a name (preferably similar or identical to the name given to the client application it targets).

The POST request URL looks like:

/opa-hub/api/12.2.27/authorization-providers

An example response to this request would be:

{
    "name": "Staff deployments application",
    "url": "https://my.idscs.site.com",
    "scope": "staff_deployments_scope",
    "clientId": "3db440b85235423ea6bb592899a9ed70",
    "clientSecret": "99e11e80-8002-4b7e-b873-44098dabdc45"
}

Example GET an authorization provider

This operation will retrieve the object created above and will show all the same property values.

The GET request URL looks like:

/opa-hub/api/12.2.27/authorization-providers/Staff%20deployments%20application

An example response to this request would be:

{
    "name": "Staff deployments application",
    "url": "https://my.idscs.site.com",
    "scope": "staff_deployments_scope",
    "clientId": "3db440b85235423ea6bb592899a9ed70",
    "clientSecret": "99e11e80-8002-4b7e-b873-44098dabdc45",
    "links": [ ... ]
}

Example PATCH an authorization provider

This operation will update the name, scope and clientSecret values for an authorization provider. Note that the url and clientId values cannot be modified.

The PATCH request URL looks like:

/opa-hub/api/12.2.27/authorization-providers/Staff%20deployments%20application

An example of patching the previously created authorization provider would look like:

{
    "name": "Management staff application",
    "scope": "management_interviews_scope",
    "clientSecret": "dd3e04c7-0994-463f-8e7e-f5793f36478d"
}

Example DELETE an authorization provider

This operation will delete an authorization provider, but only on the condition that it has not been assigned to any workspaces. If it has, those workspaces will need to be edited first (see the REST API for Workspaces) to either remove the authorization provider first (not recommended) or change the authorization provider securing the workspace to a different one.

The DELETE request URL looks like:

/opa-hub/api/12.2.27/authorization-providers/Management%20staff%20application