No description available
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v3/api_keys';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"name":"my_api_key","owner":{"userId":"string","teamId":0,"organisationId":"string"},"keyPermissions":{"presets":["my_preset"],"permissions":["read_logs"]},"hashed":true}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"keyId": "my_key_id",
"name": "my_api_key",
"value": "my_api_key_value"
}
API key authentication
This data structure is used to create an API key.
A successful response.
This data structure is the response obtained when creating an API key.
Was this page helpful?
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v3/api_keys';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"name":"my_api_key","owner":{"userId":"string","teamId":0,"organisationId":"string"},"keyPermissions":{"presets":["my_preset"],"permissions":["read_logs"]},"hashed":true}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"keyId": "my_key_id",
"name": "my_api_key",
"value": "my_api_key_value"
}
No description available
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v3/api_keys';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"name":"my_api_key","owner":{"userId":"string","teamId":0,"organisationId":"string"},"keyPermissions":{"presets":["my_preset"],"permissions":["read_logs"]},"hashed":true}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"keyId": "my_key_id",
"name": "my_api_key",
"value": "my_api_key_value"
}
API key authentication
This data structure is used to create an API key.
A successful response.
This data structure is the response obtained when creating an API key.
Was this page helpful?
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v3/api_keys';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"name":"my_api_key","owner":{"userId":"string","teamId":0,"organisationId":"string"},"keyPermissions":{"presets":["my_preset"],"permissions":["read_logs"]},"hashed":true}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"keyId": "my_key_id",
"name": "my_api_key",
"value": "my_api_key_value"
}