API

AgentRelayFileGrant

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{organization_id}/agent_relay_file_grants create Selected resource permission
GET /api/v1/organizations/{organization_id}/agent_relay_file_grants list Selected resource permission
GET /api/v1/organizations/{organization_id}/agent_relay_file_grants/{id} load Selected resource permission
DELETE /api/v1/organizations/{organization_id}/agent_relay_file_grants/{id} remove Selected resource permission

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

agent_relay_file_grants, err := client.AgentRelayFileGrant(nil).List(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(agent_relay_file_grants)
agent_relay_file_grant, err := client.AgentRelayFileGrant(nil).Load(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(agent_relay_file_grant)
created, err := client.AgentRelayFileGrant(nil).Create(map[string]any{"organization_id": "example", "access_mode": "example", "connection_id": "example", "expected_generation": 1, "key": "example", "resource_id": "example", "resource_kind": "example", "source_operation_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
removed, err := client.AgentRelayFileGrant(nil).Remove(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local agent_relay_file_grants, err = client:AgentRelayFileGrant():list({ organization_id = "example" })
local agent_relay_file_grant, err = client:AgentRelayFileGrant():load({ id = "example_id", organization_id = "example" })
local created, err = client:AgentRelayFileGrant():create({ organization_id = "example", access_mode = "example", connection_id = "example", expected_generation = 1, key = "example", resource_id = "example", resource_kind = "example", source_operation_id = "example" })
local removed, err = client:AgentRelayFileGrant():remove({ id = "example_id", organization_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$agent_relay_file_grants = $client->AgentRelayFileGrant()->list(["organization_id" => "example"]);
$agent_relay_file_grant = $client->AgentRelayFileGrant()->load(["id" => "example_id", "organization_id" => "example"]);
$created = $client->AgentRelayFileGrant()->create(["organization_id" => "example", "access_mode" => "example", "connection_id" => "example", "expected_generation" => 1, "key" => "example", "resource_id" => "example", "resource_kind" => "example", "source_operation_id" => "example"]);
$client->AgentRelayFileGrant()->remove(["id" => "example_id", "organization_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

agent_relay_file_grants = client.AgentRelayFileGrant().list({"organization_id": "example"})
agent_relay_file_grant = client.AgentRelayFileGrant().load({"id": "example_id", "organization_id": "example"})
created = client.AgentRelayFileGrant().create({ "organization_id": "example", "access_mode": "example", "connection_id": "example", "expected_generation": 1, "key": "example", "resource_id": "example", "resource_kind": "example", "source_operation_id": "example" })
client.AgentRelayFileGrant().remove({"id": "example_id", "organization_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

agent_relay_file_grants = client.AgentRelayFileGrant.list({ "organization_id" => "example" })
agent_relay_file_grant = client.AgentRelayFileGrant.load({ "id" => "example_id", "organization_id" => "example" })
created = client.AgentRelayFileGrant.create({ "organization_id" => "example", "access_mode" => "example", "connection_id" => "example", "expected_generation" => 1, "key" => "example", "resource_id" => "example", "resource_kind" => "example", "source_operation_id" => "example" })
client.AgentRelayFileGrant.remove({ "id" => "example_id", "organization_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const agent_relay_file_grants = await client.AgentRelayFileGrant().list({ organization_id: "example" })
const agent_relay_file_grant = await client.AgentRelayFileGrant().load({ id: "example_id", organization_id: "example" })
const created = await client.AgentRelayFileGrant().create({ organization_id: "example", access_mode: "example", connection_id: "example", expected_generation: 1, key: "example", resource_id: "example", resource_kind: "example", source_operation_id: "example" })
await client.AgentRelayFileGrant().remove({ id: "example_id", organization_id: "example" })

Fields

Field Type Required Description
access_mode string Yes Access Mode
connection_generation integer Yes Connection Generation
connection_id string Yes Connection Id
connection_name string Yes Current display name of the selected account.
created_at string Yes Created At
expected_generation integer Yes Expected Generation
id string Yes Id
key string Yes Key
provider string Yes Provider
resource_id string Yes Resource Id
resource_kind string Yes Resource Kind
revoked boolean Yes Revoked
revoked_at one,string,null Yes Revoked At
snapshot_supported boolean No Whether this selected permission supports snapshot controls.
source_operation_id string Yes Source Operation Id

create

POST /api/v1/organizations/{organization_id}/agent_relay_file_grants

Operation ID: post_api_v1_organizations_organization_id_agent_relay_file_grants.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Request body

application/json

Property Type Required Description
access_mode enum: read, read_write Yes
connection_id string Yes
expected_generation integer Yes
key string Yes
resource_id string Yes
resource_kind enum: notion_page, slack_channel Yes
source_operation_id string Yes

Responses

201: Selected resource permission

application/json

Property Type Required Description
grant object Yes
grant.access_mode enum: read, read_write Yes
grant.connection_generation integer Yes
grant.connection_id string Yes
grant.connection_name string Yes Current display name of the selected account.
grant.created_at string (date-time) Yes
grant.id string Yes
grant.provider enum: notion, slack Yes
grant.resource_id string Yes
grant.resource_kind enum: notion_page, slack_channel Yes
grant.revoked boolean Yes
grant.revoked_at string,null (date-time) Yes
grant.snapshot_supported boolean No Whether this selected permission supports snapshot controls. Each operation still requires current source and account access. Missing on older servers.
grant.source_operation_id string Yes
400: Malformed public resource ID

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Owner authentication required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Current source/account authority or provider-files rollout required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Owned resource not found

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
409: Original request or active resource conflicts; inspect the original permission

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid bounded request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No

list

GET /api/v1/organizations/{organization_id}/agent_relay_file_grants

Operation ID: api_v1_organization_agent_relay_file_grants.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
source_operation_id query string No
limit query integer No
cursor query string No
request_key query string No Read the original permission request for the selected source without reissuing consent.

Responses

200: Selected resource permission

application/json

Property Type Required Description
grants array of object Yes
grants[].access_mode enum: read, read_write Yes
grants[].connection_generation integer Yes
grants[].connection_id string Yes
grants[].connection_name string Yes Current display name of the selected account.
grants[].created_at string (date-time) Yes
grants[].id string Yes
grants[].provider enum: notion, slack Yes
grants[].resource_id string Yes
grants[].resource_kind enum: notion_page, slack_channel Yes
grants[].revoked boolean Yes
grants[].revoked_at string,null (date-time) Yes
grants[].snapshot_supported boolean No Whether this selected permission supports snapshot controls. Each operation still requires current source and account access. Missing on older servers.
grants[].source_operation_id string Yes
pagination object Yes
pagination.limit integer Yes
pagination.next string No
selection object,null Yes
selection.can_create boolean Yes
selection.source_operation_id string Yes
400: Malformed public resource ID

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Owner authentication required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Current source/account authority or provider-files rollout required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Owned resource not found

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid bounded request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No

load

GET /api/v1/organizations/{organization_id}/agent_relay_file_grants/{id}

Operation ID: api_v1_organization_agent_relay_file_grant.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Responses

200: Selected resource permission

application/json

Property Type Required Description
grant object Yes
grant.access_mode enum: read, read_write Yes
grant.connection_generation integer Yes
grant.connection_id string Yes
grant.connection_name string Yes Current display name of the selected account.
grant.created_at string (date-time) Yes
grant.id string Yes
grant.provider enum: notion, slack Yes
grant.resource_id string Yes
grant.resource_kind enum: notion_page, slack_channel Yes
grant.revoked boolean Yes
grant.revoked_at string,null (date-time) Yes
grant.snapshot_supported boolean No Whether this selected permission supports snapshot controls. Each operation still requires current source and account access. Missing on older servers.
grant.source_operation_id string Yes
400: Malformed public resource ID

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Owner authentication required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Current source/account authority or provider-files rollout required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Owned resource not found

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid bounded request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No

remove

DELETE /api/v1/organizations/{organization_id}/agent_relay_file_grants/{id}

Operation ID: delete_api_v1_organizations_organization_id_agent_relay_file_grants_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Responses

200: Selected resource permission

application/json

Property Type Required Description
grant object Yes
grant.access_mode enum: read, read_write Yes
grant.connection_generation integer Yes
grant.connection_id string Yes
grant.connection_name string Yes Current display name of the selected account.
grant.created_at string (date-time) Yes
grant.id string Yes
grant.provider enum: notion, slack Yes
grant.resource_id string Yes
grant.resource_kind enum: notion_page, slack_channel Yes
grant.revoked boolean Yes
grant.revoked_at string,null (date-time) Yes
grant.snapshot_supported boolean No Whether this selected permission supports snapshot controls. Each operation still requires current source and account access. Missing on older servers.
grant.source_operation_id string Yes
400: Malformed public resource ID

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Owner authentication required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Current source/account authority or provider-files rollout required

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Owned resource not found

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid bounded request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No