Account Tenant Management

Account Tenant Management operations

Get list of Tenants

Role Requirements

account-tenant-read or account-admin

Description

Gets a list of Tenants owned by the Account.

Securitybearer
Request
query Parameters
from
integer <int32>
Default: 0

Index position in the list to start taking from. Default is 0.

take
integer <int32>
Default: 20

Number of items to take from the list. Default is 20.

name
string

A search term for the Tenants name to limit the results.

header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Paged Tenants response.

401

Unauthorized

403

Forbidden

get/v2/account/tenants
Request samples
Response samples
application/json
{
  • "currentPage": 0,
  • "pageCount": 0,
  • "pageSize": 0,
  • "rowCount": 0,
  • "results": [
    • {
      • "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
      • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
      • "name": "string",
      • "status": "string",
      • "address": {
        • "streetAddress": "string",
        • "extendedAddress": "string",
        • "locality": "string",
        • "region": "string",
        • "postCode": "string",
        • "country": "string"
        },
      • "statusDetails": {
        • "createdOn": "2019-08-24T14:15:22Z",
        • "createdBy": "string",
        • "approvedOn": "2019-08-24T14:15:22Z",
        • "approvedBy": "string",
        • "rejectedOn": "2019-08-24T14:15:22Z",
        • "rejectionReason": "string",
        • "rejectedBy": "string",
        • "deletedOn": "2019-08-24T14:15:22Z",
        • "deletedBy": "string"
        }
      }
    ]
}

Create a new Tenant

Role Requirements

account-tenant-write or account-admin

Description

