Log API definition ( v1 )

Download API specification :Download

Projects

Change certificate of a project

path Parameters
id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/projects/%7Bid%7D/certificate',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

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

Update a project

path Parameters
project_id
required
string
header Parameters
Authorization
required
string

access token

Request Body schema: application/json
description
string^[A-Za-z\d_.\- ]{0,300}$
Array of objects ( RestUserProjectMappings )

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "mappings": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "timeField": "string",
  • "status": "string",
  • "billingStatus": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "extra": {
    }
}

List projects

query Parameters
query
string [ 0 .. 50 ] characters
Default: ""
page
integer < int32 >
Default: 0
size
integer < int32 > [ 1 .. 100 ]
Default: 10
billing_status
string
status
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/projects',
  qs: {
    query: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE',
    billing_status: 'SOME_STRING_VALUE',
    status: 'SOME_STRING_VALUE'
  },
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "totalPages": 0,
  • "totalElements": 0,
  • "currentPage": 0,
  • "pageSize": 0
}

Get mappings of a project

path Parameters
project_id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/projects/%7Bproject_id%7D/mappings',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Get a project

path Parameters
id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/projects/%7Bid%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "timeField": "string",
  • "status": "string",
  • "billingStatus": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "extra": {
    }
}

Refills

List refills

query Parameters
query
string [ 0 .. 50 ] characters
Default: ""
project_id
required
string
page
integer < int32 >
Default: 0
size
integer < int32 > [ 1 .. 100 ]
Default: 10
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/refills',
  qs: {
    query: 'SOME_STRING_VALUE',
    project_id: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "totalPages": 0,
  • "totalElements": 0,
  • "currentPage": 0,
  • "pageSize": 0
}

Create a refill

header Parameters
Authorization
required
string

access token

Request Body schema: application/json
storageType
required
string^(S3)|(V_STORAGE)$

Available values: "S3", "V_STORAGE"

storageSettings
required
object

if "storageType" is "S3", "storageSettings" will follow format:

{
  "region": "string",
  "bucket": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string",
  "roleARN": "string",
  "cannedACL": "string",
  "additionalSettings": {
    "forcePathStyle": "boolean",
    "followRedirects": "boolean"
  }
}

if "storageType" is "V_STORAGE", "storageSettings" will follow format:
{
  "region": "string",
  "container": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string"
}

