This article describes how to manage the contracts from the tenant administration point of view.
A Contract is an enclosed environment, which contains Workspaces and DevTeams. If you have TenantAdmin role in your contract you can create, edit and delete contracts.
As of this moment you can create a new contract using an HTTP POST
call to the
platform API /v2/contracts
endpoint using the TenantAdmin credentials (email and the API-Key).
{
"data":{
"type":"contract",
"attributes": {
"name":"My Contract",
"support_user_id":"",
"available_roles":[
{
"scope":"contracts",
"role":"admin"
},
{
"scope":"workspaces",
"role":"admin"
}
]
}
}
}
Here is an explanation of the parameters and which values they could have:
type
(required) - should always have contract
value for this call.attributes.name
(required) - Contract name is limited by usable characters and length. It may contain only letters, digits, white-spaces, -
and _
symbols, and be from 3 to 40 symbols long.attributes.support_user_id
(optional) - use this parameter to define a dedicated support user for this contract. The parameter accepts only the user ID. Get this ID in advance to include here.attributes.available_roles[]
(optional) - you can omit this parameter and all system roles will be available for this contract and the workspaces in it. It is also possible to set different sets to roles for the whole contract and the workspaces.You can suspend all activities in the contract using an HTTP POST
call to the
platform API /v2/contracts/{CONTRACT_ID}/suspend/
endpoint using the TenantAdmin
credentials (email and the API-Key) replacing the CONTRACT_ID
with a real ID.
When the contract is suspended the following happens:
You can unsuspend already suspended contract using an HTTP POST
call to the
platform API /v2/contracts/{CONTRACT_ID}/unsuspend/
endpoint using the TenantAdmin
credentials (email and the API-Key) replacing the CONTRACT_ID
with a real ID.
After unsuspending the contract you can resume all operations as before. However, as of this moment, previously active flows would need to be started by hand.
To delete an existing contract use an HTTP DELETE
call to the
platform API /v2/contracts/{CONTRACT_ID}
endpoint using the TenantAdmin
credentials (email and the API-Key) replacing the CONTRACT_ID
with a real ID.
You can not delete the contract if it contains an integration component used in
the flows of other contracts. This can only happen when the component has tenant
or global
access level.
When you delete the contract you will delete all the following related resources:
DataSamples
used in every integration flow step.DynamicMetadata
used in flow steps.DynamicSelectModel
used in the flow steps.The deletion process is asynchronous. The actual data deletion will be performed after an API response, as it requires time for termination of all the Contract’s flows containers.