vStorage HCM04 API (v2.0)

Download OpenAPI specification:Download

billing

Billing operation endpoint

This API is used to retrieve the summary request of specific project in a range date

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

query Parameters
endTime
required
string

dd/MM/yyyy

startTime
required
string

dd/MM/yyyy

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/billing/statistics/projects/{project_id}/request',
  qs: {endTime: 'SOME_STRING_VALUE', startTime: 'SOME_STRING_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve the summary traffic of specific project in a range date

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

query Parameters
endTime
required
string

dd/MM/yyyy

startTime
required
string

dd/MM/yyyy

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/billing/statistics/projects/{project_id}/traffic',
  qs: {endTime: 'SOME_STRING_VALUE', startTime: 'SOME_STRING_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve the summary usage of specific project in a range date

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

query Parameters
endTime
required
string

dd/MM/yyyy

startTime
required
string

dd/MM/yyyy

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/billing/statistics/projects/{project_id}/usage',
  qs: {endTime: 'SOME_STRING_VALUE', startTime: 'SOME_STRING_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve the current quota of specific project

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/projects/{project_id}/quota',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve current traffic (total outgoing traffic) of a project.

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/projects/{project_id}/traffic',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve traffic (total outgoing traffic) of project in a date time range.

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

query Parameters
endTime
required
string

MM/dd/yyyy HH:mm

startTime
required
string

MM/dd/yyyy HH:mm

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/projects/{project_id}/traffic/search',
  qs: {endTime: 'SOME_STRING_VALUE', startTime: 'SOME_STRING_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve current usage of a project.

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/projects/{project_id}/usage',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve usage of a project in a date time range.

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

query Parameters
endTime
required
string

MM/dd/yyyy HH:mm

startTime
required
string

MM/dd/yyyy HH:mm

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/projects/{project_id}/usage/search',
  qs: {endTime: 'SOME_STRING_VALUE', startTime: 'SOME_STRING_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve usage of all projects of an user in a date time range.

Authorizations:
Bearer_Token
path Parameters
user_id
required
string

The user portal id

query Parameters
end_time
required
string

MM/dd/yyyy HH:mm

start_time
required
string

MM/dd/yyyy HH:mm

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/users/{user_id}/usage',
  qs: {end_time: 'SOME_STRING_VALUE', start_time: 'SOME_STRING_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

bucket

Bucket operation endpoint

This API is used to retrieve all buckets of a project.

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

query Parameters
limit
ref
Example: limit=20

Page size

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}',
  qs: {limit: 'SOME_REF_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to create a new bucket on a project.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'REPLACE_KEY_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to delete bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to get list access control list of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/acl',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to replace all exists access control list of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

Array of objects (AccountCanonical)
Array of objects (Group)
ownerCanonical
Array of strings
Items Enum: "FULL_CONTROL" "READ" "READ_ACP" "WRITE" "WRITE_ACP"

Responses

Request samples

Content type
application/json
{
  • "accountCanonicals": [
    ],
  • "groups": [
    ],
  • "ownerCanonical": [
    ]
}

This API is used to retrieve bucket CORS.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/cors',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update bucket CORS.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

Array
AllowedHeaders
Array of strings

Value for the Access-Control-Allow-Headers header

AllowedMethods
Array of strings

Value for the Access-Control-Allow-Methods header

AllowedOrigins
Array of strings

Value for the Access-Control-Allow-Origin header

ExposeHeaders
Array of strings

Value for the Access-Control-Expose-Headers header

MaxAgeSeconds
integer <int32>

Value for the Access-Control-Max-Age header

Responses

Request samples

Content type
application/json
[
  • {
    }
]

This API is used to delete bucket CORS.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/cors',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve bucket encryption.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/encryption',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update bucket encryption.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

enable
boolean

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

This API is used to retrieve list of bucket lifecycle rules.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/lifecycle_rules',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to create bucket lifecycle rule.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

abortIncompleteMultipartUploadDays
integer <int32>

Stop all incomplete multipart uploads and delete the parts associated with the multipart upload

deleteMarkersExpiration
boolean

Delete expired object delete markers to improve performance

expirationDays
integer <int32>

Define when to expire the current version of objects

name
string

The rule name

nonCurrentVersionExpirationDays
integer <int32>

Define when to delete non-current versions of objects permanently

object

Limit the objects by tag

prefix
string

Limit the objects by prefix

Responses

Request samples

Content type
application/json
{
  • "abortIncompleteMultipartUploadDays": 0,
  • "deleteMarkersExpiration": true,
  • "expirationDays": 0,
  • "name": "string",
  • "nonCurrentVersionExpirationDays": 0,
  • "objectTags": {
    },
  • "prefix": "string"
}

This API is used to retrieve bucket lifecycle rule information.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

rule_name
required
string

The lifecycle rule name

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/lifecycle_rules/{rule_name}',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update bucket lifecycle rule.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

rule_name
required
string

The lifecycle rule name

Request Body schema: application/json

req

abortIncompleteMultipartUploadDays
integer <int32>

Stop all incomplete multipart uploads and delete the parts associated with the multipart upload

deleteMarkersExpiration
boolean

Delete expired object delete markers to improve performance

expirationDays
integer <int32>

Define when to expire the current version of objects

name
string

The rule name

nonCurrentVersionExpirationDays
integer <int32>

Define when to delete non-current versions of objects permanently

object

Limit the objects by tag

prefix
string

Limit the objects by prefix

Responses

Request samples

Content type
application/json
{
  • "abortIncompleteMultipartUploadDays": 0,
  • "deleteMarkersExpiration": true,
  • "expirationDays": 0,
  • "name": "string",
  • "nonCurrentVersionExpirationDays": 0,
  • "objectTags": {
    },
  • "prefix": "string"
}

This API is used to delete bucket lifecycle rule.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

rule_name
required
string

The lifecycle rule name

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/lifecycle_rules/{rule_name}',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve event notifications of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/notification',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to create bucket event notification.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

dateBasedPartitioning
boolean

Select report name rule: No-date-based partitioning (Ex: bucketA/2013-11-01-21-32) or Date-based partitioning (Ex: bucketB/2023/03/01/2023-03-01-21-32)

description
string^[A-Za-z\d_.\- ]{0,256}$

Give your Event notification a description.

events
Array of strings unique

Select event type to receive notifications: s3:ObjectCreated:|Put|Post|Copy|CompleteMultipartUpload, s3:ObjectRemoved:|Delete|DeleteMarkerCreated, s3:ObjectLifecycle:Expiration:*|Current|DeleteMarker

name
string^[A-Za-z]$|^[A-Za-z](?:[A-Za-z\d-]){0,61}[A-Z...

Give your Event notification a name.

prefix
string

Limit the notifications to objects with key starting with specified characters.

reportBucket
string

Select a bucket for the report.

suffix
string

Limit the notifications to objects with key ending with specified characters.

Responses

Request samples

Content type
application/json
{
  • "dateBasedPartitioning": true,
  • "description": "string",
  • "events": "s3:ObjectCreated:Put",
  • "name": "string",
  • "prefix": "string",
  • "reportBucket": "string",
  • "suffix": "string"
}

This API is used to retrieve event notification information of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

id
required
string

The event notification id

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/notification/{id}',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update bucket event notification.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

id
required
string

The event notification id

project_id
required
string

The project id

Request Body schema: application/json

req

dateBasedPartitioning
boolean

Select report name rule: No-date-based partitioning (Ex: bucketA/2013-11-01-21-32) or Date-based partitioning (Ex: bucketB/2023/03/01/2023-03-01-21-32)

description
string^[A-Za-z\d_.\- ]{0,256}$

Give your Event notification a description.

events
Array of strings unique

Select event type to receive notifications: s3:ObjectCreated:|Put|Post|Copy|CompleteMultipartUpload, s3:ObjectRemoved:|Delete|DeleteMarkerCreated, s3:ObjectLifecycle:Expiration:*|Current|DeleteMarker

name
string^[A-Za-z]$|^[A-Za-z](?:[A-Za-z\d-]){0,61}[A-Z...

Give your Event notification a name.

prefix
string

Limit the notifications to objects with key starting with specified characters.

reportBucket
string

Select a bucket for the report.

suffix
string

Limit the notifications to objects with key ending with specified characters.

Responses

Request samples

Content type
application/json
{
  • "dateBasedPartitioning": true,
  • "description": "string",
  • "events": "s3:ObjectCreated:Put",
  • "name": "string",
  • "prefix": "string",
  • "reportBucket": "string",
  • "suffix": "string"
}

This API is used to delete event notification of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

id
required
string

The event notification id

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/notification/{id}',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve object lock configuration of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/object_lock',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update bucket object lock configuration.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

mode
string

The object lock mode

periodUnit
string

Period unit (days or years)

periodVal
integer <int32>

Number of days or years

Responses

Request samples

Content type
application/json
{
  • "mode": "COMPLIANCE",
  • "periodUnit": "days",
  • "periodVal": 30
}

This API is used to retrieve policy of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/policy',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update bucket policy.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

policy
string

Give your json string of bucket policy config.

Responses

Request samples

Content type
application/json
{
  • "policy": "string"
}

This API is used to delete bucket policy.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/policy',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve bucket encryption.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/versioning',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update bucket versioning.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Request Body schema: application/json

req

enable
boolean

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

This API is used to retrieve detail information of a bucket (ex: object count, size).

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

The bucket name

project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/{bucket}/details',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

object

Object operation endpoint

This API is used to retrieve all objects of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

project_id
required
string

project_id

query Parameters
limit
ref

Page size

marker
ref

Last object name of previous page

prefix
ref

Filter objects by prefix

show_version
ref
Example: show_version=false

Retrieve all object versions

version_id_marker
ref

Last version ID of previous page

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}',
  qs: {
    limit: 'SOME_REF_VALUE',
    marker: 'SOME_REF_VALUE',
    prefix: 'SOME_REF_VALUE',
    show_version: 'SOME_REF_VALUE',
    version_id_marker: 'SOME_REF_VALUE'
  },
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve all directories of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

project_id
required
string

project_id

query Parameters
prefix
ref

Filter directories by prefix

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/directories',
  qs: {prefix: 'SOME_REF_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to create a directory of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

project_id
required
string

project_id

Request Body schema: application/json

req

directoryName
string

The directory name

Responses

Request samples

Content type
application/json
{
  • "directoryName": "string"
}

This API is used to delete a directory of a bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

directory
required
string

directory

project_id
required
string

project_id

Request Body schema: application/json

req

isDeleteVersion
boolean

Is delete all object versions

Responses

Request samples

Content type
application/json
{
  • "isDeleteVersion": true
}

This API is used to delete a object of a directory or bucket.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

versionId
string

The object version ID

Responses

Request samples

Content type
application/json
{
  • "versionId": "string"
}

This API is used to get list access control list of an object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

query Parameters
versionId
ref

The object version ID

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/objects/{object}/acls',
  qs: {versionId: 'SOME_REF_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to replace all exists access control list of an object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

Array of objects (AccountCanonical)
Array of objects (Group)
ownerCanonical
Array of strings
Items Enum: "FULL_CONTROL" "READ" "READ_ACP" "WRITE" "WRITE_ACP"
versionId
string

Responses

Request samples

Content type
application/json
{
  • "accountCanonicals": [
    ],
  • "groups": [
    ],
  • "ownerCanonical": [
    ],
  • "versionId": "string"
}

This API is used to copy object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

destinationBucketName
string

The destination bucket

destinationObjectName
string

The destination object name

Responses

Request samples

Content type
application/json
{
  • "destinationBucketName": "string",
  • "destinationObjectName": "string"
}

This API is used to retrieve detail information of an object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

query Parameters
versionId
ref

The object version ID

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/objects/{object}/details',
  qs: {versionId: 'SOME_REF_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to retrieve GET presigned URL of a object. With these GET presigned URL, then user can use them to download object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

timeExpire
integer <int64>

The expired time of presigned URL in second

versionId
string

The object version ID

viewMode
string

View or download with presigned URL

Responses

Request samples

Content type
application/json
{
  • "timeExpire": 0,
  • "versionId": "string",
  • "viewMode": "view|download"
}

This API is used to retrieve metadata an object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/objects/{object}/metadata',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update metadata for an object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

required
object

Map of metadata

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    }
}

This API is used to move object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

destinationBucketName
string

The destination bucket

destinationObjectName
string

The destination object name

Responses

Request samples

Content type
application/json
{
  • "destinationBucketName": "string",
  • "destinationObjectName": "string"
}

This API is used to initiates a multipart upload and returns an upload ID.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

contentType
string

The content type of uploading object

Responses

Request samples

Content type
application/json
{
  • "contentType": "string"
}

This API is used to completes a multipart upload by assembling previously uploaded parts.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

Array of objects (PartEtagDTO)

The list of uploaded object part etag

uploadId
string

The ID of multipart upload

Responses

Request samples

Content type
application/json
{
  • "partETags": [
    ],
  • "uploadId": "string"
}

This API is used to aborts a multipart upload.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

uploadId
string

The ID of multipart upload

Responses

Request samples

Content type
application/json
{
  • "uploadId": "string"
}

This API is used to retrieve object legal hold configuration.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

query Parameters
versionId
ref

The object version ID

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/objects/{object}/object_legal_hold',
  qs: {versionId: 'SOME_REF_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update object legal hold configuration.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

status
required
string

Enable or disable object legal hold

versionId
string

The object version ID

Responses

Request samples

Content type
application/json
{
  • "status": "ON|OFF",
  • "versionId": "string"
}

This API is used to retrieve object lock retention configuration.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

query Parameters
versionId
ref

The object version ID

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/objects/{object}/object_lock',
  qs: {versionId: 'SOME_REF_VALUE'},
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update object lock retention configuration.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

extReq

mode
required
string

The object lock mode

retainUntilDate
required
integer <int64>

The date (Epoch timestamp) that the retention period end on

versionId
string

The object version ID

Responses

Request samples

Content type
application/json
{
  • "mode": "COMPLIANCE",
  • "retainUntilDate": 1735664400,
  • "versionId": "string"
}

This API is used to rename object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

extReq

newObjectName
string

Input new name of object

Responses

Request samples

Content type
application/json
{
  • "newObjectName": "string"
}

This API is used to retrieve PUT presigned URL of a object. With these PUT presigned URL, then user can use them to upload object.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

Request Body schema: application/json

req

partNumber
integer <int32>

The part number of multipart upload

timeExpire
integer <int64>

The expired time of presigned URL in second

uploadId
string

The ID of multipart upload

Responses

Request samples

Content type
application/json
{
  • "partNumber": 0,
  • "timeExpire": 0,
  • "uploadId": "string"
}

This API is used to restore a version of an object as current one.

Authorizations:
Bearer_Token
path Parameters
bucket
required
string

bucket

object
required
string

object

project_id
required
string

project_id

version_id
required
string

version_id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/ceph/projects/{project_id}/buckets/{bucket}/objects/{object}/versions/{version_id}',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'REPLACE_KEY_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

project

Project operation endpoint

This API is used to retrieve all projects of an user.

Authorizations:
Bearer_Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/projects',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is to create a new project in a region for an postpaid user.

Authorizations:
Bearer_Token
Request Body schema: application/json

req

projectName
required
string
quotaInGBytes
required
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "projectName": "string",
  • "quotaInGBytes": 0
}

This API is used to retrieve detail information of a project.

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/projects/{project_id}/details',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is used to update quota for a project.

Authorizations:
Bearer_Token
path Parameters
project_id
required
string

The project id

Request Body schema: application/json

req

quotaInGBytes
required
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "quotaInGBytes": 0
}

region

Region operation endpoint

This API is to retrieve list of regions.

Authorizations:
Bearer_Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/regions',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

This API is to retrieve detail information of a region.

Authorizations:
Bearer_Token
path Parameters
region_id
required
string

The region id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm04-api.vstorage.vngcloud.vn/api/v1/regions/{region_id}',
  headers: {'content-type': '*/*', Authorization: 'REPLACE_KEY_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});