fleet/tools/api/kolide/schedule/add_query_to_pack
Zach Wasserman 7a68e3de65
Deprecate /api/v1/kolide routes (#297)
- Support both /api/v1/fleet and /api/v1/kolide routes in server.
- Add logging for use of deprecated routes.
- Rename routes in frontend JS.
- Rename routes and add notes in documentation.
2021-02-10 12:13:11 -08:00

15 lines
364 B
Bash
Executable File

#!/bin/bash
source $FLEET_ENV_PATH
endpoint="api/v1/fleet/schedule"
jq -n \
--arg pack_id "$1" \
--arg query_id "$2" \
'.pack_id = ($pack_id|tonumber)
|.query_id = ($query_id|tonumber)
|.interval = 60
|.removed = false
|.snapshot = true
|.platform = "darwin"
'|\
curl $CURL_FLAGS -H "Authorization: Bearer $TOKEN" "$SERVER_URL/$endpoint" -d@-