Skip to content
SoulFire LogoSoulFire

Download URL

POST
/v1/instances/{instance_id}/downloads:fetch

Downloads content from the specified URI and returns the response.

Makes an HTTP GET request to the URI specified in the request, optionally routing through a proxy. Custom headers can be provided to customize the request.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string

The UUID of the SoulFire instance to associate this download with. Used for permission checking - the caller must have DOWNLOAD_URL permission for this instance. Must be a valid UUID string (e.g., "550e8400-e29b-41d4-a716-446655440000").

Formatuuid

Request Body

application/json
  1. body

Request message for downloading content from a URL through the SoulFire server. This allows clients to fetch remote resources using the server's network connection, optionally through a proxy, which is useful for accessing resources that may be blocked or rate-limited from the client's network.

uri*string

The URI to download content from. Must be a valid, fully-formed URI (e.g., "https://example.com/resource.json"). The server will make an HTTP GET request to this URI.

Formaturi
headers?array<>

Optional HTTP headers to include in the request to the target server. These headers are added on top of the default headers set by the server (Accept, Accept-Language, User-Agent). Custom headers can override defaults.

proxy?|

Optional proxy configuration for the download request. If not provided, the request will be made directly from the server. Supports HTTP, SOCKS4, and SOCKS5 proxies with optional authentication.

Response Body

Response message containing the downloaded content and metadata.

application/json
  1. response

Response message containing the downloaded content and metadata. Returned after successfully fetching content from the requested URI.

data*string

The raw bytes of the downloaded content. This contains the complete response body from the target server. May be empty if the server returned no content (e.g., 204 No Content).

Formatbyte
headers*array<>

All HTTP headers returned by the target server in its response. Includes standard headers like Content-Type, Content-Length, Cache-Control, as well as any custom headers set by the server.

statusCode*integer

The HTTP status code returned by the target server (e.g., 200, 404, 500). Common values:

  • 200: OK - Request succeeded
  • 301/302: Redirect (note: redirects may be followed automatically)
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Not Found
  • 500: Internal Server Error
Formatint32
Example Request
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/downloads:fetch' \
  -H 'Content-Type: application/json' \
  -d '{
  "uri": "http://example.com"
}'
Example Response
{
  "data": "string",
  "headers": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "statusCode": 0
}

Was this page helpful?