Buckets
#
GET BucketsGet all buckets.
GET | |
---|---|
Method | GET |
URL or EndPoint | /api/v{version:apiVersion}/projects/{projectId:guid}/buckets |
Headers | Authorization |
Parameters | version, projectId, search |
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 |
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 |
Search | Yes | string | randomstring | Shows the buckets that contain that particular string |
#
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": [ { "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 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] | Return a list of created buckets | |
name | string | "string" | Returns the name of a bucket. |
bytes | long | 1234 | Returns the size of the specified bucket. |
objects | long | 100 | Returns the number of the object in the specified bucket. |
processingType | string | "Deleting" | Returns what kind of work is being performed on that bucket i.e. deleting, emptying or updating. |
status | string | "Processing" | Returns the status of the bucket. |
endpoint | string | "string" | Returns the endpoint of the bucket. |
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 |
#
ErrorsFor 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 BucketCreate a bucket.
POST | |
---|---|
Method | POST |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets |
Headers | Authorization |
Parameters | projectId, version |
Body | {bucketName, bucketRegion, fileListing, tags, key, value } |
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 | string | 2e21fae6-af4c-4a4a-e0fc-08d903f55711 | Shows the project Id |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
version | Yes | string($uuid) | v1 | Shows the version of API |
projectId | Yes | string | 2e21fae6-af4c-4a4a-e0fc-08d903f55711 | Id 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 Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
bucketName | Yes | string | "string" | Sends the unique bucketName |
bucketRegion | Yes | string | "string" | Sends the bucket region |
fileListing | Yes | bool | true | Sends file listing (Restricted or Enabled) |
version | Yes | bool | true | Sends bucket versioning (Disabled or Enabled) |
objectLock | Yes | bool | true | Sends object lock of the bucket (Disabled or Enabled) |
tags | Yes | string | "string" | Sends bucket tags |
key | Yes | string | "string" | Sends the unique key of the tag |
value | Yes | string | "string" | Sends the value of the tag |
#
ResponsesIf 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 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 created bucket | |
bucketName | string | "string" | Returns the unique bucketName |
bucketRegion | string | "string" | Returns the bucket region |
fileListing | string | "string" | Returns file listing (Restricted or Enabled) |
version | Yes | bool | true |
objectLock | Yes | bool | true |
tags | string | "string" | Returns bucket tags |
key | string | "string" | Returns the unique key of the tag |
value | string | "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 BucketGet bucket.
GET | |
---|---|
Method | GET |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name} |
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 | buckettest | Shows the name of the bucket |
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 | randomstring | Shows the name of the bucket |
#
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": { "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 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 requested bucket | |
name | string | "string" | Returns the name of a bucket. |
fileListing | bool | true | Returns true if the files are public. |
objectLock | bool | false | Returns false if the object lock is not enabled. |
version | bool | false | Returns false if versioning is not enabled. |
enableCdn | bool | true | Returns true if cdn is enabled for the bucket. |
cdnEndpoint | string | "string" | Returns te cdn endpoint for the bucket. |
regionOptions | array[object] | Returns an array of region options. If region is 0 take EUWest otherwise take EUEast | |
resultInfo | array [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 BucketGet bucket by name.
HEAD | |
---|---|
Method | HEAD |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name} |
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 | buckettest | Shows the name of the bucket |
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 | randomstring | Shows the name of the bucket |
#
Request bodyThe request does not have a request body.
#
ResponsesIf 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 BucketUpdates a bucket file listing.
PUT | |
---|---|
Method | PUT |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets /{name} |
Headers | Authorization |
Parameters | projectId, version |
Body | {bucketName, bucketRegion, fileListing, tags, key, value } |
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 | string | 2e21fae6-af4c-4a4a-e0fc-08d903f55711 | Shows the project Id |
name | Yes | string | "string" | 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 |
projectId | Yes | string | 2e21fae6-af4c-4a4a-e0fc-08d903f55711 | Put the id of project |
name | Yes | string | "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 Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
fileListing | Yes | bool | true | Sends the value of updated file listing. If its true it sends the Enable File Listing, otherwise it will Restrict File Listing |
version | Yes | bool | true | Sends the value of updated version. If its true it sends the Enable Bucket Versioning, otherwise it will Disable Bucket Versioning |
objectLock | Yes | bool | true | Sends the value of updated object lock of the bucket. If its true it sends the Enable Object Lock, otherwise it will Disable Object Lock |
enableCdn | Yes | bool | true | Sends the value of updated enable CDN. If its true it Enables CDN , otherwise it will Disable CDN |
#
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": "string", "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 | string | "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 BucketDelete or Empty a bucket.
DELETE | |
---|---|
Method | DELETE |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name} |
Headers | Authorization |
Parameters | name, projectId, version, eventType |
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 | string | 2e21fae6-af4c-4a4a-e0fc-08d903f55711 | Shows the project Id |
name | Yes | string | "string" | Shows the bucket name |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
v{version} | Yes | string | v1 | Shows the version of API |
{projectId} | Yes | string | 2e21fae6-af4c-4a4a-e0fc-08d903f55711 | Shows the project Id |
name | Yes | string | "string" | Shows the bucket name |
eventType | Yes | integer($int32) | 0 | Select the eventType, if you want to empty a bucket select 0 eventType, if you want to delete a bucket select 1 eventType |
#
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 | string | "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