Hi, I am trying to add a tenant using the tenant API in Wazo_authd.
Which Tenant UUID should I pass in the request and in the Wazo-Tenant Header?
Currently I have tried passing an existing tenant uuid in Wazo-Tenant header (considering this would make the existing tenant a parent to the new tenant) and a random uuid in the request parameter. But I get an error “Not a valid uuid”.
Following is my request and response:
curl -X POST --header ‘Content-Type: application/json’ --header ‘Accept: application/json’ --header ‘Wazo-Tenant: 6118e18b-17e2-49ef-a59c-0759063b9548’ --header ‘X-Auth-Token: f915eb8d-694b-4809-81cf-acb29481fade’ -d ‘{ \
“address”: { \
“city”: “shimla”, \
“country”: “india”, \
“line_1”: “asdf”, \
“line_2”: “dddd”, \
“state”: “hp”, \
“zip_code”: “171006” \
}, \
“contact”: “vageesh”, \
“name”: “testnew”, \
“phone”: “8097656783”, \
“slug”: “tenant”, \
“uuid”: “6118e18b-17e2-49ef-a59c-0759063b9598” \
}’ ‘https://:443/api/auth/0.1/tenants’
Response:
{
“message”: “Not a valid UUID.”,
“error_id”: “invalid-data”,
“details”: {
“contact”: {
“message”: “Not a valid UUID.”,
“constraint_id”: “type”,
“constraint”: “uuid”
}
},
“timestamp”: 1625822228.9948983,
“resource”: “tenants”
}