ArtefactViewToken
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}/artefacts/{artefact_ref}/view_tokens |
create |
Short-lived viewer handshake URL |
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:
created, err := client.ArtefactViewToken(nil).Create(map[string]any{"artefact_id": "example", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local created, err = client:ArtefactViewToken():create({ artefact_id = "example", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$created = $client->ArtefactViewToken()->create(["artefact_id" => "example", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
created = client.ArtefactViewToken().create({ "artefact_id": "example", "organization_id": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
created = client.ArtefactViewToken.create({ "artefact_id" => "example", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const created = await client.ArtefactViewToken().create({ artefact_id: "example", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
expires_in |
integer |
Yes | Expires In |
file |
string |
No | Exact manifest path. |
organization_slug |
string |
No | If provided, must match the organization addressed by the route. |
version |
integer |
No | Version |
viewer_url |
string |
Yes | Viewer Url |
create
POST /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/view_tokens
Operation ID: view_tokens_api_v1_organization_artefact.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
artefact_ref |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
file |
string |
No | Exact manifest path. Defaults to the revision entrypoint. |
organization_slug |
string |
No | If provided, must match the organization addressed by the route. |
version |
integer |
No |
Responses
200: Short-lived viewer handshake URL
application/json
| Property | Type | Required | Description |
|---|---|---|---|
expires_in |
integer |
Yes | |
viewer_url |
string (uri) |
Yes |