Skip to content

Run a platform connector endpoint

POST
/v1/data/{artifactId}/platform/{provider}/{endpoint}/execute
curl --request POST \
--url https://shareout.site/v1/data/example/platform/redshift/sql.query/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "connectionId": "conn_abc123", "params": { "body": { "sql": "select region, sum(revenue) as revenue from sales group by 1" } } }'

Runs a workspace platform connector server-side; credentials never reach the caller. Allowed for the artifact owner and workspace members. Under a row-level access policy, a scoped viewer can only run a query declared in access_policy.queries, by query name; their params are ignored and the server binds their scope into the declared SQL (otherwise 403 SCOPE_REQUIRED). Connection ids: GET /v1/workspaces/{workspaceId}/connections (any member), or GET /v1/data/{artifactId}/platform/connections (artifact owner).

artifactId
required
string
provider
required
string
Example
redshift
endpoint
required
string

Provider endpoint id. SQL providers (supabase, redshift, aurora): sql.query with params.body = { sql, maxRows? } → { columns, rows }. s3: objects.list (params.queryParams.prefix), objects.get (params.queryParams.key; CSV → rows, JSON → data, text → text, ≤ 10 MB), objects.presign (params.body = { key, expiresIn? } → signed URL). Snowflake: statements.execute; BigQuery: jobs.query.

Example
sql.query
Media typeapplication/json
object
connectionId

Required unless query names a declared query (which fixes the connection).

string
query

Name of a query in the artifact’s access_policy.queries.

string
params
object
body
object
queryParams
object
pathParams
object
Example
{
"connectionId": "conn_abc123",
"params": {
"body": {
"sql": "select region, sum(revenue) as revenue from sales group by 1"
}
}
}

{ success, data, meta } — data is the provider result.

Access denied

Media typeapplication/json
object
success
required
boolean
error
required

Human-readable message.

string
code
required

Machine-readable error code.

string
request_id

Correlation id (also the X-Request-Id header). Quote it in support tickets.

string
reason

Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.

string
hint

What to do next, in plain words.

string
suggestion
string
param

The request field at fault.

string
docs

Doc page for this error.

string
redirect_url
string
support

Present on 5xx — how to reach a human.

object
how
string
include
Array<string>
Example
{
"success": false,
"support": {
"how": "POST /v1/support/tickets",
"include": [
"request_id"
]
}
}