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

URL

https://{{HOST}}/subscriptiontype/{{type_id}}/permissions/

Method

PUT

Required IMS Scopes

  • subscription_write
  • apollo_write

URL Path Parameters

Name Description Example Type
type_id
required
Id of the type 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 type object string
accesscontrolitems Current list of access permissions for type object definition

Example

Request

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

Response

{
    "id": "TestTypeId",
    "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 type)
504 Timeout while attempting to write type to storage repository

Response Body Parameters

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