Creates a new Tenant for the Account`.

Securitybearer
Request
header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Request Body schema:
name
string or null

The name of the Tenant.

streetAddress
string or null

The first line of address.

extendedAddress
string or null

Optional second line of address.

locality
string or null

Locality / city of address.

region
string or null

Region name of Tenant.

postCode
string or null

Post code of Tenant.

country
string or null

Country name.

Responses
201

Created - Returns the Tenant response.

401

Unauthorized

403

Forbidden

post/v2/account/tenants
Request samples
{
  • "name": "string",
  • "streetAddress": "string",
  • "extendedAddress": "string",
  • "locality": "string",
  • "region": "string",
  • "postCode": "string",
  • "country": "string"
}
Response samples
application/json
{
  • "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "name": "string",
  • "status": "string",
  • "address": {
    • "streetAddress": "string",
    • "extendedAddress": "string",
    • "locality": "string",
    • "region": "string",
    • "postCode": "string",
    • "country": "string"
    },
  • "statusDetails": {
    • "createdOn": "2019-08-24T14:15:22Z",
    • "createdBy": "string",
    • "approvedOn": "2019-08-24T14:15:22Z",
    • "approvedBy": "string",
    • "rejectedOn": "2019-08-24T14:15:22Z",
    • "rejectionReason": "string",
    • "rejectedBy": "string",
    • "deletedOn": "2019-08-24T14:15:22Z",
    • "deletedBy": "string"
    }
}

Get a Tenant

Role Requirements

account-tenant-read or account-admin

Description

Gets a Tenants by the tenantId.

Securitybearer
Request
path Parameters
tenantId
required
string <uuid>

The Tenant Id.

header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Tenants response.

401

Unauthorized

403

Forbidden

get/v2/account/tenants/{tenantId}
Request samples
Response samples
application/json
{
  • "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "name": "string",
  • "status": "string",
  • "address": {
    • "streetAddress": "string",
    • "extendedAddress": "string",
    • "locality": "string",
    • "region": "string",
    • "postCode": "string",
    • "country": "string"
    },
  • "statusDetails": {
    • "createdOn": "2019-08-24T14:15:22Z",
    • "createdBy": "string",
    • "approvedOn": "2019-08-24T14:15:22Z",
    • "approvedBy": "string",
    • "rejectedOn": "2019-08-24T14:15:22Z",
    • "rejectionReason": "string",
    • "rejectedBy": "string",
    • "deletedOn": "2019-08-24T14:15:22Z",
    • "deletedBy": "string"
    }
}

Update a Tenant

Role Requirements

account-tenant-write or account-admin

Description

Updates a Tenant by the tenantId.

Securitybearer
Request
path Parameters
tenantId
required
string <uuid>

The Tenant Id.

header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Request Body schema:
name
string or null

The name of the Tenant.

streetAddress
string or null

The first line of address.

extendedAddress
string or null

Optional second line of address.

locality
string or null

Locality / city of address.

region
string or null

Region name of Tenant.

postCode
string or null

Post code of Tenant.

country
string or null

Country name.

Responses
202

Accepted

401

Unauthorized

403

Forbidden

put/v2/account/tenants/{tenantId}
Request samples
{
  • "name": "string",
  • "streetAddress": "string",
  • "extendedAddress": "string",
  • "locality": "string",
  • "region": "string",
  • "postCode": "string",
  • "country": "string"
}

Delete a new Tenant

Role Requirements

account-tenant-write or account-admin

Description

Deletes a Tenant by the tenantId.

Securitybearer
Request
path Parameters
tenantId
required
string <uuid>

The Tenant Id.

header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Responses
204

No Content.

401

Unauthorized

403

Forbidden

delete/v2/account/tenants/{tenantId}
Request samples

Get Tenants Awaiting Approval

Role Requirements

account-tenant-approval

Description

Gets a list of Tenants that have a status of AWAITING_APPROVAL.

Securitybearer
Request
header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Tenants response.

401

Unauthorized

403

Forbidden

get/v2/account/tenants/awaiting-approval
Request samples
Response samples
application/json
{
  • "tenants": [
    • {
      • "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
      • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
      • "name": "string",
      • "status": "string",
      • "address": {
        • "streetAddress": "string",
        • "extendedAddress": "string",
        • "locality": "string",
        • "region": "string",
        • "postCode": "string",
        • "country": "string"
        },
      • "statusDetails": {
        • "createdOn": "2019-08-24T14:15:22Z",
        • "createdBy": "string",
        • "approvedOn": "2019-08-24T14:15:22Z",
        • "approvedBy": "string",
        • "rejectedOn": "2019-08-24T14:15:22Z",
        • "rejectionReason": "string",
        • "rejectedBy": "string",
        • "deletedOn": "2019-08-24T14:15:22Z",
        • "deletedBy": "string"
        }
      }
    ]
}

Review a Tenant

Role Requirements

account-tenant-approval

Description

Reviews a Tenant that currently has a status of AWAITING_APPROVAL. As a reviewer, the Tenant can be either approved or rejected. If rejected, a rejection reason is mandatory.

Securitybearer
Request
path Parameters
tenantId
required
string <uuid>

The Tenant Id.

header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Request Body schema:
isApproved
boolean

Indicates if the review is approved or not. Use true if approving or false for rejecting.

rejectionReason
string or null

If IsApproved is false then the Rejection Reason needs to be given.

Responses
204

No Content.

401

Unauthorized

403

Forbidden

put/v2/account/tenants/{tenantId}/review
Request samples
{
  • "isApproved": true,
  • "rejectionReason": "string"
}

Get IP Whitelist configuration for Account Tenant.

Role Requirements

account-tenant-read

Description

Gets the IP Whitelist configuration for Tenant-scoped API Key users.

Securitybearer
Request
path Parameters
tenantId
required
string <uuid>

The Tenant Id.

header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the IP Whitelist configuration response.

401

Unauthorized

403

Forbidden

get/v2/account/tenants/{tenantId}/ip-whitelist
Request samples
Response samples
application/json
{
  • "enabled": true,
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "rules": [
    • {
      • "name": "string",
      • "ipV4Start": "string",
      • "ipV4End": "string"
      }
    ]
}

Update IP Whitelist configuration for Account Tenant.

Role Requirements

account-tenant-write

Description

Updates the IP Whitelist configuration for Tenant-scoped API Key users.

Securitybearer
Request
path Parameters
tenantId
required
string <uuid>

The Tenant Id.

header Parameters
x-account-id
required
string

The Account Id.

x-correlation-id
string

Correlation Id for the request.

Request Body schema:
enabled
required
boolean

IP Whitelist configuration enabled.

required
Array of objects (IpWhitelistConfigurationRuleV1)

Collection of IP Whitelist rules defining allowed IP ranges.

Responses
204

No Content.

401

Unauthorized

403

Forbidden

put/v2/account/tenants/{tenantId}/ip-whitelist
Request samples
{
  • "enabled": true,
  • "rules": [
    • {
      • "name": "string",
      • "ipV4Start": "string",
      • "ipV4End": "string"
      }
    ]
}
Copyright 2024 Duck Creek Technologies. All Rights Reserved.