CORS
#
GET All CORSGet all bucket cors configurations.
GET ALL | |
---|---|
Method | GET ALL |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name}/cors |
Headers | Authorization |
Parameters | version, projectId, name |
Body | Not Applicable |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
v{version} | Yes | string | v1 | Shows the version of API |
{projectId} | Yes | Guid | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the id of project |
{name} | Yes | string | randombucket | Shows the bucket name |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
Version | Yes | string($uuid) | v1 | Shows the version of API |
Project Id | Yes | string($Guid) | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the project id of API |
Name | Yes | string | randombucket | Shows the bucket name |
#
Request BodyThe request does not have a request body.
#
ResponsesIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in json format by the service.
{ "success": true, "errors": [ "string" ], "messages": [ "string" ], "result": [ { "id": "921a554a-375a-459a-83c7-35f57ca554a6", "origin": "https://test.com", "allowedMethods": "GET,PUT,DELETE,POST", "allowedHeaders": "*", "maxAgeSeconds": 0 } ], "resultInfo": { "totalCount": 0, "pageIndex": 0, "pageSize": 0, "totalPages": 0, "hasNextPage": true, "hasPreviousPage": true }}
Field Name | Type | Example | Description |
---|---|---|---|
success | bool | true | If response is success will return true otherwise will return false |
errors | array [] | "string" | Indicate if there was an error |
messages | array [] | "string" | Returns the response message from back-end |
result | array [object] | Returns the result of bucket cors. | |
id | string | "string" | Returns the generated Id |
origin | string | "string" | Returns the Origin of CORS rule |
allowedMethods | string | "string" | Returns the allowed methods of CORS rule. |
allowedHeaders | string | "string" | Returns allow headers of CORS rules. |
maxAgeSeconds | integer($int32) | 0 | Returns max age seconds of CORS rules. |
resultInfo | array [object] | Returns an object of behavior | |
totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
pageSize | integer($int32) | 0 | Returns paganed data |
totalPages | integer($int32) | 0 | How many pages |
hasNextPage | bool | true | Returns the next page of paganed data |
hasPreviousPage | bool | true | Returns the previous page of paganed data |
Errors
For information about the errors that are common to all actions, see Common Errors:
- HTTP Status Code: 401 Unauthorized
- HTTP Status Code: 403 Forbidden
- HTTP Status Code: 404 Not found
#
POST CORSAdd new CORS configuration to a bucket.
POST | |
---|---|
Method | POST |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name}/cors |
Headers | Authorization |
Parameters | projectId, name, version |
Body | { id, origin, maxAgeSeconds, allowedMethods[], allowedHeaders[] } |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
v{version} | Yes | string | v1 | Shows the version of API |
{projectId} | Yes | Guid | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the id of project |
{name} | Yes | string | randombucket | Shows the bucket name |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
Version | Yes | string($uuid) | v1 | Shows the version of API |
Project Id | Yes | string($Guid) | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the project id of API |
Name | Yes | string | randombucket | Shows the bucket name |
#
Request body{ "id": "string", "origin": "string", "maxAgeSeconds": 0, "allowedMethods": [ "string" ], "allowedHeaders": [ "string" ]}
The description of the parameters is as follows:
Body Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
id | No | string | "string" | Send the Id of Bucket CORS |
origin | Yes | string | "string" | Send the origin URL |
maxAgeSeconds | Yes | integer($int32) | 0 | Send the max age second for that CORS rule |
allowedMethods | Yes | List < string > | List < string > | Send an array with Allowed Methods (GET,PUT,DELTE,POST) |
allowedHeaders | Yes | List < string > | List < string > | Send an array with Allowed Headers |
#
ResponsesIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in json format by the service.
{ "success": true, "errors": [ "string" ], "messages": [ "string" ], "result": { "id": "921a554a-375a-459a-83c7-35f57ca554a6", "origin": "https://test.com", "maxAgeSeconds": 0, "allowedMethods": [ "PUT","POST","GET","DELETE" ], "allowedHeaders": [ "*" ] }, "resultInfo": { "totalCount": 0, "pageIndex": 0, "pageSize": 0, "totalPages": 0, "hasNextPage": true, "hasPreviousPage": true }}
Field Name | Type | Example | Description |
---|---|---|---|
success | bool | true | If response is success will return true otherwise will return false |
errors | array [] | "string" | Indicate if there was an error |
messages | array [] | "string" | Returns the response message from back-end |
result | array [object] | Returns the created bucket cors result. | |
id | string | "string" | Returns the generated Id |
origin | string | "string" | Returns the Origin of CORS rule |
allowedMethods | string | "string" | Returns the allowed methods of CORS rule. |
allowedHeaders | string | "string" | Returns allow headers of CORS rules. |
maxAgeSeconds | integer($int32) | 0 | Returns max age seconds of CORS rules. |
resultInfo | array [object] | Returns an object of behavior | |
totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
pageSize | integer($int32) | 0 | Returns paganed data |
totalPages | integer($int32) | 0 | How many pages |
hasNextPage | bool | true | Returns the next page of paganed data |
hasPreviousPage | bool | true | Returns the previous page of paganed data |
Errors
For information about the errors that are common to all actions, see Common Errors:
- HTTP Status Code: 400 Bad Request
- HTTP Status Code: 401 Unauthorized
- HTTP Status Code: 403 Forbidden
- HTTP Status Code: 404 Not found
#
GET CORSGet a specific bucket cors by id
GET | |
---|---|
Method | GET By Id |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name}/cors/{id} |
Headers | Authorization |
Parameters | projectId, name, version |
Body | Not Applicable |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
v{version} | Yes | string | v1 | Shows the version of API |
{projectId} | Yes | Guid | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the id of project |
{name} | Yes | string | randombucket | Shows the bucket name |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
Version | Yes | string($uuid) | v1 | Shows the version of API |
Project Id | Yes | string($Guid) | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the project id of API |
Name | Yes | string | randombucket | Shows the bucket name |
#
Request BodyThe request does not have a request body.
#
ResponsesIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in json format by the service.
{ "success": true, "errors": [ "string" ], "messages": [ "string" ], "result": { "id": "921a554a-375a-459a-83c7-35f57ca554a6", "origin": "https://test.com", "maxAgeSeconds": 0, "allowedMethods": [ "PUT","POST","GET","DELETE" ], "allowedHeaders": [ "*" ] }, "resultInfo": { "totalCount": 0, "pageIndex": 0, "pageSize": 0, "totalPages": 0, "hasNextPage": true, "hasPreviousPage": true }}
Field Name | Type | Example | Description |
---|---|---|---|
success | bool | true | If response is success will return true otherwise will return false |
errors | array [] | "string" | Indicate if there was an error |
messages | array [] | "string" | Returns the response message from back-end |
result | array [object] | Returns the created bucket cors result. | |
id | string | "string" | Returns the generated Id |
origin | string | "string" | Returns the Origin of CORS rule |
allowedMethods | string | "string" | Returns the allowed methods of CORS rule. |
allowedHeaders | string | "string" | Returns allow headers of CORS rules. |
maxAgeSeconds | integer($int32) | 0 | Returns max age seconds of CORS rules. |
resultInfo | array [object] | Returns an object of behavior | |
totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
pageSize | integer($int32) | 0 | Returns paganed data |
totalPages | integer($int32) | 0 | How many pages |
hasNextPage | bool | true | Returns the next page of paganed data |
hasPreviousPage | bool | true | Returns the previous page of paganed data |
Errors
For information about the errors that are common to all actions, see Common Errors:
- HTTP Status Code: 401 Unauthorized
- HTTP Status Code: 403 Forbidden
- HTTP Status Code: 404 Not found
#
PUT CORSUpdates a bucket cors.
PUT | |
---|---|
Method | PUT |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name}/cors |
Headers | Authorization |
Parameters | projectId, name, version |
Body | { id, origin, maxAgeSeconds, allowedMethods[], allowedHeaders[] } |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
v{version} | Yes | string | v1 | Shows the version of API |
{projectId} | Yes | Guid | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the id of project |
{name} | Yes | string | randombucket | Shows the bucket name |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
Version | Yes | string($uuid) | v1 | Shows the version of API |
Project Id | Yes | string($Guid) | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the project id of API |
Name | Yes | string | randombucket | Shows the bucket name |
#
Request body{ "id": "string", "origin": "string", "maxAgeSeconds": 0, "allowedMethods": [ "string" ], "allowedHeaders": [ "string" ]}
The description of the parameters is as follows:
Body Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
id | No | string | "string" | Send the Id of Bucket CORS |
origin | Yes | string | "string" | Send the origin URL |
maxAgeSeconds | Yes | integer($int32) | 0 | Send the max age second for that CORS rule |
allowedMethods | Yes | List < string > | List < string > | Send an array with Allowed Methods (GET,PUT,DELTE,POST) |
allowedHeaders | Yes | List < string > | List < string > | Send an array with Allowed Headers |
#
ResponsesIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in json format by the service.
{ "success": true, "errors": [ "string" ], "messages": [ "string" ], "result": { "id": "921a554a-375a-459a-83c7-35f57ca554a6", "origin": "https://test.com", "maxAgeSeconds": 0, "allowedMethods": [ "PUT","POST","GET","DELETE" ], "allowedHeaders": [ "*" ] }, "resultInfo": { "totalCount": 0, "pageIndex": 0, "pageSize": 0, "totalPages": 0, "hasNextPage": true, "hasPreviousPage": true }}
Field Name | Type | Example | Description |
---|---|---|---|
success | bool | true | If response is success will return true otherwise will return false |
errors | array [] | "string" | Indicate if there was an error |
messages | array [] | "string" | Returns the response message from back-end |
result | array [object] | Returns the created bucket cors result. | |
id | string | "string" | Returns the generated Id |
origin | string | "string" | Returns the Origin of CORS rule |
allowedMethods | string | "string" | Returns the allowed methods of CORS rule. |
allowedHeaders | string | "string" | Returns allow headers of CORS rules. |
maxAgeSeconds | integer($int32) | 0 | Returns max age seconds of CORS rules. |
resultInfo | array [object] | Returns an object of behavior | |
totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
pageSize | integer($int32) | 0 | Returns paganed data |
totalPages | integer($int32) | 0 | How many pages |
hasNextPage | bool | true | Returns the next page of paganed data |
hasPreviousPage | bool | true | Returns the previous page of paganed data |
Errors
For information about the errors that are common to all actions, see Common Errors:
- HTTP Status Code: 400 Bad Request
- HTTP Status Code: 401 Unauthorized
- HTTP Status Code: 403 Forbidden
- HTTP Status Code: 404 Not found
#
DELETE CORSDeletes a bucket cors.
DELETE | |
---|---|
Method | DELETE |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name}/cors/{id} |
Headers | Authorization |
Parameters | projectId, name, version |
Body | Not Applicable |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
v{version} | Yes | string | v1 | Shows the version of API |
{projectId} | Yes | Guid | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the id of project |
{name} | Yes | string | randombucket | Shows the bucket name |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
Version | Yes | string($uuid) | v1 | Shows the version of API |
Project Id | Yes | string($Guid) | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the project id of API |
Name | Yes | string | randombucket | Shows the bucket name |
#
Request BodyThe request does not have a request body.
#
ResponsesIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in json format by the service.
{ "success": true, "errors": [ "string" ], "messages": [ "string" ], "result": true, "resultInfo": { "totalCount": 0, "pageIndex": 0, "pageSize": 0, "totalPages": 0, "hasNextPage": true, "hasPreviousPage": true }}
Field Name | Type | Example | Description |
---|---|---|---|
success | bool | true | If response is success will return true otherwise will return false |
errors | array [] | "string" | Indicate if there was an error |
messages | array [] | "string" | Returns the response message from back-end |
result | bool | Returns true if CORS Rule is deleted. | |
resultInfo | array [object] | Returns an object of behavior | |
totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
pageSize | integer($int32) | 0 | Returns paganed data |
totalPages | integer($int32) | 0 | How many pages |
hasNextPage | bool | true | Returns the next page of paganed data |
hasPreviousPage | bool | true | Returns the previous page of paganed data |
Errors
For information about the errors that are common to all actions, see Common Errors:
- HTTP Status Code: 401 Unauthorized
- HTTP Status Code: 403 Forbidden
- HTTP Status Code: 404 Not found