Criar um tenant
Cria um novo tenant e uma organização associada para a organização proprietária especificada. O corpo da solicitação usa um discriminador type com rotas exclusivas: tenant (CLIENTE FINAL) e organization (PARCEIRO/ATACADISTA).
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "tenant",
"name": "Tenant de producción",
"tenant_config": {
"product_config_id": "507f1f77bcf86cd799439030",
"analyzer": "existing"
},
"policy_id": "507f1f77bcf86cd799439050",
"organization_email": "[email protected]",
"organization_language": "en",
"organization_country": "US",
"organization_industry": "Tecnología"
}
'{
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"region": "<string>",
"product_id": "<string>",
"policy_id": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parâmetros de caminho
O identificador único da organização proprietária que criará o tenant
24^[0-9a-f]{24}$Corpo
Corpo único de criação com campos condicionais por type: se type=tenant, requer tenant_config; se type=organization, requer organization_config.
Tipo de criação. tenant para CLIENTE FINAL, organization para PARCEIRO/ATACADISTA.
tenant, organization 512512512512512Configuração específica para type=tenant.
Show child attributes
Show child attributes
Configuração específica para type=organization.
Show child attributes
Show child attributes
24^[0-9a-f]{24}$Resposta
Tenant e organização associados criados corretamente. Retorna o recurso tenant criado.
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "tenant",
"name": "Tenant de producción",
"tenant_config": {
"product_config_id": "507f1f77bcf86cd799439030",
"analyzer": "existing"
},
"policy_id": "507f1f77bcf86cd799439050",
"organization_email": "[email protected]",
"organization_language": "en",
"organization_country": "US",
"organization_industry": "Tecnología"
}
'{
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"region": "<string>",
"product_id": "<string>",
"policy_id": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}