sked http

Make authenticated, curl-style HTTP requests to the Skedulo API from the command line.

Overview

Make authenticated, curl-style HTTP requests to the Skedulo API from the command line. Give it a path and it resolves against your current tenant’s API and attaches your saved access token automatically, without you needing to look up or paste a bearer token.

An absolute URL is also accepted. The token is only attached when that URL’s origin matches your tenant’s own API, so it is also safe to point the command at other endpoints when you need to.

Run sked http with no URL in a terminal to open the same interactive request builder Skedulo CLI Studio uses, instead of sending a one-off request.

Usage

$ sked http [<url or path>] [--method <value>] [--header <value>]... [--data <value>] [--alias <value>] [--output <value>] [--verbose] [--include] [--fail] [--json]

Examples

# A GraphQL query
$ sked http /graphql/graphql -H "Content-Type: application/json" \
  -d '{"query":"{ jobs(limit: 5) { edges { node { UID Name JobStatus } } } }"}'

# Geocode an address
$ sked http /geoservices/geocode -H "Content-Type: application/json" \
  -d '{"addresses":["47 Warner Street, Fortitude Valley QLD, Australia"]}'

# Send an SMS
$ sked http /notifications/sms -H "Content-Type: application/json" \
  -d '{"phoneNumber":"4001234567","countryCode":"AU","message":"Thanks for confirming your booking"}'

# Fetch the tenant's GraphQL schema straight to a file
$ sked http /graphql/schema -o schema.graphql

# Open the interactive request builder
$ sked http

Flags

Flag Description Required
-X, --method= HTTP method (defaults to POST if --data is set, otherwise GET) No
-H, --header= Request header as "Key: Value" (repeatable) No
-d, --data= Request body No
-a, --alias= The alias of the Skedulo tenant to send the request to No
-o, --output= Write the response body to this file instead of stdout No
-v, --verbose Print the outgoing request line and headers before sending. The Authorization header is masked No
--include Include the response status and headers before the body. The Set-Cookie header is masked No
-f, --fail Exit non-zero if the response status is 400 or greater No

Global flags

Flag Description Required
--json Structured { status, statusText, headers, durationMs, body } output No

Token attachment

  • A relative path, such as /graphql/graphql, always resolves against, and always sends its token to, your current tenant’s own API.
  • An absolute URL only receives the token when its origin matches your tenant’s own API base path. Any other host is called without one.
  • A redirect response (3xx) is shown as-is rather than followed, the same as curl’s own default. A redirect target is not origin-checked, so following it automatically could resend the request body to an unintended host.