The /tenant resource supports two custom OPTIONS requests, one for the resource as such and one for individual tenant instances. The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the /tenant resource. If the user can perform an operation or not may depend on various things, including the users authorizations to interact with this resource and the internal configuration of the process engine.

Method

OPTIONS /tenant for available interactions on resource

OPTIONS /tenant/{id} for available interactions on resource instance

Parameters

Path Parameters

Name Description
id The id of the tenant

Result

A JSON object with a single property named links, providing a list of resource links. Each link has the following properties

Name Value Description
method String The HTTP method to use for the interaction.
href String The interaction URL.
rel String The relation of the interaction (i.e., a symbolic name representing the nature of the interaction). Examples: create, delete

Response Codes

Code Media type Description
200 application/json Request successful.

Example 1

Request

OPTIONS /tenant

Response

Status 200.

  1. {"links":[
  2. {"method":"GET","href":"http://localhost:8080/camunda/api/engine/engine/default/tenant","rel":"list"},
  3. {"method":"GET","href":"http://localhost:8080/camunda/api/engine/engine/default/tenant/count","rel":"count"},
  4. {"method":"POST","href":"http://localhost:8080/camunda/api/engine/engine/default/tenant/create","rel":"create"}]
  5. }

Example 2

Request

OPTIONS /tenant/tenantOne

Response

Status 200.

  1. {"links":[
  2. {"method":"GET","href":"http://localhost:8080/camunda/api/engine/engine/default/tenant/tenantOne","rel":"self"},
  3. {"method":"DELETE","href":"http://localhost:8080/camunda/api/engine/engine/default/tenant/tenantOne","rel":"delete"},
  4. {"method":"PUT","href":"http://localhost:8080/camunda/api/engine/engine/default/tenant/tenantOne","rel":"update"}]
  5. }

原文: https://docs.camunda.org/manual/7.9/reference/rest/tenant/options/