polymorfa api
Make an authenticated request through the Polymorfa SDK.
polymorfa api
Make an authenticated request through the Polymorfa SDK.
Usage
polymorfa api ENDPOINT [flags]Examples
polymorfa api /platform/projects --surface platformpolymorfa api /v1/campaigns --surface platform -X POST -f name=Launch -F dryRun=true -F audience[]=vippolymorfa api /platform/customers --surface platform --paginate --jq '.data[].id'polymorfa api /platform/customers --surface platform --paginate --slurp --jq 'map(.data | length) | add'polymorfa api /platform/projects --surface platform --template '{{range .data}}{{.slug}}{{"\t"}}{{.name}}{{"\n"}}{{end}}'Arguments
ENDPOINTrequiredRelative API endpoint beginning with a slash.
Flags
-F, --field <value>takes a valuerepeatableAdd a typed field using name=value: true, false, null and integers become JSON; @file or @- reads a file or stdin. Use name[sub]=v to nest and name[]=v to append.
-H, --header <value>takes a valuerepeatableAdd a request header using name:value.
-i, --includebooleanInclude response metadata in human output, including each page with --paginate --slurp.
--input <value>takes a valueRead a complete JSON body from a file or standard input (-).
-q, --jq <value>takes a valueFilter the response with a jq expression (embedded jq 1.8). Strings print without quotes and keep their whitespace.
--max-pages <value>takes a valueFail instead of fetching more than this many pages. Defaults to 100.
-X, --method <value>takes a valueHTTP method.
Allowed valuesGETPOSTPUTPATCHDELETEHEADOPTIONSDefaultGET--paginatebooleanFetch every page by following page.nextCursor as the cursor query parameter (GET only).
-f, --raw-field <value>takes a valuerepeatableAdd a string field using name=value.
--slurpbooleanWith --paginate, collect pages into one array before filtering or printing.
--surface <value>takes a valuerequiredAPI credential surface.
Allowed valuesmessagingplatform-t, --template <value>takes a valueFormat the response with a Go-style template, such as {{range .data}}{{.id}}{{"\n"}}{{end}}.
Also accepts the global flags.