bearerAuth Bearer Token (JWT) | Resource | Description |
|---|---|
| Tenants | API for managing tenants CRUD operations |
bearerAuth Bearer Token (JWT) | Resource | Description |
|---|---|
| Tenants | API for managing tenants CRUD operations |
Retrieves all tenants througth an public endpoint. The request doesn't need a JWT to work
QUERY PARAMETERS
Filtering tenants by a valid bitmask
OK OK
[
{
"tenant_id": 16,
"position_of_bit": 8,
"org": "guuk",
"name": "guuk",
"iam": "authz.guuk",
"tier": 3
}
] | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
tenant_id | integer | min: 0 | ||
position_of_bit | integer | |||
org | string | |||
name | string | |||
iam | string | |||
tier | integer |
Bad Request Invalid request
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
curl -X GET 'https://authn-tenants.prod.k8s.masmovil.com/tenants?bitmask=v1%3A%3A1' \
-H 'Accept: application/json' It creates a new Tenant in database. It should responde an id of the tenant created
Tenant to add
{
"org": "123e4567-e89b-12d3-a456-426614174000",
"name": "J24352718"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
org* | string (uuid) | |||
name* | string |
Created item created
{
"id": 1
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | integer | Internal id |
Bad Request invalid input, object invalid
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Conflict tenant already exists
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Internal Server Error Internal Server Error
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
curl -X POST 'https://authn-tenants.prod.k8s.masmovil.com/tenants' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"org": "123e4567-e89b-12d3-a456-426614174000",
"name": "J24352718"
}' It retrieves a single tenant by it's id. This operation is public and passing a JWT is not mandatory
PATH PARAMETERS
OK OK
{
"tenant_id": 16,
"position_of_bit": 8,
"org": "guuk",
"name": "guuk",
"iam": "authz.guuk",
"tier": 3
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
tenant_id | integer | min: 0 | ||
position_of_bit | integer | |||
org | string | |||
name | string | |||
iam | string | |||
tier | integer |
Bad Request Invalid tenant id
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Not Found Tenant not found
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Internal Server Error Internal Server Error
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
curl -X GET 'https://authn-tenants.prod.k8s.masmovil.com/tenants/:tenantID' \
-H 'Accept: application/json' Update the name or/and the org of a tenant.
PATH PARAMETERS
{
"org": "123e4567-e89b-12d3-a456-426614174000",
"name": "J24352718"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
org* | string (uuid) | |||
name* | string |
OK OK
{
"tenant_id": 16,
"position_of_bit": 8,
"org": "guuk",
"name": "guuk",
"iam": "authz.guuk",
"tier": 3
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
tenant_id | integer | min: 0 | ||
position_of_bit | integer | |||
org | string | |||
name | string | |||
iam | string | |||
tier | integer |
Bad Request Invalid tenant
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Not Found Tenant not found
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Internal Server Error Internal Server Error
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
curl -X PUT 'https://authn-tenants.prod.k8s.masmovil.com/tenants/:tenantID' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"org": "123e4567-e89b-12d3-a456-426614174000",
"name": "J24352718"
}' Delete tenant from database by it's id
PATH PARAMETERS
No Content OK
Bad Request Invalid tenant
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Not Found Tenant not found
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
Internal Server Error Internal Server Error
{
"id": "MM0000001",
"status": 400,
"msg": "Invalid inbound entity",
"componentMsg": "EOF. Inbound tenant malformed",
"sentryCode": "fake-req-id"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id* | string | Unique identifier of error | ||
status* | integer | Status code of the response | ||
msg | string | Final user message | ||
componentMsg | string | Technical message | ||
sentryCode | string | Unique identifier to use in sentry |
curl -X DELETE 'https://authn-tenants.prod.k8s.masmovil.com/tenants/:tenantID' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'