List shares
Code Mode: praxis.share.permissions.list
HTTP: GET /share/v1/permissions
Find the shares of this organization, newest first, for example every link that exposes one file before you decide which to revoke. Filter by resource_type, resource_id and status; filters combine with AND. Continue with next_page_token as page_token until next_page_token is null. Records never include link.web_url. A credential bound to specific files must pass resource_type and resource_id of a bound file, and an unbound file answers 404.
Signature
praxis.share.permissions.list(args?:{query?:{resource_type?:"file"|"artifact"|"canvas"|"media_asset"|"agent";resource_id?:string;status?:"active"|"expired"|"revoked";page_size?:number;page_token?:string}}):Promise<{/** Shares in this page; continue with next_page_token when it is not null. */ data:Array<{/** Share id, shr_ followed by 32 lowercase letters or digits; use it to retrieve or delete the share. */ id:string;/** Object type tag; always share.permission. */ object:"share.permission";/** The organization that owns the share, taken from the credential that created it. */ organization_id:string;resource:{/** What kind of object is shared; file, canvas, media_asset and agent create today. e.g. "file" */ type:"file"|"artifact"|"canvas"|"media_asset"|"agent";/** Id of the object within its type. */ id:string};/** What the link grants; read only. */ roles:Array<"read">;link:{/** What the link allows; view, which is read-only, is the only type. */ type:"view";/** Who can open the link; anonymous, meaning anyone holding it, is the only scope. */ scope:"anonymous";/** Whether the link asks viewers not to download; a limit, not a guarantee. */ prevents_download:boolean;/** The link address to give to people; present only in the creation response, since the service stores a hash of it and cannot show it again. */ web_url?:string};/** ISO 8601 instant after which the link answers 410, or null when it never expires. */ expire_time:string|null;/** Current state of the link; expired is derived from expire_time and revoked comes from delete. */ status:"active"|"expired"|"revoked";/** Who created the share, in the form user:{id}; the user behind the API key or session that made the call. */ created_by:string;/** When the share was created, ISO 8601. */ create_time:string;/** When the share was deleted, ISO 8601, or null while it has not been. */ revoke_time:string|null;/** How many times the link was opened. */ open_count:number;/** When the link was last opened, ISO 8601, or null if it never was. */ last_open_time:string|null}>;/** Opaque token for page_token on the next request; null when no more shares remain. */ next_page_token:string|null}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| resource_type | query | “file” | “artifact” | “canvas” | “media_asset” | “agent” | no | Only shares of this object type; file, canvas, media_asset and agent create today. |
| resource_id | query | string | no | Only shares of the object with this id, for example a file id from the File API or a media asset’s library_id/asset_id; combine with resource_type. |
| status | query | “active” | “expired” | “revoked” | no | Only shares in this state; omit to list every state. |
| page_size | query | number | no | Maximum shares in one page, from 1 to 100; defaults to 50. |
| page_token | query | string | no | Opaque next_page_token from the preceding page with the same filters; omit on the first request. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | One page of shares, newest first. |
| 400 | application/json | INVALID_PARAMS means a body field, query value or identifier violates the documented format, or a field is not supported; RESOURCE_TYPE_UNSUPPORTED means the resource type cannot be shared yet. Correct the indicated field; the message names it. |
| 401 | application/json | The bearer API key is missing or invalid; provide a valid Praxis API key before retrying. |
| 403 | application/json | PERMISSION_DENIED means the credential cannot perform this operation, or is bound to specific files and listed without naming one; use a key with share access, or pass resource_type and resource_id of a bound file. |
| 404 | application/json | RESOURCE_NOT_FOUND means the object to share does not exist in this organization, or the credential is not bound to it; read the file id from the File API and retry. |
| 500 | application/json | INTERNAL means the service could not complete the request; for a create, list shares for the file before retrying so the same object is not exposed twice. |