diff --git a/nextdns/README.md b/nextdns/README.md new file mode 100644 index 0000000..d1f2369 --- /dev/null +++ b/nextdns/README.md @@ -0,0 +1 @@ +# NextDNS API Config \ No newline at end of file diff --git a/nextdns/config.yaml b/nextdns/config.yaml new file mode 100644 index 0000000..6207059 --- /dev/null +++ b/nextdns/config.yaml @@ -0,0 +1,41 @@ +version: 1 + +api: + name: NextDNS + description: Interfaces with NextDNS to provide tags regarding your account + version: 1.0.0 + author: + name: Kyle Chase + email: kyle@kyvislabs.com + url: https://github.com/KyvisLabs/API-YAML/nextdns + +variables: + baseUrl: + required: true + default: https://api.nextdns.io + accountId: + required: true + apiKey: + required: true + +authType: + type: none + +functions: + account: + url: "{{var::baseUrl}}/profiles/{{var::accountId}}" + method: get + responseType: json + schedule: + type: timer + duration: 30 + unit: seconds + actions: + - action: tag + path: "{{var::apiName}}/account" + type: jsonExpand + headers: + - key: X-Api-Key + value: "{{var::apiKey}}" + - key: Accept + value: "*/*" \ No newline at end of file diff --git a/octoprint/README.md b/octoprint/README.md new file mode 100644 index 0000000..276a5c2 --- /dev/null +++ b/octoprint/README.md @@ -0,0 +1 @@ +# Octoprint API Config \ No newline at end of file diff --git a/octoprint/config.yaml b/octoprint/config.yaml new file mode 100644 index 0000000..6827c36 --- /dev/null +++ b/octoprint/config.yaml @@ -0,0 +1,64 @@ +version: 1 + +api: + name: Octoprint + description: Interfaces with Octoprint for printer information + version: 1.0.0 + author: + name: Kyle Chase + email: kyle@kyvislabs.com + url: https://github.com/KyvisLabs/API-YAML/octoprint + +variables: + baseUrl: + required: true + apikey: + hidden: false + sensitive: false + +functions: + printer: + url: "{{var::baseUrl}}/api/printer" + method: get + responseType: json + schedule: + type: timer + duration: 5 + unit: seconds + actions: + - action: tag + path: "{{var::apiName}}/printer" + type: jsonExpand + headers: + - key: X-Api-Key + value: "{{var::apikey}}" + server: + url: "{{var::baseUrl}}/api/version" + method: get + responseType: json + schedule: + type: timer + duration: 5 + unit: seconds + actions: + - action: tag + path: "{{var::apiName}}/version" + type: jsonExpand + headers: + - key: X-Api-Key + value: "{{var::apikey}}" + connection: + url: "{{var::baseUrl}}/api/connection" + method: get + responseType: json + schedule: + type: timer + duration: 5 + unit: seconds + actions: + - action: tag + path: "{{var::apiName}}/connection" + type: jsonExpand + headers: + - key: X-Api-Key + value: "{{var::apikey}}" \ No newline at end of file diff --git a/tailscale/README.md b/tailscale/README.md new file mode 100644 index 0000000..d45afde --- /dev/null +++ b/tailscale/README.md @@ -0,0 +1 @@ +# Tailscale API Config \ No newline at end of file diff --git a/tailscale/config.yaml b/tailscale/config.yaml new file mode 100644 index 0000000..515d3b6 --- /dev/null +++ b/tailscale/config.yaml @@ -0,0 +1,44 @@ +version: 1 + +api: + name: Tailscale + description: Interfaces with Tailscale to provide tags regarding your tailnet + version: 1.0.0 + author: + name: Kyle Chase + email: kyle@kyvislabs.com + url: https://github.com/KyvisLabs/API-YAML/tailscale + +variables: + baseUrl: + required: true + default: https://api.tailscale.com + tailnet: + required: true + fields: + default: all + required: true + +authType: + type: basic + +functions: + devices: + url: "{{var::baseUrl}}/api/v2/tailnet/{{var::tailnet}}/devices" + method: get + responseType: json + schedule: + type: timer + duration: 30 + unit: seconds + actions: + - action: tag + path: "{{var::apiName}}/devices" + type: jsonExpand + filter: "{{jsonPath::$.devices}}" + rename: + - items: "{{jsonPath::$.[*]}}" + name: "{{jsonPath::item::$.hostname}}" + params: + - name: fields + value: "{{var::fields}}" \ No newline at end of file