import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translations/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translations/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translations/ \
--header 'Authorization: Bearer <token>'{
"language": "<string>",
"status": "running",
"translations": {},
"translated_count": 123,
"total_count": 123,
"error": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Get a cached transcript translation
The cached translation of the transcript in one language, as started by the
translate endpoint. translations maps each message’s key to its translated
text (see InterviewTranscriptTranslation); translated_count / total_count
track progress while status is running.
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translations/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translations/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translations/ \
--header 'Authorization: Bearer <token>'{
"language": "<string>",
"status": "running",
"translations": {},
"translated_count": 123,
"total_count": 123,
"error": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..
Query Parameters
ISO language code of the translation to fetch.
Response
Successful response
Cached machine translation of an interview transcript into one language.
translations maps a message key to the translated text of that transcript
bubble.
The key is a 16-hex-character (zero-padded, lower-case) FNV-1a 64 hash over the
UTF-8 bytes of role + US + speaker + US + content, where US is the ASCII
unit separator (code point 31) and speaker is the empty string when absent.
Keys are computed from chat_history entries of type message with role
user or assistant, excluding panel-bound entries (to: "panel") and blank
content, so identical bubbles share one key and a cache survives an in-progress
interview growing. Bubbles without an entry are not translated yet.
ISO language code of the translation.
running, ready, failed Message key → translated text.
Show child attributes
Show child attributes
Current transcript messages that have a translation.
Current transcript messages eligible for translation.
Stable failure message when status is failed; retry by calling translate again (already translated messages are kept).