Vault#
Create, edit, list and delete file into the vault.
You need to provide authentication parameters for all queries. To learn more, see API Introduction.
Get all configurations#
Code samples
curl -X GET {server}/vault/api/v1/configurations \
-H 'Accept: application/json' \
-H 'Authorization: Basic {access-token}'
GET /vault/api/v1/configurations
Get all configurations
Example responses
200 Response
{
"value": [
{
"id": "string",
"name": "string",
"description": "string",
"rule": {
"id": [
"string"
],
"labels": [
"string"
]
},
"enabled": true,
"template": "string",
"content": "string",
"created": "2019-08-24T14:15:22Z",
"modified": "2019-08-24T14:15:22Z",
"checksum": "sha256:a579814f0cd7bdb42d671acd900d26c4a109bb1a8dc01c029b6cb19804b31a66"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Get all configurations | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» value | [object] | false | none | none |
»» id | string | true | none | none |
»» name | string | true | none | none |
»» description | string | false | none | none |
»» rule | object | false | none | none |
»»» id | [string] | false | none | none |
»»» labels | [string] | false | none | none |
»» enabled | boolean | false | none | none |
»» template | string | true | none | none |
»» content | string | false | none | none |
»» created | string(date-time) | false | none | none |
»» modified | string(date-time) | false | none | none |
»» checksum | string | false | none | none |
Get a configuration#
Code samples
curl -X GET {server}/vault/api/v1/configurations/{configurationId} \
-H 'Accept: application/json' \
-H 'Authorization: Basic {access-token}'
GET /vault/api/v1/configurations/{configurationId}
Get a configuration
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
configurationId | path | string | true | ID of a configuration |
Example responses
200 Response
{
"value": {
"id": "string",
"name": "string",
"description": "string",
"rule": {
"id": [
"string"
],
"labels": [
"string"
]
},
"enabled": true,
"template": "string",
"content": "#sample \n id =1 \n name='daehli'",
"created": "2019-08-24T14:15:22Z",
"modified": "2019-08-24T14:15:22Z",
"checksum": "sha256:a579814f0cd7bdb42d671acd900d26c4a109bb1a8dc01c029b6cb19804b31a66"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Get a configuration | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» value | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» id | string | true | none | none |
»»» name | string | true | none | none |
»»» description | string | false | none | none |
»»» rule | object | false | none | none |
»»»» id | [string] | false | none | none |
»»»» labels | [string] | false | none | none |
»»» enabled | boolean | false | none | none |
»»» template | string | true | none | none |
»»» content | string | false | none | none |
»»» created | string(date-time) | false | none | none |
»»» modified | string(date-time) | false | none | none |
»»» checksum | string | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» content | string | false | none | none |
Create a configuration#
Code samples
curl -X POST {server}/vault/api/v1/configurations/{configurationId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic {access-token}'
POST /vault/api/v1/configurations/{configurationId}
Create a configuration into the vault
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"rule": {
"id": [
"string"
],
"labels": [
"string"
]
},
"enabled": true,
"template": "string",
"content": "#sample \n id =1 \n name='daehli'",
"created": "2019-08-24T14:15:22Z",
"modified": "2019-08-24T14:15:22Z",
"checksum": "sha256:a579814f0cd7bdb42d671acd900d26c4a109bb1a8dc01c029b6cb19804b31a66"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | any | false | none |
Example responses
201 Response
{
"value": {
"id": "string",
"name": "string",
"description": "string",
"rule": {
"id": [
"string"
],
"labels": [
"string"
]
},
"enabled": true,
"template": "string",
"content": "string",
"created": "2019-08-24T14:15:22Z",
"modified": "2019-08-24T14:15:22Z",
"checksum": "sha256:a579814f0cd7bdb42d671acd900d26c4a109bb1a8dc01c029b6cb19804b31a66"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Successfully created a configuration | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» value | object | false | none | none |
»» id | string | true | none | none |
»» name | string | true | none | none |
»» description | string | false | none | none |
»» rule | object | false | none | none |
»»» id | [string] | false | none | none |
»»» labels | [string] | false | none | none |
»» enabled | boolean | false | none | none |
»» template | string | true | none | none |
»» content | string | false | none | none |
»» created | string(date-time) | false | none | none |
»» modified | string(date-time) | false | none | none |
»» checksum | string | false | none | none |
Edit a configuration#
Code samples
curl -X PATCH {server}/vault/api/v1/configurations/{configurationId} \
-H 'Accept: application/json' \
-H 'Authorization: Basic {access-token}'
PATCH /vault/api/v1/configurations/{configurationId}
Edit a configuration
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
configurationId | path | string | true | ID of a configuration |
Example responses
204 Response
{
"value": {
"id": "string",
"name": "string",
"description": "string",
"rule": {
"id": [
"string"
],
"labels": [
"string"
]
},
"enabled": true,
"template": "string",
"content": "string",
"created": "2019-08-24T14:15:22Z",
"modified": "2019-08-24T14:15:22Z",
"checksum": "sha256:a579814f0cd7bdb42d671acd900d26c4a109bb1a8dc01c029b6cb19804b31a66"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Edit a configuration | Inline |
Response Schema
Status Code 204
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» value | object | false | none | none |
»» id | string | true | none | none |
»» name | string | true | none | none |
»» description | string | false | none | none |
»» rule | object | false | none | none |
»»» id | [string] | false | none | none |
»»» labels | [string] | false | none | none |
»» enabled | boolean | false | none | none |
»» template | string | true | none | none |
»» content | string | false | none | none |
»» created | string(date-time) | false | none | none |
»» modified | string(date-time) | false | none | none |
»» checksum | string | false | none | none |
Delete a configuration#
Code samples
curl -X DELETE {server}/vault/api/v1/configurations/{configurationId} \
-H 'Authorization: Basic {access-token}'
DELETE /vault/api/v1/configurations/{configurationId}
Delete configuration specified by the configuration id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
configurationId | path | string | true | ID of a configuration |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Successfully deleted a configuration in the vault | None |
Get all nodes#
Code samples
curl -X GET {server}/vault/api/v1/nodes \
-H 'Accept: application/json' \
-H 'Authorization: Basic {access-token}'
GET /vault/api/v1/nodes
Get all nodes
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
label | query | string | false | Search by label |
Enumerated Values#
Parameter | Value |
---|---|
label | alert |
label | kapacitor |
label | telegraf |
label | tagger |
Example responses
200 Response
{
"value": {
"id": "Main_Kapacitor",
"label": [
"alert"
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully retrived all nodes | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» value | object | false | none | none |
»» id | string | false | none | none |
»» label | [string] | false | none | none |
Get all templates#
Code samples
curl -X GET {server}/vault/api/v1/templates \
-H 'Accept: application/json' \
-H 'Authorization: Basic {access-token}'
GET /vault/api/v1/templates
Get all templates specified by the label. The label is not required. It will return all the templates
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
label | query | string | false | Search by label |
Enumerated Values#
Parameter | Value |
---|---|
label | alert |
label | kapacitor |
label | telegraf |
label | tagger |
Example responses
200 Response
{
"value": [
{
"id": "string",
"name": "string",
"rule": {
"id": [
"string"
],
"labels": [
"string"
]
},
"type": "static",
"template-language": "string",
"location": "string",
"metadata": {
"docurl": "https://docs.unryo.com/index.html#/02_Administration/100_analytics_alerting",
"version": 200201
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully retrived all templates | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» value | [object] | false | none | none |
»» id | string | false | none | none |
»» name | string | false | none | none |
»» rule | object | false | none | none |
»»» id | [string] | false | none | none |
»»» labels | [string] | false | none | none |
»» type | string | false | none | none |
»» template-language | string | false | none | none |
»» location | string | false | none | none |
»» metadata | object | false | none | none |
»»» docurl | string | false | none | none |
»»» version | string | false | none | none |
Enumerated Values#
Property | Value |
---|---|
type | static |
type | dynamic |
Get template#
Code samples
curl -X GET {server}/vault/api/v1/templates/{template} \
-H 'Accept: application/json' \
-H 'Authorization: Basic {access-token}'
GET /vault/api/v1/templates/{template}
Get template specified by the template id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
template | path | string | true | Search by template ID |
Example responses
200 Response
{
"value": {
"id": "string",
"name": "string",
"rule": {
"id": [
"string"
],
"labels": [
"string"
]
},
"type": "static",
"template-language": "string",
"location": "string",
"metadata": {
"docurl": "https://docs.unryo.com/index.html#/02_Administration/100_analytics_alerting",
"version": 200201
},
"sample": "#sample \n id =1 \n name='daehli'",
"template-content": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully retrived template | Inline |
404 | Not Found | template not found | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» value | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» id | string | false | none | none |
»»» name | string | false | none | none |
»»» rule | object | false | none | none |
»»»» id | [string] | false | none | none |
»»»» labels | [string] | false | none | none |
»»» type | string | false | none | none |
»»» template-language | string | false | none | none |
»»» location | string | false | none | none |
»»» metadata | object | false | none | none |
»»»» docurl | string | false | none | none |
»»»» version | string | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» sample | string | false | none | none |
»»» template-content | string | false | none | none |
Enumerated Values#
Property | Value |
---|---|
type | static |
type | dynamic |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» status | integer | false | none | none |
» message | string | false | none | none |