12 lines
492 B
Bash
Executable File
12 lines
492 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
API_URL="https://graphql.ordrestyring.dk/graphql"
|
|
KEY_FILE="$ROOT_DIR/apikey"
|
|
API_KEY=$(tr -d '\r\n' < "$KEY_FILE")
|
|
|
|
curl -sS -X POST "$API_URL" \
|
|
-H "Authorization: Bearer $API_KEY" \
|
|
-H "Content-Type: application/json" \
|
|
--data '{"query":"query { creditors(pagination: {cursor: null, limit: 5}) { items { id number name address city vatNumber } nextCursor previousCursor } }" }' | jq .
|