Skip to main content

CORS

GET All CORS#

Get all bucket cors configurations.

GET ALL
MethodGET ALL
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/cors
HeadersAuthorization
Parametersversion, projectId, name
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}YesGuidf5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the id of project
{name}YesstringrandombucketShows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
VersionYesstring($uuid)v1Shows the version of API
Project IdYesstring($Guid)f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the project id of API
NameYesstringrandombucketShows the bucket name

Request Body#

The request does not have a request body.

Responses#

If 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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns the result of bucket cors.
idstring"string"Returns the generated Id
originstring"string"Returns the Origin of CORS rule
allowedMethodsstring"string"Returns the allowed methods of CORS rule.
allowedHeadersstring"string"Returns allow headers of CORS rules.
maxAgeSecondsinteger($int32)0Returns max age seconds of CORS rules.
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns 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 CORS#

Add new CORS configuration to a bucket.

POST
MethodPOST
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/cors
HeadersAuthorization
ParametersprojectId, name, version
Body{ id, origin, maxAgeSeconds, allowedMethods[], allowedHeaders[] }

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}YesGuidf5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the id of project
{name}YesstringrandombucketShows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
VersionYesstring($uuid)v1Shows the version of API
Project IdYesstring($Guid)f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the project id of API
NameYesstringrandombucketShows 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 NameMandatoryTypeExampleDescription
idNostring"string"Send the Id of Bucket CORS
originYesstring"string"Send the origin URL
maxAgeSecondsYesinteger($int32)0Send the max age second for that CORS rule
allowedMethodsYesList < string >List < string >Send an array with Allowed Methods (GET,PUT,DELTE,POST)
allowedHeadersYesList < string >List < string >Send an array with Allowed Headers

Responses#

If 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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns the created bucket cors result.
idstring"string"Returns the generated Id
originstring"string"Returns the Origin of CORS rule
allowedMethodsstring"string"Returns the allowed methods of CORS rule.
allowedHeadersstring"string"Returns allow headers of CORS rules.
maxAgeSecondsinteger($int32)0Returns max age seconds of CORS rules.
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns 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 CORS#

Get a specific bucket cors by id

GET
MethodGET By Id
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/cors/{id}
HeadersAuthorization
ParametersprojectId, name, version
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}YesGuidf5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the id of project
{name}YesstringrandombucketShows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
VersionYesstring($uuid)v1Shows the version of API
Project IdYesstring($Guid)f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the project id of API
NameYesstringrandombucketShows the bucket name

Request Body#

The request does not have a request body.

Responses#

If 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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns the created bucket cors result.
idstring"string"Returns the generated Id
originstring"string"Returns the Origin of CORS rule
allowedMethodsstring"string"Returns the allowed methods of CORS rule.
allowedHeadersstring"string"Returns allow headers of CORS rules.
maxAgeSecondsinteger($int32)0Returns max age seconds of CORS rules.
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns 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 CORS#

Updates a bucket cors.

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/cors
HeadersAuthorization
ParametersprojectId, name, version
Body{ id, origin, maxAgeSeconds, allowedMethods[], allowedHeaders[] }

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}YesGuidf5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the id of project
{name}YesstringrandombucketShows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
VersionYesstring($uuid)v1Shows the version of API
Project IdYesstring($Guid)f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the project id of API
NameYesstringrandombucketShows 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 NameMandatoryTypeExampleDescription
idNostring"string"Send the Id of Bucket CORS
originYesstring"string"Send the origin URL
maxAgeSecondsYesinteger($int32)0Send the max age second for that CORS rule
allowedMethodsYesList < string >List < string >Send an array with Allowed Methods (GET,PUT,DELTE,POST)
allowedHeadersYesList < string >List < string >Send an array with Allowed Headers

Responses#

If 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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns the created bucket cors result.
idstring"string"Returns the generated Id
originstring"string"Returns the Origin of CORS rule
allowedMethodsstring"string"Returns the allowed methods of CORS rule.
allowedHeadersstring"string"Returns allow headers of CORS rules.
maxAgeSecondsinteger($int32)0Returns max age seconds of CORS rules.
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns 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 CORS#

Deletes a bucket cors.

DELETE
MethodDELETE
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/cors/{id}
HeadersAuthorization
ParametersprojectId, name, version
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}YesGuidf5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the id of project
{name}YesstringrandombucketShows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
VersionYesstring($uuid)v1Shows the version of API
Project IdYesstring($Guid)f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the project id of API
NameYesstringrandombucketShows the bucket name

Request Body#

The request does not have a request body.

Responses#

If 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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultboolReturns true if CORS Rule is deleted.
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns 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