Overwrite an Existing Access Control List with a New Access Control List

URL

https://{{HOST}}/subscriptiontopic/{{topic_id}}/permissions/

Method

PUT

Required IMS Scopes

  • subscription_write
  • apollo_write

URL Path Parameters

Name Description Example Type
topic_id
required
Id of the topic to modify permission for d8178fd0-35ed-499e-89ad-d5b13f0d4427 string

Request Header Parameters

Type Value Description
Authorization
required
Bearer {access_token} IMS access token
Content-Type
required
application/json Content Type

Request Body Params

Name Description Schema
id For the topic object string
accesscontrolitems Current list of access permissions for topic object definition

Example

Request

curl -X PUT 
  'https://{{HOST}}/subscriptiontopic/{{topicId}}/permissions' 
  -H 'Cache-Control: no-cache' 
  -H 'Content-Type: application/json' 
  -d '
    {
        "id": "{{topicId}}",
        "accesscontrolitems": {
        "sub:user:apollo.testuser1": "owner",
         "sub:user:{{userId}}": "readwrite"
        }
    }
'
{
    "id": "TestTopicId",
    "accesscontrolitems": {
        "sub:user:bob": "owner",
        "org:jci.com": "readwrite",
        "group:lesserOrg:adminGroup": "admin"
    }
}

Response

{
    "id": "TestTopicId",
    "accesscontrolitems": {
        "sub:user:bob": "owner",
        "org:jci.com": "readwrite",
        "group:lesserOrg:adminGroup": "admin",
        "principal": "permission"
    }
}

Errors

Error Description
401 Unauthorized
400 Update will leave ACL in invalid state
403 Forbiden. Possible causes:
You do not have access to this endpoint (scope)
You do not have access to this topic)
504 Timeout while attempting to write topic to storage repository

Response Body Parameters

Name Description Schema
id Id of the topic object string
accesscontrolitems Current list of access permissions for topic object definition