### Examples of calling the /request API

The following examples show calling the /request method with some of its verbs, using the cURL command-line utility (executed as the curl command). Sample output is also provided, but depends on the host on which the API is running, the contents of the zip or audio file that you uploaded, the request ID, the organization to which you uploaded the file, and authorization token that you are using. The cURL utility is freely available for multiple operating systems including Linux, Windows, and macOS.

### Note

Escaped newlines (that is, lines in the cURL command or the example output that end with a backslash) are added for readability. They must not be present in cURL commands, and are also not present in the output of those commands.

Example commands are shown in normal monospaced text. Example output from each command is shown in bold, monospaced text.

A cURL example that shows calling the /request API's status verb:

curl 'http://example.company.com/request/Test-Testing/status \
?requestid=a0cf623d-9e5c-4890-886f-832acb29635e \
&token=0123456789abcde0123456789abcde01'

done

A cURL example that shows calling the /request API's summary verb:

curl 'http://example.company.com/request/Test-Testing/summary\
?requestid=a0cf623d-9e5c-4890-886f-832acb29635e\
&token=0123456789abcde0123456789abcde01'

{"time_submit":"2017-01-16T21:43:08.000Z",\
"time_complete":"2017-01-16T21:45:16.000Z",\
"submitted":1,"processed":1,"analyzed":1,"error":0,"status":"done"}

A cURL example that shows calling the /request API's details verb:

curl 'http://example.current.com/request/Test-Testing/details?\
requestid=a0cf623d-9e5c-4890-886f-832acb29635e\
&token=0123456789abcde0123456789abcde01'

{"time_submit":"2017-01-16T21:43:08.000Z",\
"time_complete":"2017-01-16T21:45:16.000Z", \
"submitted":1,"processed":1,"analyzed":1,"error":0,"status":"done",\
"filedetails":[{"fullfilename":"Call4541511.mp3","status":"OK",\
"job_start":"2017-01-16T21:45:14.000Z",\
"job_finish":"2017-01-16T21:43:12.000Z",\
"analyze":"2017-01-16T21:45:14.000Z","size":4984848}]}

A cURL example that shows calling the /request API's result verb to return the JSON transcript of your audio file and write it to the file json_transcript.zip:

curl 'http://example.company.com/request/Test-Testing/result?\
requestid=a0cf623d-9e5c-4890-886f-832acb29635e\
&token=0123456789abcde0123456789abcde01' > json_transcript.zip

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
(Displays cURL's download status)