Get update job status
curl --request GET \
--url https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"result": {
"id": "018e1234-5678-7890-abcd-ef1234567890",
"name": "English Style Guide",
"description": "Style guide for English content",
"language": {
"bcpCode": "en-GB",
"description": "English (United Kingdom)",
"language": "cs",
"region": "gb",
"script": "LATN"
},
"isDefault": false,
"createdBy": {
"id": "0015oCjtouINgRCDIvQtjo",
"username": "john.doe",
"fullName": "John Doe",
"email": "john.doe@example.com",
"avatarUrl": "https://example.com/avatars/john-doe.png"
},
"lastModifiedBy": {
"id": "0015oCjtouINgRCDIvQtjo",
"username": "john.doe",
"fullName": "John Doe",
"email": "john.doe@example.com",
"avatarUrl": "https://example.com/avatars/john-doe.png"
},
"contentGroup": {
"id": "my-content-group"
},
"versions": [
{
"id": "018e1234-5678-7890-abcd-ef1234567890",
"versionNumber": 1,
"name": "English Style Guide v1",
"description": "Initial version of the style guide",
"changeNotes": "Updated grammar rules and added new terminology",
"fileName": "StyleGuide.md",
"fileSizeBytes": 1024,
"fileType": "text/markdown",
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-01-15T10:30:00Z",
"lastModifiedBy": {
"id": "0015oCjtouINgRCDIvQtjo",
"username": "john.doe",
"fullName": "John Doe",
"email": "john.doe@example.com",
"avatarUrl": "https://example.com/avatars/john-doe.png"
},
"contentGroup": {
"id": "my-content-group"
}
}
],
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-01-15T10:30:00Z",
"extractedRulesCount": 25
},
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}Style Guide
Get update job status
Returns the current state of a Style Guide update job. HTTP status is always 200; switch on the body’s status field.
GET
/
api
/
v1
/
styleguides
/
async
/
update-jobs
/
{jobId}
Get update job status
curl --request GET \
--url https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/styleguides/async/update-jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"result": {
"id": "018e1234-5678-7890-abcd-ef1234567890",
"name": "English Style Guide",
"description": "Style guide for English content",
"language": {
"bcpCode": "en-GB",
"description": "English (United Kingdom)",
"language": "cs",
"region": "gb",
"script": "LATN"
},
"isDefault": false,
"createdBy": {
"id": "0015oCjtouINgRCDIvQtjo",
"username": "john.doe",
"fullName": "John Doe",
"email": "john.doe@example.com",
"avatarUrl": "https://example.com/avatars/john-doe.png"
},
"lastModifiedBy": {
"id": "0015oCjtouINgRCDIvQtjo",
"username": "john.doe",
"fullName": "John Doe",
"email": "john.doe@example.com",
"avatarUrl": "https://example.com/avatars/john-doe.png"
},
"contentGroup": {
"id": "my-content-group"
},
"versions": [
{
"id": "018e1234-5678-7890-abcd-ef1234567890",
"versionNumber": 1,
"name": "English Style Guide v1",
"description": "Initial version of the style guide",
"changeNotes": "Updated grammar rules and added new terminology",
"fileName": "StyleGuide.md",
"fileSizeBytes": 1024,
"fileType": "text/markdown",
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-01-15T10:30:00Z",
"lastModifiedBy": {
"id": "0015oCjtouINgRCDIvQtjo",
"username": "john.doe",
"fullName": "John Doe",
"email": "john.doe@example.com",
"avatarUrl": "https://example.com/avatars/john-doe.png"
},
"contentGroup": {
"id": "my-content-group"
}
}
],
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-01-15T10:30:00Z",
"extractedRulesCount": 25
},
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}Authorizations
JWT from IDM (Authorization: Bearer )
Path Parameters
Response
Job status. When status is FAILED, the error.code field indicates the reason: DUPLICATE_CONTENT_GROUP_LANGUAGE (a Style Guide for this language is already linked to the Content Group), STYLEGUIDE_NOT_FOUND (style guide was deleted before the job ran), CONTENT_GROUP_NOT_FOUND (content group no longer exists), SERVICE_UNAVAILABLE (upstream dependency temporarily unavailable), STYLE_GUIDE_RULES_EXTRACTION_ERROR (rules extraction failed), STYLE_GUIDE_ANALYSIS_ERROR (AI analysis unavailable), JOB_CANCELLED (job was cancelled), JOB_FAILED (unexpected worker failure).
Was this page helpful?
⌘I