wurl
stands for What URL to cURL?
Would be nice if it can be pipeable like this:
echo '{ "query":
"{
viewer {
zones(filter: { zoneTag: $zoneTag }) {
firewallEventsAdaptive(
filter: $filter
limit: 10
orderBy: [datetime_DESC]
) {
action
clientAsn
clientCountryName
clientIP
clientRequestPath
clientRequestQuery
datetime
source
userAgent
}
}
}
}",
"variables": {
"zoneTag": "<zone-tag>",
"filter": {
"datetime_geq": "2022-07-24T11:00:00Z",
"datetime_leq": "2022-07-24T12:00:00Z"
}
}
}' | tr -d '\n' | curl --silent \
https://api.cloudflare.com/client/v4/graphql \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data @-
app:
- Run
wurl --openapi ./schema.yml
- Quit by
q
- Show path/endpoint list
Show path/endpoint list:
- Show endpoint by
[mehtod] path_name \n pathItem.operation.description
- Move cursor by
up/k
,down/j
- Search by
/
- Choose endpoint by
o
,enter
- Default show schema
- Show schema: Request | Response
- Show form request
- Back to endpoint list with
esc
- Show schema with
c-s
- Show form request with
i
Show schema: Request | Response
- Back to endpoint list with
esc
Show form request:
- Back to endpoint list with
esc
- Layout
- Endpoint:
[method]
+ recursive: endpoint_text -> query ? textinput : endpoint_text - Header
- Body
- Endpoint:
- Execute form with
enter
- wurl quit
- Show curl command