Request Methods for Tenants

This is detailed information about the request methods for tenants. Using these methods with curl has this format (here, for listing):

curl -i -u caringoadmin:pwd https://site.example.com/_admin/manage/tenants/

Note

Tenant names are converted to lowercase before evaluation.

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443822485 for more on ETC documents (IDSYS, Policy, XFORM).

List Tenants

Method

GET

URI Suffix

tenants

Query Args

 

Headers

 

Policy Action

ListTenants

Description

Returns a list of tenants

Restrictions

Paging is not supported in the request; only 1000 returned at this time.

Request Body

 

Response

JSON formatted tenant listing response

Create Tenant

Method

PUT

URI Suffix

tenants/{tenant}

Query Args

 

Headers

Optional metadata to be saved with tenant

Policy Action

CreateTenant

Description

Create a tenant named {tenant}. If tenant already exists, this action overwrites the metadata for the tenant.

Restrictions

Tenant name must be 7-bit ASCII characters in the set [a-z, 0-9, hyphen].

Request Body

 

Response

JSON general request response

Read Tenant

Method

GET

URI Suffix

tenants/{tenant}

Query Args

 

Headers

 

Policy Action

GetTenant

Description

Reads a tenant object and metadata

Restrictions

 

Request Body

 

Response

Tenant object body (normally null) and metadata

Delete Tenant

Method

DELETE

URI Suffix

tenants/{tenant}

Query Args

recursive=yes (required)

Headers

 

Policy Action

DeleteTenant

Description

Deletes all data related to a tenant including storage domains

Restrictions

 

Request Body

 

Response

JSON general request response

List Tenant ETC Documents

Method

GET

URI Suffix

tenants/{tenant}/etc

Query Args

 

Headers

 

Policy Action

ListEtc

Description

Returns a list of tenant documents

Restrictions

Paging is not supported in the request; only 1000 returned at this time.

Request Body

 

Response

JSON formatted documents listing response

Create Tenant ETC Document

Method

PUT

URI Suffix

tenants/{tenant}/etc/{document}

Query Args

 

Headers

Any metadata to be included with the document

Policy Action

PutPolicy

Description

Create or overwrite a document associated with the tenant

Restrictions

Maximum document size is 1MB.

Request Body

The document contents

Response

JSON general request response

Read Tenant ETC Document

Method

GET

URI Suffix

tenants/{tenant}/etc/{document}

Query Args

 

Headers

 

Policy Action

GetPolicy

Description

Read a tenant document

Restrictions

 

Request Body

 

Response

Document body and metadata

Delete Tenant ETC Document

Method

DELETE

URI Suffix

tenants/{tenant}/etc/{document}

Query Args

 

Headers

 

Policy Action

DeletePolicy

Description

Delete a tenant document

Restrictions

 

Request Body

 

Response

JSON general request response

List Authentication Tokens

Method

GET

URI Suffix

tenants/{tenant}/tokens

Query Args

Set x-owner-meta={user} to search for another user's tokens; set withsecrets=true to include secret fields

Headers

 

Policy Action

ListTokens

Description

List user authentication tokens

Restrictions

 

Request Body

 

Response

JSON formatted token listing response

Create Authentication Token

Method

POST

URI Suffix

tenants/{tenant}/tokens

Query Args

Set setcookie=true to have newly created token included in the Cookie response header.

Set setcookie=false to prevent the newly created token from inclusion in a  Cookie header in the response.

Headers

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443822615 for details.

Policy Action

CreateToken

Description

Create user authentication token

Restrictions

Does not support creation of tokens for other users

Request Body

 

Response

JSON formatted token response

Read Authentication Token

Method

GET

URI Suffix

tenants/{tenant}/tokens/{token}

Query Args

 

Headers

 

Policy Action

ValidateToken

Description

Read user authentication token

Restrictions

 

Request Body

 

Response

JSON formatted token response

Delete Authentication Token

Method

DELETE

URI Suffix

tenants/{tenant}/tokens/{token}

Query Args

 

Headers

 

Policy Action

DeleteToken

Description

Delete user authentication token

Restrictions

 

Request Body

 

Response

JSON general request response

 

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.