Skip to main content

Versions

GET Versions#

Get object versions.

GET
MethodGET Metadata
URL or EndPointโ€‹/api/v{version}/projects/{projectId}/buckets/{name}/objects/{key}
HeadersAuthorization
Parametersversion, projectId, name, key
BodyNot Applicable
QuerymaxKeys, keyMarker, versionIdMarker

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
{key}YesstringrandomobjectShows the key of the object in the specified 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
NameYesstringrandombucketShows the bucket name
KeyYesstringrandomobjectShows the key of the object in the specified bucket
MaxKeysNointeger($int32)0Defines the maximum number of retrived objects.
KeyMarkerNostring"string"Specifies from which key to start listing objects.
VersionIdMarkerNostring"string"Specifies from which version to start listing objects.

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": [    {      "key": "string",      "versionId": "string",      "isLatest": true,      "isDeleteMarker": true,      "lastModified": "2021-07-16T14:12:27.138Z",      "size": 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]
keystring"string"Returns the object key.
bucketNamestring"string"Returns the bucket name.
isPublicbooltrueReturns the object permission.
lastModifieddatetime2021-07-16T12:56:17.027ZReturns the last modified date of object.
expiresdatetime2021-07-16T12:56:17.027ZReturns the date of object expires.
contentTypestring"string"Returns the content type of an object.
contentLengthint($int32)0Returns the size of an object.
cacheControlstring"string"Returns the cache control of an object.
contentDispositionstring"string"Returns the content disposition of an object.
contentEncodingstring"string"Returns the content encoding of an object.
contentLanguagestring"string"Returns the content language of an object.
metadataDictionary < string,string >"string":"string"Returns the metadata of an object.
urlstring"string"Returns the url of an object.
previewLinkstring"string"Returns the preview link of an object.

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 Object Version#

Update Version

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/objects/{key}/version
HeadersAuthorization
ParametersprojectId, name, version, key
Body{ versionId }

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
{key}YesstringobjectNameShows the object key

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
KeyYesstringrandomobjectShows the object key

Request body#

{  "versionId": "string"}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
versionIdYesstring"string"Send a specific object version.

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.

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

Delete object version.

DELETE
MethodDELETE object version
URL or EndPointโ€‹/api/v{version}/projects/{projectId}/buckets/{name}/objects/{key}
HeadersAuthorization
Parametersversion, projectId, name, key
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
{key}YesstringrandomobjectShows the key of the object in the specified 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
NameYesstringrandombucketShows the bucket name
KeyYesstringrandomobjectShows the key of the object in the specified 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": 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
resultbooltrueReturns true if the specific object version is deleted.

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