Roles

putRole

Create or update role

put/v1/permissions/roles/{roleId}

Path parameters

roleIdstring required

Format: <organization_id>:<slug>

Example:123:owner

Request body

OR
OR
OR
OR

Example request

{
  "grants": [
    {
      "action": "entity-read",
      "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
      "conditions": [
        {
          "attribute": "workflows.primary.task_name",
          "values": [
            "Qualification"
          ]
        }
      ],
      "dependencies": [
        {
          "action": "entity-read",
          "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
          "conditions": [
            {
              "attribute": "workflows.primary.task_name",
              "values": [
                "Qualification"
              ]
            }
          ]
        }
      ]
    }
  ],
  "id": "123:owner",
  "name": "Owner",
  "slug": "owner",
  "expires_at": "2028-07-21T17:32:28Z",
  "organization_id": "123",
  "parent_role": "123:owner"
}

Response

ok

OR
OR
OR
OR

Example response

{
  "id": "123:owner",
  "name": "Owner",
  "slug": "owner",
  "expires_at": "2028-07-21T17:32:28Z",
  "organization_id": "123",
  "grants": [
    {
      "action": "entity-read",
      "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
      "conditions": [
        {
          "attribute": "workflows.primary.task_name",
          "values": [
            "Qualification"
          ]
        }
      ]
    }
  ],
  "parent_role": "123:owner"
}

Changes

Changed in 1 of the 2 revisions of this API.1110

  • b29ea9adf72b1110See the full diff
    • added subschema #1 subschema #2 to the request body allOf list

      request-body-all-of-added

    • removed subschema #1 subschema #2 from the request body allOf list

      request-body-all-of-removed

    • added the optional property oneOf[OrgRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/anyOf[EqualsCurrentUserCondition]/attributes to the response with the 200 status

      response-optional-property-added

    • added the optional property oneOf[PartnerRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/anyOf[EqualsCurrentUserCondition]/attributes to the response with the 200 status

      response-optional-property-added

    • added the optional property oneOf[PortalRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/anyOf[EqualsCurrentUserCondition]/attributes to the response with the 200 status

      response-optional-property-added

    • added the optional property oneOf[ShareRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/anyOf[EqualsCurrentUserCondition]/attributes to the response with the 200 status

      response-optional-property-added

    • added the optional property oneOf[UserRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/anyOf[EqualsCurrentUserCondition]/attributes to the response with the 200 status

      response-optional-property-added

    • added NotEqualsCondition NotEqualsCurrentUserCondition to the oneOf[OrgRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/ response property anyOf list for the response status 200

      response-property-any-of-added

    • added NotEqualsCondition NotEqualsCurrentUserCondition to the oneOf[PartnerRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/ response property anyOf list for the response status 200

      response-property-any-of-added

    • added NotEqualsCondition NotEqualsCurrentUserCondition to the oneOf[PortalRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/ response property anyOf list for the response status 200

      response-property-any-of-added

    • added NotEqualsCondition NotEqualsCurrentUserCondition to the oneOf[ShareRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/ response property anyOf list for the response status 200

      response-property-any-of-added

    • added NotEqualsCondition NotEqualsCurrentUserCondition to the oneOf[UserRole]/allOf[BaseRole]/grants/items/conditions/items/allOf[subschema #2]/ response property anyOf list for the response status 200

      response-property-any-of-added