Creating a Tenant
Tenancy Management Service Provides REST APIs for creating a tenant and provisioning the services required for that tenant. For a tenant, you can either create new instances of the required services or bind the tenant to existing service instances.
To create new instances of the services, you must first obtain the required trusted issuer IDs. For more information on creating trusted issuers, see Creating a
UAA Service Instance.
Use the following REST API to create a tenant.
HTTP POST
/tenant
For more information about this API, see the
API Documentation.
For example, to create and bind to new instances of the ACS and Asset service, specify the following parameters in the REST API:
...
"services": [
{
"parameters": {},
"seq": 0,
"serviceName": "predix-acs",
"servicePlan": "free",
"trustedIssuerIds": [
"https://13fa0384-9e2a-48e2-9d06-2c95a1f4f5ea.predix-uaa.run.aws-usw02-pr.ice.predix.io/oauth/token"
]
}
{
"parameters": {},
"seq": 1,
"serviceName": "predix-asset",
"servicePlan": "free",
"trustedIssuerIds": [
"https://13fa0384-9e2a-48e2-9d06-2c95a1f4f5ea.predix-uaa.run.aws-usw02-pr.ice.predix.io/oauth/token"
]
}
]
...
To bind to existing instances of ACS and Asset service, specify the following parameters in the REST API:
...
"serviceInstances": [
{
"serviceInstanceName": "my-acs-instance",
"serviceName": "predix-acs"
}
{
"serviceInstanceName": "my-asset-instance",
"serviceName": "predix-asset"
}
]
...
Retrieving Service Instance Details
When you use the Tenant Management service to create and bind to service instances, you can use the REST APIs to retrieve the service instance information for each tenant service.
For more information about this API, see the API Documentation.
1. Use the following REST API to retrieve the details of all service instances for a tenant:
HTTP GET
/v1/tenant/{tenantName}
Use the following REST API to retrieve details of a specific service instance for a specific tenant:
HTTP GET
/v1/tenant/{tenantName}/service/{serviceName}
NOTE:
If you require the credentials of a specific service instance, use the following REST API:
HTTP GET
/v1/tenant/{tenantName}/service/{serviceName}/credentials
ref url:
https://docs.predix.io/en-US/content/service/security/tenant_management/using-tenant-management-service