Call an unwrapped endpoint¶
ycli api PATH --service tracker|wiki|forms calls any endpoint of a service, the way
gh api does, with the same authentication, retries,
output and exit codes as every other command.
ycli api issues/TRACKER-1 --service tracker --jq .summary # GET is the default
ycli api issues/TRACKER-1/comments --service tracker -F text=@note.md # a field makes it a POST
ycli api pages/descendants --service wiki -f slug=docs --paginate # every page, one JSON array
PATHis relative to the service's base URL. A full URL of a service needs no--service; any other host is refused, so the token never leaves Yandex.-f key=valuesends a string;-Fis typed:true,null, numbers, JSON,@filefor a file's text,key[sub]=vto nest andkey[]=vfor an array.- Fields of a GET or DELETE go to the query string, otherwise to a JSON body.
--input FILEsends a raw body instead. -H 'Name: value'adds a header and-Xsets the method.--dry-run,--yesand--jqbehave as everywhere.--paginatefollows Tracker'sLink: rel="next"and Wiki'snext_cursor. Forms pages its listings in more than one way, so pass its paging parameters with-fyourself.
The full option list is in the ycli api reference.