Api Documentation (1.0)

Download OpenAPI specification:Download

Api Documentation

artifact-controller

Artifact Controller

List Artifacts Of Image

path Parameters
repoId
required
string

The repo id

query Parameters
imageName
required
string

imageName

name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}/images/artifacts',
  qs: {
    imageName: 'SOME_STRING_VALUE',
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Delete Artifact

path Parameters
repoId
required
string

The repo id

query Parameters
digest
required
string

digest

imageName
required
string

imageName

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}/images/artifacts/delete',
  qs: {digest: 'SOME_STRING_VALUE', imageName: 'SOME_STRING_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

image-controller

Image Controller

List Image By Repository

path Parameters
repoId
required
string

The repo id

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}/images',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Delete Image

path Parameters
repoId
required
string

The repo id

query Parameters
imageName
required
string

imageName

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}/images/delete',
  qs: {imageName: 'SOME_STRING_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Get Image Detail

path Parameters
repoId
required
string

The repo id

query Parameters
imageName
required
string

imageName

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}/images/detail',
  qs: {imageName: 'SOME_STRING_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

repository-controller

Repository Controller

List Repository By User

query Parameters
accessLevel
string

accessLevel

name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/repository',
  qs: {
    accessLevel: 'SOME_STRING_VALUE',
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Create Repository

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createRepoRequest

isPublic
required
boolean

Access level of project

quotaLimit
required
integer <int32>

Quota limit of project, unit: GB

repoName
required
string

Name of project

Responses

Request samples

Content type
application/json
{
  • "isPublic": true,
  • "quotaLimit": 20,
  • "repoName": "network-interface"
}

Get Repository By Id

path Parameters
repoId
required
string

The repo id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Delete Repository

path Parameters
repoId
required
string

The repository id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Attach Repository Users to Repository

path Parameters
repoId
required
string

The repo id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

repoId
required
string

Repository Uuid

required
Array of objects (RepoUserPermissionRequest)

Repository User list

Responses

Request samples

Content type
application/json
{
  • "repoId": 20,
  • "repoUserList": 20
}

Detach Repository Users to Repository

path Parameters
repoId
required
string

The repo id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

repoId
required
string

Repository Uuid

repoUserUuidList
required
Array of strings

Repository User list

Responses

Request samples

Content type
application/json
{
  • "repoId": 20,
  • "repoUserUuidList": 20
}

Get Repository History Log

path Parameters
repoId
required
string

The repo id

query Parameters
page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}/history',
  qs: {page: 'SOME_INTEGER_VALUE', size: 'SOME_INTEGER_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Update Repository Quota

path Parameters
repoId
required
string

The repo id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

quotaLimit
required
integer <int32>

Quota limit of project, unit: GB

repoId
required
string

Uuid of repository

Responses

Request samples

Content type
application/json
{
  • "quotaLimit": 20,
  • "repoId": "repo-02c6851e-2427-4cc3-938b-db0fe5f5b184"
}

Get User Attached to Repository

path Parameters
repoId
required
string

The repo id

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/repository/{repoId}/user',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

robot-account-controller

Robot Account Controller

List Repository User

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/user',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Create Repository User

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

description
string

Description of Repository User

duration
integer <int32>

The duration of the Repo User in days

name
required
string

Name of Repository User

required
Array of objects (RepoPermissionRequest)

Permission list

Responses

Request samples

Content type
application/json
{
  • "description": "network-interface",
  • "duration": true,
  • "name": "network-interface",
  • "permissionRequestList": 20
}

Get Permission List

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/user/permissions',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Update Info Repository User

path Parameters
repoUserId
required
string

The repository user id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

description
string

Description of Repository User

duration
integer <int32>

The duration of the Repo User in days

repoUserId
required
string

Repository User Id

Responses

Request samples

Content type
application/json
{
  • "description": "network-interface",
  • "duration": true,
  • "repoUserId": "ra-08b64fae-2a04-49c9-a396-53d4af3a818f"
}

Delete Repository User

path Parameters
repoUserId
required
string

The repository user id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vcr.api.vngcloud.vn/v1/user/{repoUserId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Disable Repository User

path Parameters
repoUserId
required
string

The repository user id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://vcr.api.vngcloud.vn/v1/user/{repoUserId}/disable',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Enable Repository User

path Parameters
repoUserId
required
string

The repository user id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://vcr.api.vngcloud.vn/v1/user/{repoUserId}/enable',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});

Update Permission of Repository User

path Parameters
repoUserId
required
string

The repository user id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

required
Array of objects (RepoPermissionRequest)

Permission list

repoUserId
required
string

Repository User Id

Responses

Request samples

Content type
application/json
{
  • "permissionRequestList": 20,
  • "repoUserId": "ra-08b64fae-2a04-49c9-a396-53d4af3a818f"
}

Refresh Secret Key Repository User

path Parameters
repoUserId
required
string

The repository user id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vcr.api.vngcloud.vn/v1/user/{repoUserId}/refresh',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

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

  console.log(body);
});