Skip to content

Replace a collection resource

Request

Beta
OAuth 2.0 scope:
  • okta.governance.collections.manage
Admin roles:
  • APP_ADMIN

Replaces entitlements for an Entitlement Management (EM) enabled app resource in a collection. Only supports resources with type APPLICATION that have Entitlement Management enabled.

Path
collectionIdstringrequired

Unique identifier for the collection

resourceIdstringrequired

Unique identifier for the resource

Bodyapplication/jsonrequired

The updatable attributes of a collection resource

entitlementsArray of objects(entitlements-creatable)

Collection of entitlements and associated value identifiers

PUT
/governance/api/v2/collections/{collectionId}/resources/{resourceId}
curl -i -X PUT \
  'https://subdomain.okta.com/governance/api/v2/collections/{collectionId}/resources/{resourceId}' \
  -H 'Content-Type: application/json' \
  -d '{
    "entitlements": [
      {
        "id": "esp1d9eM0jbeX6n1v0g4",
        "values": [
          {
            "id": "ent1d9fRafZpFimYB0g4"
          },
          {
            "id": "ent1d9gvE68cz2zCZ0g4"
          }
        ]
      },
      {
        "id": "esp4rg7fkom0c3AsX8g6",
        "values": [
          {
            "id": "ent4rg7fltWSgrlDT8g6"
          }
        ]
      }
    ]
  }'

Responses

Response to a successful collection resource update operation

Bodyapplication/json
resourceOrnstring, (okta-resource-orn)(collection-resource-orn)required

The ORN identifier for a collection resource (app, group, or push group).

See the supported-resources endpoint.

resourceIdstring, (okta-resource-id), <= 20 characters(collection-resource-id)

The unique resource ID for this resource (app, group, or push group). Use this identifier to reference the resource in collection-resource API calls, such as GET/PUT/DELETE /v2/collections/{collectionId}/resources/{resourceId}.

resourceConfigurationobject(collection-resource-configuration)read-only

Server-resolved configuration details for this resource within the collection

entitlementsArray of objects(entitlements-full)

Collection of entitlements with associated values

Response
Response showing an app resource with entitlements
{ "resourceOrn": "orn:okta:idp:00o11edPwGqbUrsDm0g4:apps:salesforce:0oafxqCAJWWGELFTYASJ", "resourceId": "res789067asg6asdf7g", "resourceConfiguration": { "entitlementManagementEnabled": true, "type": "APPLICATION", "counts": {} }, "entitlements": [ {}, {} ], "_links": { "resource": {}, "entitlements": {} } }