Skip to main content

Buckets

GET Buckets#

Get all buckets.

GET
MethodGET
URL or EndPoint/api/v{version:apiVersion}/projects/{projectId:guid}/buckets
HeadersAuthorization
Parametersversion, projectId, search
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

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
SearchYesstringrandomstringShows the buckets that contain that particular string

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": [      {      "name": "testBucket",      "bytes": 0,      "objects": 0,      "processingType": null,      "status": null,      "endpoint": "string"    }  ]  },  "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]Return a list of created buckets
namestring"string"Returns the name of a bucket.
byteslong1234Returns the size of the specified bucket.
objectslong100Returns the number of the object in the specified bucket.
processingTypestring"Deleting"Returns what kind of work is being performed on that bucket i.e. deleting, emptying or updating.
statusstring"Processing"Returns the status of the bucket.
endpointstring"string"Returns the endpoint of the bucket.
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 If the service is down

POST Bucket#

Create a bucket.

POST
MethodPOST
URL or EndPoint/api/v{version}/projects/{projectId}/buckets
HeadersAuthorization
ParametersprojectId, version
Body{bucketName, bucketRegion, fileListing, tags, key, value }

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
versionYesstring($uuid)v1Shows the version of API
projectIdYesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Id of the project

Request body#

{  "bucketName": "string",  "bucketRegion": 0,  "fileListing": true,  "version": true,  "objectLock": true,  "tags": [    {      "key": "string",      "value": "string"    }  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
bucketNameYesstring"string"Sends the unique bucketName
bucketRegionYesstring"string"Sends the bucket region
fileListingYesbooltrueSends file listing (Restricted or Enabled)
versionYesbooltrueSends bucket versioning (Disabled or Enabled)
objectLockYesbooltrueSends object lock of the bucket (Disabled or Enabled)
tagsYesstring"string"Sends bucket tags
keyYesstring"string"Sends the unique key of the tag
valueYesstring"string"Sends the value of the tag

Responses#

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "bucketName": "string",    "bucketRegion": 0,    "fileListing": true,    "version": true,    "objectLock": true,    "tags": [    {      "key": "string",      "value": "string"    }  ]  },  "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 created bucket
bucketNamestring"string"Returns the unique bucketName
bucketRegionstring"string"Returns the bucket region
fileListingstring"string"Returns file listing (Restricted or Enabled)
versionYesbooltrue
objectLockYesbooltrue
tagsstring"string"Returns bucket tags
keystring"string"Returns the unique key of the tag
valuestring"string"Returns the value of the tag

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 Bucket#

Get bucket.

GET
MethodGET
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}
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}YesstringbuckettestShows the name of the bucket

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
NameYesstringrandomstringShows the name of the bucket

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": {    "name": "string",    "region": 0,    "fileListing": true,    "objectLock": true,    "version": true,    "enableCdn": true,    "cdnEndpoint": "string",    "regionOptions": {      "additionalProp1": 0,      "additionalProp2": 0,      "additionalProp3": 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 requested bucket
namestring"string"Returns the name of a bucket.
fileListingbooltrueReturns true if the files are public.
objectLockboolfalseReturns false if the object lock is not enabled.
versionboolfalseReturns false if versioning is not enabled.
enableCdnbooltrueReturns true if cdn is enabled for the bucket.
cdnEndpointstring"string"Returns te cdn endpoint for the bucket.
regionOptionsarray[object]Returns an array of region options. If region is 0 take EUWest otherwise take EUEast
resultInfoarray [object]Returns an object of behavior

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

HEAD Bucket#

Get bucket by name.

HEAD
MethodHEAD
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}
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}YesstringbuckettestShows the name of the bucket

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
NameYesstringrandomstringShows the name of the bucket

Request body#

The request does not have a request body.

Responses#

If the action is successful, the service sends back an HTTP 200 response headers.

The following data is returned in json format by the service.

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 Bucket#

Updates a bucket file listing.

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/buckets /{name}
HeadersAuthorization
ParametersprojectId, version
Body{bucketName, bucketRegion, fileListing, tags, key, value }

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id
nameYesstring"string"Shows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
versionYesstring($uuid)v1Shows the version of API
projectIdYesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Put the id of project
nameYesstring"string"Put the bucket name

Request body#

{  "fileListing": true,  "version": true,  "objectLock": true,  "enableCdn": true}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
fileListingYesbooltrueSends the value of updated file listing. If its true it sends the Enable File Listing, otherwise it will Restrict File Listing
versionYesbooltrueSends the value of updated version. If its true it sends the Enable Bucket Versioning, otherwise it will Disable Bucket Versioning
objectLockYesbooltrueSends the value of updated object lock of the bucket. If its true it sends the Enable Object Lock, otherwise it will Disable Object Lock
enableCdnYesbooltrueSends the value of updated enable CDN. If its true it Enables CDN , otherwise it will Disable CDN

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": "string",  "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
resultstring"string"Return the result of updated bucket

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 Bucket#

Delete or Empty a bucket.

DELETE
MethodDELETE
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}
HeadersAuthorization
Parametersname, projectId, version, eventType
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id
nameYesstring"string"Shows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id
nameYesstring"string"Shows the bucket name
eventTypeYesinteger($int32)0Select the eventType, if you want to empty a bucket select 0 eventType, if you want to delete a bucket select 1 eventType

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
resultstring"string"Return the result of updated bucket

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