Example Postman Call
Follow the steps below to send HTTP requests to your project’s API endpoint using Postman.
1. Download and install Postman
Download Postman and follow the https://learning.postman.com/docs/getting-started/installation-and-updates/.
2. Start a new request
Open Postman and start a new request by clicking HTTP Request.
(You may have to click the New button first.)
Type a name for your request and save it in a folder (also known as a collection).
3. Change the request type to POST
Change the request type from GET to POST.
4. Insert the URL for your project
Insert the URL for your project in the box next to POST.
This URL is generated when you publish your project.
To retrieve the URL after publishing, go to Publish > API > API endpoint.
5. Insert the Content-Type key in the header
Click the Headers tab and enter the following key and value:
KEY | VALUE |
---|---|
|
|
6. Insert the Authorization key in the header
Still in the Headers tab, enter the following key and value:
KEY | VALUE |
---|---|
|
|
For VALUE, type "bearer" followed by a space, then paste in the project API Key.
7. In the Body tab, select binary
Click the Body tab and select the binary option.
8. In the Body tab, upload your request body file
Still in the Body tab, click the Select File button and select your request body file.
Once done, the file name is visible on the interface:
This step won't work unless you have converted your data to the correct format for an API call. For further detail, see:
9. Click the Send button
Click the Send button to generate a response.
If the call to the API endpoint is successful, the HTML response status code is 200.
For this example we posted a request body file to the endpoint for a "Describe the Table" project. The generated narrative text is included as the value for the result
field within the response object. For details about the other fields in the object, see API responses.
Notice that the returned narrative text is in HTML format — for example, the <p> tag represents a paragraph break. To generate the output in plain text instead, set the contentOutputFormat
property to TEXT in the request body file — see Request body options.
Unsuccessful calls to API
If the call to the API endpoint is unsuccessful, you get an HTML status code other than 200:
If the error message is unclear (or there is no message), consult a resource such as Mozilla's HTTP response status codes.