resource_controls

Update a resource control

Update a resource control Access policy: authenticated

put/resource_controls/{id}

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/resource_controls/{id}
  • Auth
    • API key in header X-API-KEY
    • or API key in header Authorization

Path parameters

idinteger required

Resource control identifier

Request body

AdministratorsOnlyboolean

Permit access to resource only to admins

Publicboolean

Permit access to the associated resource to any user

Teamsinteger[]

List of team identifiers with access to the associated resource

Usersinteger[]

List of user identifiers with access to the associated resource

Example request

{
  "AdministratorsOnly": true,
  "Public": true,
  "Teams": [
    7
  ],
  "Users": [
    4
  ]
}

Response

Success

AccessLevel0 | 1
AdministratorsOnlyboolean

Permit access to resource only to admins

Idinteger

ResourceControl Identifier

OwnerIdinteger

Deprecated fields Deprecated in DBVersion == 2

Publicboolean

Permit access to the associated resource to any user

ResourceIdstring

Docker resource identifier on which access control will be applied.
In the case of a resource control applied to a stack, use the stack name as identifier

SubResourceIdsstring[]

List of Docker resources that will inherit this access control

Systemboolean
Type0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Example response

{
  "AdministratorsOnly": true,
  "Id": 1,
  "Public": true,
  "ResourceId": "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08",
  "SubResourceIds": [
    "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08"
  ]
}

Changes

No recorded changes to this operation across all 21 revisions of this API.