Skip to main content

Properties

GET Properties#

Get object properties.

GET
MethodGET Metadata
URL or EndPoint​/api​/v{version}​/projects​/{projectId}​/buckets​/{name}​/objects​/{key}​/properties
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": {    "key": "string",    "bucketName": "string",    "isPublic": true,    "lastModified": "2021-07-16T12:56:17.027Z",    "expires": "2021-07-16T12:56:17.027Z",    "contentType": "string",    "contentLength": 0,    "cacheControl": "string",    "contentDisposition": "string",    "contentEncoding": "string",    "contentLanguage": "string",    "metadata": {      "additionalProp1": "string",      "additionalProp2": "string",      "additionalProp3": "string"    },    "url": "string",    "previewLink": "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]
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 Properties#

Update properties

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/objects/{key}/properties
HeadersAuthorization
ParametersprojectId, distributionId, version, key
Body{ isPublic, casheControl, contentDisposition, contentEncoding, contentType, metadata[] }

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

Request body#

{  "isPublic": true,  "cacheControl": "string",  "contentDisposition": "string",  "contentEncoding": "string",  "contentType": "image/png",  "metadata": [    {      "type": 0,      "key": "string",      "value": "string"    }  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
isPublicNobooltrueSend a boolean value to update object permission.
cacheControlNoString"string"Send a string value to configure cashe control
contentDispositionNoString"string"Send a string value to configure content disposition
contentEncodingNoString"string"Send a string value to configure content encoding
contentTypeNoString"string"Send a string value to configure content type
metadataNoarray[object]Send a array of object to configure object metadata

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": [    {      "acl": "string",      "cacheControl": "string",      "contentDisposition": "string",      "contentEncoding": "string",      "contentLength": "string",      "contentType": "string",      "metadata": [        {          "type": 0,          "key": "string",          "value": "string",          "metadataTypeOptions": {            "additionalProp1": 0,            "additionalProp2": 0,            "additionalProp3": 0          }        }      ],      "expire": "2021-07-02T08:47:41.185Z"    }  ],  "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 folder is deleted or moved
aclstring"string"Returns the acl of the specified object.
cacheControlstring"string"Returns the cache control of the specified object.
contentDispositionstring"string"Returns the content disposition of the specified object.
contentEncodingstring"string"Returns the content encoding of the specified object.
contentLengthstring"string"Returns the content length of the specified object.
contentTypestring"string"Returns the content type of an object.
metadataarray [object]Returns the metadata of the object
typeint0Returns the type of the metadata i.e. user defined or system defined
keystring"x-amz-meta-test"Returns the key of the metadata
valuestring"test"Returns the value of the metadata specified by the key
metadataTypeOptionsarray[objects]Returns a dictionary of the type of metadata
expireDateTime"2021-06-30T12:01:51.225Z"Returns the time when the object will expire
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