targets
add_site_direct: upload Target struct
Method | Path |
POST | /api/v1/targets/add-direct |
Body Fields
Field | Type |
bbox | String, |
context | ValueMap |
name | String, |
pipelines (optional) | [String] |
tags (optional) | [String] |
tenant (optional) | String |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/add-direct -d '{
"bbox": "0",
"name": "test0",
"tags": [
"test"
]
}'
add_site: upload target YAML definition
Method | Path |
POST | /api/v1/targets/add |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/add --data-binary 'name: "test0"
bbox: "0"
'
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/add
update_site: upload site definition which will be merged with site using this id
Method | Path |
POST | /api/v1/targets/update |
Body Fields
Field | Type |
bbox | String, |
context | ValueMap |
name | String, |
pipelines (optional) | [String] |
tags (optional) | [String] |
tenant (optional) | String |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/update -d '{
"bbox": "0",
"name": "test_zero"
}'
update_site_yaml: like update_site, except provide Target in YAML
Method | Path |
POST | /api/v1/targets/update/update-yaml |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/update/update-yaml --data-binary 'bbox: "0"
name: test_zero
'
Method | Path |
GET | /api/v1/targets/list |
Body Fields
Field | Type |
names (optional) | [String] |
tags (optional) | [String] |
targets (optional) | [String] |
tenant (optional) | String |
with_additional_context | bool |
Examples
search by target id
cURL
curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/list -d '{
"targets": [
"0"
]
}'
Output
{
"Sites": [
{
"name": "test0",
"bbox": "0",
"tenant": "default",
"trace": [],
"pipelines": [],
"tags": [
"test"
],
"context": {},
"protected": false
}
]
}
search by matching tags
cURL
curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/list -d '{
"tags": [
"test"
]
}'
Method | Path |
GET | /api/v1/targets/list-ids |
Body Fields
Field | Type |
names (optional) | [String] |
tags (optional) | [String] |
targets (optional) | [String] |
tenant (optional) | String |
with_additional_context | bool |
add_all_sites: upload full 'sites.yml' definition
Method | Path |
POST | /api/v1/targets/add-all |
remove_site: remove site by id
Method | Path |
POST | /api/v1/targets/remove/id:String |
Params
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/remove/0
add_pipeline_to_site: add a pipeline by name to a site by id
Method | Path |
POST | /api/v1/targets/add-pipe |
Body Fields
Field | Type |
pipe | String |
target_id | String |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/add-pipe -d '{
"pipe": "simple",
"target_id": "0"
}'
remove_pipeline_from_site: remove pipe from target
Method | Path |
POST | /api/v1/targets/remove-pipe |
Body Fields
Field | Type |
target_id | String |
value | String |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/remove-pipe -d '{
"target_id": "0",
"value": "simple"
}'
remove_tag_from_site: remove tag from target
Method | Path |
POST | /api/v1/targets/remove-tag |
Body Fields
Field | Type |
target_id | String |
value | String |
add_tag_to_site: add a tag to a target
Method | Path |
POST | /api/v1/targets/add-tag |
Body Fields
Field | Type |
target_id | String |
value | String |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/add-tag -d '{
"target_id": "0",
"value": "tagged"
}'
rebuild_targets: rebuild specified targets by name
Method | Path |
POST | /api/v1/targets/rebuild |
Examples
cURL
curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/rebuild -d '[
"0"
]'
start_target_update: indicate that a set of target updates will happen
Method | Path |
POST | /api/v1/targets/start-update |
end_target_update: target updates are finished and building can happen
Method | Path |
POST | /api/v1/targets/end-update |
get_target_report_times: get the agent report times in epoch secs
Method | Path |
GET | /api/v1/targets/report-times |
get_target_pipe_statuses: return status map for particular target, or all if target is '*'
Method | Path |
GET | /api/v1/targets/pipe-status/target:String |
Params
set_target_settings: set log settings etc for a set of targets
Method | Path |
POST | /api/v1/targets/settings |
get_target_settings: get current settings for this target
Method | Path |
GET | /api/v1/targets/get-settings/target:String |
Params
Examples
get all the settings for target ID '0'
cURL
curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/get-settings/0
get_metrics: get metrics from the Hotrodd
Method | Path |
GET | /api/v1/targets/metrics |
Body Fields
Field | Type |
end_time (optional) | Timestamp |
pipes | [String] |
start_time (optional) | Timestamp |
targets | [String] |
get_logs: get remote logs from the Hotrodd server
Method | Path |
GET | /api/v1/targets/logs |
Body Fields
Field | Type |
end_time (optional) | Timestamp |
log_level (optional) | LogLevel |
num_records (optional) | int |
pipes | [String] |
start_time (optional) | Timestamp |
targets | [String] |
trace_id (optional) | int |
Examples
cURL
curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/targets/logs -d '{
"num_records": 1,
"pipes": [
"HRD"
],
"targets": [
"SERVER"
]
}'