Properties
#
GET PropertiesGet object properties.
GET | |
---|---|
Method | GET Metadata |
URL or EndPoint | ​/api​/v{version}​/projects​/{projectId}​/buckets​/{name}​/objects​/{key}​/properties |
Headers | Authorization |
Parameters | version, projectId, name, key |
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 | randombucket | Shows the bucket name |
{key} | Yes | string | randomobject | Shows the key of the object in the specified 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 | randombucket | Shows the bucket name |
Key | Yes | string | randomobject | Shows the key of the object in the specified 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": { "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 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] | ||
key | string | "string" | Returns the object key. |
bucketName | string | "string" | Returns the bucket name. |
isPublic | bool | true | Returns the object permission. |
lastModified | datetime | 2021-07-16T12:56:17.027Z | Returns the last modified date of object. |
expires | datetime | 2021-07-16T12:56:17.027Z | Returns the date of object expires. |
contentType | string | "string" | Returns the content type of an object. |
contentLength | int($int32) | 0 | Returns the size of an object. |
cacheControl | string | "string" | Returns the cache control of an object. |
contentDisposition | string | "string" | Returns the content disposition of an object. |
contentEncoding | string | "string" | Returns the content encoding of an object. |
contentLanguage | string | "string" | Returns the content language of an object. |
metadata | Dictionary < string,string > | "string":"string" | Returns the metadata of an object. |
url | string | "string" | Returns the url of an object. |
previewLink | string | "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 PropertiesUpdate properties
PUT | |
---|---|
Method | PUT |
URL or EndPoint | /api/v{version}/projects/{projectId}/buckets/{name}/objects/{key}/properties |
Headers | Authorization |
Parameters | projectId, distributionId, version, key |
Body | { isPublic, casheControl, contentDisposition, contentEncoding, contentType, metadata[] } |
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 | randombucket | 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 |
Project Id | Yes | string($Guid) | f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6 | Shows the project id of API |
Name | Yes | string | randombucket | Shows the bucket name |
Key | Yes | string | randomobject | Shows 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 Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
isPublic | No | bool | true | Send a boolean value to update object permission. |
cacheControl | No | String | "string" | Send a string value to configure cashe control |
contentDisposition | No | String | "string" | Send a string value to configure content disposition |
contentEncoding | No | String | "string" | Send a string value to configure content encoding |
contentType | No | String | "string" | Send a string value to configure content type |
metadata | No | array[object] | Send a array of object to configure object metadata |
#
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": [ { "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 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 | bool | true | Returns True if folder is deleted or moved |
acl | string | "string" | Returns the acl of the specified object. |
cacheControl | string | "string" | Returns the cache control of the specified object. |
contentDisposition | string | "string" | Returns the content disposition of the specified object. |
contentEncoding | string | "string" | Returns the content encoding of the specified object. |
contentLength | string | "string" | Returns the content length of the specified object. |
contentType | string | "string" | Returns the content type of an object. |
metadata | array [object] | Returns the metadata of the object | |
type | int | 0 | Returns the type of the metadata i.e. user defined or system defined |
key | string | "x-amz-meta-test" | Returns the key of the metadata |
value | string | "test" | Returns the value of the metadata specified by the key |
metadataTypeOptions | array[objects] | Returns a dictionary of the type of metadata | |
expire | DateTime | "2021-06-30T12:01:51.225Z" | Returns the time when the object will expire |
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 |
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