Update a Tenant
Update a tenant given its tenantId
.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Update Object endpoint instead.
Endpoint
PUT /v1/tenants/:tenantId
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
tenantId | The id of the tenant to update. Note that id cannot be changed. | URL param | yes |
name | An optional displayable name for this tenant. | JSON body | no |
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
curl "https://api.warrant.dev/v1/tenants/d6ed6474-784e-407e-a1ea-42a91d4c52b9" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{"name": "New name"}'
updatedTenant, err := tenant.Update("d6ed6474-784e-407e-a1ea-42a91d4c52b9", &warrant.TenantParams{
Meta: map[string]interface{}{
"name": "New name",
},
})
Map<String, Object> tenantMeta = new HashMap<String, Object>();
tenantMeta.put("name", "New name");
Tenant updatedTenant = client.updateTenant("d6ed6474-784e-407e-a1ea-42a91d4c52b9", new Tenant("d6ed6474-784e-407e-a1ea-42a91d4c52b9", tenantMeta));
const updatedTenant = await warrantClient.Tenant.update(
"d6ed6474-784e-407e-a1ea-42a91d4c52b9",
{ name: "New name" }
);
tenant = warrant.Tenant.get("d6ed6474-784e-407e-a1ea-42a91d4c52b9")
tenant.update({"name": "New name"})
# Class method
updated_tenant = Warrant::Tenant.update("d6ed6474-784e-407e-a1ea-42a91d4c52b9", { name: "New name" })
# Instance method
tenant = Warrant::Tenant.get("d6ed6474-784e-407e-a1ea-42a91d4c52b9")
updated_tenant = tenant.update(name: "New name")
$updated_tenant = $warrant->updateTenant("d6ed6474-784e-407e-a1ea-42a91d4c52b9", new \Warrant\Tenant(name:"New name"));
Response
{
"tenantId": "d6ed6474-784e-407e-a1ea-42a91d4c52b9",
"name": "New name"
}