Get action result
Returns the stored status and result of an action. Use this to poll actions that returned 202; HTTP 200 can contain any action status. Stored observations contain metadata with empty tree and refs, not the full snapshot; submit a fresh observe action to obtain current refs.
GET
/
browser_sessions
/
{id}
/
actions
/
{actionId}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.browserSessions.actions.retrieve('id', 'actionId');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.browser_sessions.actions.retrieve(
"id",
"actionId",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.BrowserSessions.Actions.Get(
context.TODO(),
"id",
"actionId",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.browserSessions().actions().retrieve("id", "actionId");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.browser_sessions.actions.retrieve("id", "actionId")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->browserSessions->actions->retrieve(
'id',
'actionId',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx browser-sessions:actions retrieve \
--api-key 'My API Key' \
--id id \
--action-id actionIdcurl --request GET \
--url https://api.telnyx.com/v2/browser_sessions/{id}/actions/{actionId} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "bact_075cfdc9-...",
"session_id": "<string>",
"seq": 123,
"type": "<string>",
"status": "queued",
"result": {
"url": "<string>",
"title": "<string>",
"observation": {
"observation_id": "<string>",
"url": "<string>",
"title": "<string>",
"refs": {},
"tree": "<string>",
"truncated": true,
"ref_count": 123
},
"artifact": {
"artifact_id": "<string>",
"content_type": "<string>",
"size_bytes": 123
},
"results": [
{}
]
},
"request": {},
"error": {
"code": "<string>",
"retryable": true
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"error": {
"code": "not_found",
"message": "session not found",
"retryable": false
}
}Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.browserSessions.actions.retrieve('id', 'actionId');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.browser_sessions.actions.retrieve(
"id",
"actionId",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.BrowserSessions.Actions.Get(
context.TODO(),
"id",
"actionId",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.browserSessions().actions().retrieve("id", "actionId");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.browser_sessions.actions.retrieve("id", "actionId")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->browserSessions->actions->retrieve(
'id',
'actionId',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx browser-sessions:actions retrieve \
--api-key 'My API Key' \
--id id \
--action-id actionIdcurl --request GET \
--url https://api.telnyx.com/v2/browser_sessions/{id}/actions/{actionId} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "bact_075cfdc9-...",
"session_id": "<string>",
"seq": 123,
"type": "<string>",
"status": "queued",
"result": {
"url": "<string>",
"title": "<string>",
"observation": {
"observation_id": "<string>",
"url": "<string>",
"title": "<string>",
"refs": {},
"tree": "<string>",
"truncated": true,
"ref_count": 123
},
"artifact": {
"artifact_id": "<string>",
"content_type": "<string>",
"size_bytes": 123
},
"results": [
{}
]
},
"request": {},
"error": {
"code": "<string>",
"retryable": true
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"error": {
"code": "not_found",
"message": "session not found",
"retryable": false
}
}