startAt
required
string < date-time >
endAt
required
string < date-time >
name
required
string^[A-Za-z]$|^[A-Za-z][A-Za-z\d-]{0,61}[A-Za-z\...
projectId
required
string [ 0 .. 50 ] characters
description
string^[A-Za-z\d_.\- ]{0,300}$

Responses

Request samples

Content type
application/json
{
  • "storageType": "string",
  • "storageSettings": { },
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "projectId": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "string",
  • "projectId": "string",
  • "userId": 0,
  • "storageType": "string",
  • "storageTypeName": "string",
  • "storageSettings": { },
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "processStartedAt": "2019-08-24T14:15:22Z",
  • "processEndedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Check refill storage connection

header Parameters
Authorization
required
string

access token

Request Body schema: application/json
storageType
required
string^(S3)|(V_STORAGE)$

Available values: "S3", "V_STORAGE"

storageSettings
required
object

if "storageType" is "S3", "storageSettings" will follow format:

{
  "region": "string",
  "bucket": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string",
  "roleARN": "string",
  "cannedACL": "string",
  "additionalSettings": {
    "forcePathStyle": "boolean",
    "followRedirects": "boolean"
  }
}

if "storageType" is "V_STORAGE", "storageSettings" will follow format:
{
  "region": "string",
  "container": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string"
}

Responses

Request samples

Content type
application/json
{
  • "storageType": "string",
  • "storageSettings": { }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "success": true
}

Create a refill from an archive

header Parameters
Authorization
required
string

access token

Request Body schema: application/json
startAt
required
string < date-time >
endAt
required
string < date-time >
name
required
string^[A-Za-z]$|^[A-Za-z](?:[A-Za-z\d-]){0,61}[A-Z...
archiveId
required
string [ 0 .. 50 ] characters
projectId
required
string [ 0 .. 50 ] characters
description
string^[A-Za-z\d_.\- ]{0,300}$

Responses

Request samples

Content type
application/json
{
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "archiveId": "string",
  • "projectId": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "string",
  • "projectId": "string",
  • "userId": 0,
  • "storageType": "string",
  • "storageTypeName": "string",
  • "storageSettings": { },
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "processStartedAt": "2019-08-24T14:15:22Z",
  • "processEndedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a refill

path Parameters
refill_id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/refills/%7Brefill_id%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "string",
  • "projectId": "string",
  • "userId": 0,
  • "storageType": "string",
  • "storageTypeName": "string",
  • "storageSettings": { },
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "processStartedAt": "2019-08-24T14:15:22Z",
  • "processEndedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a refill

path Parameters
refill_id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/refills/%7Brefill_id%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

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

Logs

Search logs

header Parameters
Authorization
required
string

access token

Request Body schema: application/json
projectId
required
string
required
Array of objects ( LogSort )
size
integer < int32 > [ 0 .. 500 ]
from
integer < int32 > >= 0
required
object ( LogQuery )
required
Array of objects ( LogAggregation )

Responses

Request samples

Content type
application/json
{
  • "projectId": "string",
  • "sorts": [
    ],
  • "size": 500,
  • "from": 0,
  • "query": {
    },
  • "aggregations": [
    ]
}

Response samples

Content type
application/json
"string"

Create an export process

Prepare logs for downloading

header Parameters
Authorization
required
string

access token

Request Body schema: application/json
projectId
required
string
required
Array of objects ( LogSort )
required
object ( LogQuery )

Responses

Request samples

Content type
application/json
{
  • "projectId": "string",
  • "sorts": [
    ],
  • "query": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "total": 0,
  • "processedAmount": 0,
  • "status": "string"
}

Get status of a export process

path Parameters
id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/logs/exports/%7Bid%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "total": 0,
  • "processedAmount": 0,
  • "status": "string"
}

Archives

List archives

query Parameters
query
string [ 0 .. 50 ] characters
Default: ""
project_id
string
page
integer < int32 >
Default: 0
size
integer < int32 > [ 1 .. 100 ]
Default: 10
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/archives',
  qs: {
    query: 'SOME_STRING_VALUE',
    project_id: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "totalPages": 0,
  • "totalElements": 0,
  • "currentPage": 0,
  • "pageSize": 0
}

Create an archive

header Parameters
Authorization
required
string

access token

Request Body schema: application/json
storageType
required
string^(S3)|(V_STORAGE)$

Available values: "S3", "V_STORAGE"

storageSettings
required
object

if "storageType" is "S3", "storageSettings" will follow format:

{
  "region": "string",
  "bucket": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string",
  "roleARN": "string",
  "cannedACL": "string",
  "additionalSettings": {
    "forcePathStyle": "boolean",
    "followRedirects": "boolean"
  }
}

if "storageType" is "V_STORAGE", "storageSettings" will follow format:
{
  "region": "string",
  "container": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string"
}

name
required
string^[A-Za-z]$|^[A-Za-z](?:[A-Za-z\d-]){0,61}[A-Z...
projectId
required
string [ 0 .. 50 ] characters
description
string^[A-Za-z\d_.\- ]{0,300}$

Responses

Request samples

Content type
application/json
{
  • "storageType": "string",
  • "storageSettings": { },
  • "name": "string",
  • "projectId": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "string",
  • "description": "string",
  • "projectId": "string",
  • "userId": 0,
  • "storageType": "string",
  • "storageTypeName": "string",
  • "storageSettings": { },
  • "processStartedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Check archive storage connection

header Parameters
Authorization
required
string

access token

Request Body schema: application/json
storageType
required
string^(S3)|(V_STORAGE)$

Available values: "S3", "V_STORAGE"

storageSettings
required
object

if "storageType" is "S3", "storageSettings" will follow format:

{
  "region": "string",
  "bucket": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string",
  "roleARN": "string",
  "cannedACL": "string",
  "additionalSettings": {
    "forcePathStyle": "boolean",
    "followRedirects": "boolean"
  }
}

if "storageType" is "V_STORAGE", "storageSettings" will follow format:
{
  "region": "string",
  "container": "string",
  "endpoint": "string",
  "accessKey": "string",
  "secretKey": "string"
}

Responses

Request samples

Content type
application/json
{
  • "storageType": "string",
  • "storageSettings": { }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "success": true
}

Get an archive

path Parameters
archive_id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/archives/%7Barchive_id%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "string",
  • "description": "string",
  • "projectId": "string",
  • "userId": 0,
  • "storageType": "string",
  • "storageTypeName": "string",
  • "storageSettings": { },
  • "processStartedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete an archive

path Parameters
archive_id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/archives/%7Barchive_id%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

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

Downloads

Download exported logs

path Parameters
id
required
string

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/downloads/logs/exports/%7Bid%7D'
};

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

  console.log(body);
});

Response samples

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

Download certificate of a project

path Parameters
id
required
string
header Parameters
Authorization
required
string

access token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vmonitorapi.vngcloud.vn/log-api/v1/downloads/certificates/projects/%7Bid%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

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

  console.log(body);
});

Response samples

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