> For the complete documentation index, see [llms.txt](https://docs.tagshelf.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tagshelf.dev/endpoints/file/source.md).

# Remote Sources

The integration with Remote Sources is a key feature that extends the platform's capabilities to include cloud-based file handling. This functionality allows users to easily reference and process files stored in remote blob containers across various cloud providers, including AWS, GCP, and Azure.

This section of the API documentation provides detailed guidance on how to utilize Remote Sources within Alfred. It outlines the process of accessing and uploading files from these external storage options directly into the Alfred platform for processing. Users can leverage the [`/api/file/upload`](https://docs.tagshelf.dev/enpoints/file#upload-files-from-remote-sources) endpoint to specify the source name, container, and file name, effectively linking Alfred to their remote storage.

The documentation will cover essential aspects such as authentication, configuration of source names, and the necessary parameters for identifying and accessing files in different cloud environments. It will also provide examples and best practices for smoothly integrating remote blob containers with Alfred, ensuring users can harness the full potential of cloud storage in conjunction with Alfred's robust document processing capabilities.

This Remote Sources feature is designed to offer flexibility and efficiency, enabling users to seamlessly incorporate cloud-stored documents into their IDP workflows within Alfred. Whether it's processing files stored on AWS S3 buckets, Azure Blob Storage, or Google Cloud Storage, this section will equip users with the knowledge to effectively manage and process their documents from various cloud platforms.

### Create remote source

<mark style="color:green;">`POST`</mark> `/api/source/create`

Creates an object storage source. These are external sources of data which can be referenced as a source for file uploads.\
\
A successful response will be returned in JSON with the source unique identifier and name.

**Headers**

| Name                                           | Type   | Description                                   |
| ---------------------------------------------- | ------ | --------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json                              |
| Authorization                                  | String | Bearer \<access\_token> or amx \<hmac\_token> |
| X-TagshelfAPI-Key                              | String | Application API Key                           |

**Request Body**

| Name          | Type   | Description                                                           |
| ------------- | ------ | --------------------------------------------------------------------- |
| source\_name  | String | Name of your remote source                                            |
| access\_key   | String | Access key (used on AWS and DO)                                       |
| secret\_key   | String | Secret key to access remote resource.                                 |
| account\_name | String | Name of the account/bucket.                                           |
| region        | String | Region in which the resource is hosted.                               |
| type          | String | Cloud provider to be used. Supported providers are AWS, DO and Azure. |

{% tabs %}
{% tab title="200 OK" %}

```json
{
  "id": "559167cb-4c76-4e28-bf15-34cbf614119c",
  "source_name": "REMOTE SOURCE"
}
```

{% endtab %}
{% endtabs %}

### Get all remote sources

<mark style="color:blue;">`GET`</mark> `/api/source/list`

Returns a list of configured object storage sources.\
\
A successful response will be returned in JSON with a list of source unique identifiers and names as well as its creation date.\
\
Anatomy of the Request

**Headers**

| Name              | Type   | Description                                   |
| ----------------- | ------ | --------------------------------------------- |
| Content-Type      | string | application/json                              |
| Authorization     | string | Bearer \<access\_token> or amx \<hmac\_token> |
| X-TagshelfAPI-Key | string | \<app\_api\_key>                              |

{% tabs %}
{% tab title="200 OK" %}

```json
[
{
  "id": "559167cb-4c76-4e28-bf15-34cbf614119c",
  "source_name": "my remote source"
},
{
  "id": "559167cb-4c76-4e28-bf15-34cbf614219c",
  "source_name": "my remote source 2"
}
]
```

{% endtab %}
{% endtabs %}

### Remove remote source

<mark style="color:red;">`DELETE`</mark> `/api/source/remove/:name`

Removes a given configured object storage source\
\
A successful response will be returned in JSON will the removed's source unique identifier and name.

**Path Parameters**

| Name | Type   | Description               |
| ---- | ------ | ------------------------- |
| name | String | Name of the remote source |

**Headers**

| Name              | Type   | Description                                   |
| ----------------- | ------ | --------------------------------------------- |
| Content-Type      | String | application/json                              |
| Authorization     | String | Bearer \<access\_token> or amx \<hmac\_token> |
| X-TagshelfAPI-Key | String | \<app\_api\_key>                              |

{% tabs %}
{% tab title="200 OK" %}

```
{
  "id": "559167cb-4c76-4e28-bf15-34cbf614119c",
  "source_name": "my remote source"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tagshelf.dev/endpoints/file/source.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
