/v1/apps/{applicationId}/grants/{resourceId}When to use
Approve or revoke an app’s resource or subsystem access.
For agents
Requires app admin and the shared target grant-management authority. Use level: null to revoke with app admin alone. Grants never give the user additional permissions or expose raw access to an action’s underlying sources. For all resources of a type, use resourceId * and an explicit resourceType, such as dataset. New grants support whole resources and resource-type wildcards, with optional expiry. Table, row, and column scopes within a shared source are not supported by current source query APIs, including databases, datasets, connectors, and operation outputs. For narrower reads, share separately filtered Data Flow outputs while keeping broader sources restricted, or use an approved caller-filtered Business Action. Existing scoped app grants can be revoked with level: null and their original subResourceId; other scoped grants use the permission deletion API. A grant does not expose additional app-session APIs. Existing apps require explicit grants before their data API calls can run.
Example
import { PermuteClient } from '@permute/sdk';
const orgClient = new PermuteClient({
apiKey: process.env.PERMUTE_API_KEY!,
});
const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);
const result = await client.apps.setGrant('appl_abcdefghijklmnopqrstuvwx', 'actn_abcdefghijklmnopqrstuvwx', {
"level": "write"
});Request body
{
"level": "write"
}Response
{
"data": {
"items": [
{
"resourceId": "actn_abcdefghijklmnopqrstuvwx",
"resourceType": "businessAction",
"level": "write",
"expiresAt": null
}
],
"canManage": true
}
}