Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions api-reference/api-services/post-requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,49 @@ The API parameters are the same across all methods of accessing the Unstructured
* Refer to the [Examples](/api-reference/api-services/examples) page for some inspiration on using the parameters.

[//]: # (TODO: when we have the concepts page shared across products, link it from here for the users to learn about partition strategies, chunking strategies and other important shared concepts)

## Postman collection

import UseTheCorrectAPIKey from '/snippets/general-shared-text/api-key-differences.mdx';

Unstructured offers a [Postman collection](https://learning.postman.com/docs/collections/collections-overview/) that you can import into Postman to make POST requests through a graphical user interface.

1. [Install Postman](https://learning.postman.com/docs/getting-started/installation/installation-and-updates/).
2. [Sign in to Postman](https://learning.postman.com/docs/getting-started/installation/postman-account/#signing-in-to-postman).
3. In your workspace, click **Import**.

![Import a Postman collection](/img/api/post/import.png)

4. In the **Paste cURL, Raw text or URL** box, enter the following URL, and then press `Enter`:

```
https://raw.githubusercontent.com/Unstructured-IO/docs/main/examplecode/codesamples/api/Unstructured-POST.postman_collection.json
```

5. On the sidebar, click **Collections**.

![Collections icon in the sidebar](/img/api/post/collection.png)

6. Expand **Unstructured POST**.
7. Click one of the following:

- To call the Unstructured Serverless API, click **(Serverless API) Basic Request**.
- To call the Free Unstructured API, click **(Free API) Basic Request**.

8. On the **Headers** tab, next to `unstructured-api-key`, enter your Unstructured API key in the **Value** column.

![Headers tab in the request area](/img/api/post/headers.png)

<UseTheCorrectAPIKey />

9. On the **Body** tab, next to `files`, click the **Select files** box in the **Value** column.

![Body tab in the request area](/img/api/post/body.png)

11. Click **New file from local machine**.
12. Browse to and select the file that you want Unstructured to process.
13. Click **Send**.

To download the processed data to your local machine, in the response area, click the ellipses, and then click **Save response to file**.

![Save response to file in the response area](/img/api/post/save.png)
119 changes: 119 additions & 0 deletions examplecode/codesamples/api/Unstructured-POST.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"info": {
"_postman_id": "9cfd731e-2818-465b-b0ec-875586dbf4f0",
"name": "Unstructured POST",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "38317384"
},
"item": [
{
"name": "(Serverless API) Basic Request",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content",
"value": "multipart/form-data",
"type": "text"
},
{
"key": "unstructured-api-key",
"value": "",
"type": "text"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "files",
"type": "file",
"src": []
},
{
"key": "strategy",
"value": "hi_res",
"type": "text"
}
]
},
"url": {
"raw": "https://api.unstructuredapp.io/general/v0/general",
"protocol": "https",
"host": [
"api",
"unstructuredapp",
"io"
],
"path": [
"general",
"v0",
"general"
]
}
},
"response": []
},
{
"name": "(Free API) Basic Request",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "multipart/form-data",
"type": "text"
},
{
"key": "unstructured-api-key",
"value": "",
"type": "text"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "files",
"type": "file",
"src": []
},
{
"key": "strategy",
"value": "hi_res",
"type": "text"
}
]
},
"url": {
"raw": "https://api.unstructured.io/general/v0/general",
"protocol": "https",
"host": [
"api",
"unstructured",
"io"
],
"path": [
"general",
"v0",
"general"
]
}
},
"response": []
}
]
}
Binary file added img/api/post/body.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/api/post/collection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/api/post/headers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/api/post/import.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/api/post/save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.