Get terminal
Get information about terminals and terminal sessions.
All terminals
GET /terminals
Summary: Retrieve all terminals, or all terminals with a specified statuses value. Setting statuses to Available, for example,
will return a list of all terminals that are currently ready to use. Because statuses is an optional request field, leaving it blank will return a list of all terminals of all statuses.
- cURL
- Python
- PowerShell
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
curl --location --request GET 'https://api.dojo.tech/terminals?statuses=Available' \
--header 'version: 2024-02-05' \
--header 'software-house-id: softwareHouse1' \
--header 'reseller-id: reseller1' \
--header 'Accept: application/json' \
--header 'Authorization: Basic sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ'
import http.client
import json
conn = http.client.HTTPSConnection("api.dojo.tech")
payload = ''
headers = {
'version': '2024-02-05',
'software-house-id': 'softwareHouse1',
'reseller-id': 'reseller1',
'Accept': 'application/json',
'Authorization': 'Basic sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ'
}
conn.request("GET", "/terminals?statuses=Available", payload, headers)
res = conn.getresponse()
data = res.read()
json_data = json.loads(data.decode("utf-8"))
pretty_json = json.dumps(json_data, indent=2)
print(pretty_json)
conn.close()
# The sandbox API key passed in '$publicSandboxKey' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
$publicSandboxKey = "sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ"
Invoke-WebRequest `
-Uri 'https://api.dojo.tech/terminals?statuses=Available'`
-Method GET `
-Headers @{
"Version" = "2024-02-05"
"Authorization" = "Basic $publicSandboxKey"
"software-house-id" = "softwareHouse1"
"reseller-id" = "reseller1"
}
A specified terminal
Summary: Retrieve a specified terminal using its terminalId.
- cURL
- Python
- PowerShell
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
curl --location --request GET 'https://api.dojo.tech/terminals/tm_sandbox_65aaa2a8637e6374ac2447c9' \
--header 'version: 2024-02-05' \
--header 'software-house-id: softwareHouse1' \
--header 'reseller-id: reseller1' \
--header 'Accept: application/json' \
--header 'Authorization: Basic sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ'
import http.client
import json
conn = http.client.HTTPSConnection("api.dojo.tech")
payload = ''
headers = {
'version': '2024-02-05',
'software-house-id': 'softwareHouse1',
'reseller-id': 'reseller1',
'Accept': 'application/json',
'Authorization': 'Basic sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ'
}
conn.request("GET", "/terminals/tm_sandbox_65aaa2a8637e6374ac2447c9", payload, headers)
res = conn.getresponse()
data = res.read()
json_data = json.loads(data.decode("utf-8"))
pretty_json = json.dumps(json_data, indent=2)
print(pretty_json)
conn.close()
# The sandbox API key passed in '$publicSandboxKey' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
$publicSandboxKey = "sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ"
Invoke-WebRequest `
-Uri 'https://api.dojo.tech/terminals/tm_sandbox_65aaa2a8637e6374ac2447c9'`
-Method GET `
-Headers @{
"Version" = "2024-02-05"
"Authorization" = "Basic $publicSandboxKey"
"software-house-id" = "softwareHouse1"
"reseller-id" = "reseller1"
}
A terminal session
GET /terminal-sessions/{terminalSessionId}
Summary: Retrieve a specified terminal session by searching for the terminalSessionId while using the /terminal-sessions
endpoint.
- cURL
- Python
- PowerShell
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
curl --location --request GET 'https://api.dojo.tech/terminal-sessions/ts_sandbox_65aa64bf637e6374ac244115' \
--header 'version: 2024-02-05' \
--header 'software-house-id: softwareHouse1' \
--header 'reseller-id: reseller1' \
--header 'Accept: application/json' \
--header 'Authorization: Basic sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ'
import http.client
import json
conn = http.client.HTTPSConnection("api.dojo.tech")
payload = ''
headers = {
'version': '2024-02-05',
'software-house-id': 'softwareHouse1',
'reseller-id': 'reseller1',
'Accept': 'application/json',
'Authorization': 'Basic sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ'
}
conn.request("GET", "/terminal-sessions/ts_sandbox_65aa64bf637e6374ac244115", payload, headers)
res = conn.getresponse()
data = res.read()
json_data = json.loads(data.decode("utf-8"))
pretty_json = json.dumps(json_data, indent=2)
print(pretty_json)
conn.close()
# The sandbox API key passed in '$publicSandboxKey' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
$publicSandboxKey = "sk_sandbox_1WYDtq7yAdqhmQ7KEUAvPlCCRBYc9HTY9KOPJKZtfWkzsSISj1L8c4GG5l4pBB5Bj85hkJgTL9vmOmki5QnQfQ"
Invoke-WebRequest `
-Uri 'https://api.dojo.tech/terminal-sessions/ts_sandbox_65aa64bf637e6374ac244115'`
-Method GET `
-Headers @{
"Version" = "2024-02-05"
"Authorization" = "Basic $publicSandboxKey"
"software-house-id" = "softwareHouse1"
"reseller-id" = "reseller1"
}