Tenant-level – Update CORS
URL: /admin/api/v1/tenants/{tenantId}/cors/{corsId}
Method: PUT
Authentication: Super Admin, Tenant Admin
Field |
Data type |
Mandatory |
Description |
Validations |
---|---|---|---|---|
tenantId |
int |
Y |
Tenant identifier |
Checks if tenant exists in the DB |
corsId |
int |
Y |
CORS identifier |
Checks if CORS exists in the DB |
Request body
Field |
Data type |
Mandatory |
Description |
Validations |
---|---|---|---|---|
domain |
String |
Y |
Request origin domain |
Can’t be null or empty. Must not contain white-spaces or special characters other than a full stop (.), dash (-), or asterisk (*). |
Context |
String |
Y |
Request API context |
Can’t be null or empty. Must not contain white-spaces or special characters other than a forward slash (/) or asterisk (*). |
PUT /admin/api/v1/tenants/{tenantId}/cors/{corsId}
{
"domain":"new.outlook.vidyocloud.com",
"context":"/api/admin/v1"
}
Response body
Field |
Data type |
Mandatory |
Description |
---|---|---|---|
id |
int |
Y |
CORS identifier |
domain |
String |
Y |
Request origin domain |
context |
String |
Y |
Request API context |
{
"id":1,
"domain":"new.outlook.vidyocloud.com",
"context": "/api/admin/v1"
}
HTTP status codes, error codes, and messages
HTTP response code |
Error code |
Error message |
---|---|---|
404 |
2001 |
Tenant doesn’t exist |
404 |
2002 |
CORS doesn’t exist |
400 |
2003 |
Domain is required |
400 |
2004 |
Context is required |
500 |
2005 |
Internal server error |
{
"errors": [
{
"errorCode": 2003,
"message": "Domain is required"
},
{
"errorCode": 2004,
"message": "Context is required"
}
]
}