curl --request GET \
--url https://eu.phrase.com/styleguide/api/v1/styleguides/entities/{entityId}/styleguide-associations \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/styleguide/api/v1/styleguides/entities/{entityId}/styleguide-associations"
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/entities/{entityId}/styleguide-associations', 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/entities/{entityId}/styleguide-associations",
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/entities/{entityId}/styleguide-associations"
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/entities/{entityId}/styleguide-associations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/styleguides/entities/{entityId}/styleguide-associations")
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{
"language": "en-US",
"languageId": "en-US",
"styleGuide": {
"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"
},
"versionId": "018e1234-5678-7890-abcd-ef1234567891",
"versionNumber": 2,
"isDefault": true,
"latestVersionNumber": 3
},
"associationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-01-15T10:30:00Z",
"createdBy": "<string>",
"lastModifiedBy": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}Get Style Guide Association
Returns the style guide association details for the given entity and language, scoped to the authenticated user’s organization. Includes style guide info and the ID of the Style Guide version used. At least one of language or languageId must be provided. languageId is optional and required only for tenants that use custom language variants (for example, Strings). If custom variants are not used, provide only language. When languageId is not provided, language is used as the effective language ID for lookup. When both are provided, languageId is used for lookup. Entity type defaults to PROJECT. When no explicit association exists for the language, falls back to the organization’s default Style Guide (styleGuide.isDefault is true in that case); associationId and the audit timestamp/user fields are null in the fallback response since no association row exists.
curl --request GET \
--url https://eu.phrase.com/styleguide/api/v1/styleguides/entities/{entityId}/styleguide-associations \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/styleguide/api/v1/styleguides/entities/{entityId}/styleguide-associations"
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/entities/{entityId}/styleguide-associations', 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/entities/{entityId}/styleguide-associations",
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/entities/{entityId}/styleguide-associations"
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/entities/{entityId}/styleguide-associations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/styleguides/entities/{entityId}/styleguide-associations")
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{
"language": "en-US",
"languageId": "en-US",
"styleGuide": {
"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"
},
"versionId": "018e1234-5678-7890-abcd-ef1234567891",
"versionNumber": 2,
"isDefault": true,
"latestVersionNumber": 3
},
"associationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-01-15T10:30:00Z",
"createdBy": "<string>",
"lastModifiedBy": "<string>"
}{
"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
Entity ID (e.g. project ID)
Query Parameters
Tenant identifier. Allowable values: TMS, Strings, Studio.
TMS, Strings, Studio "TMS"
Entity type (e.g., PROJECT). Optional; defaults to PROJECT if omitted.
PROJECT, PROJECT_TEMPLATE "PROJECT"
Language code used to create the association. At least one of language or languageId must be provided. languageId is optional and required only for tenants that use custom language variants (for example, Strings). If custom variants are not used, provide only language.
"en-US"
Language identifier (languageId). At least one of language or languageId must be provided. languageId is optional and required only for tenants that use custom language variants (for example, Strings). If custom variants are not used, provide only language. When languageId is not provided, language is used for the lookup. When both are provided, languageId is used for the lookup.
"en-US"
Response
Style guide association details for the association
Details of a single Style Guide association: language, style guide, association id, timestamps, and audit fields.
Language code (BCP 47 or custom)
"en-US"
Language ID (same as request or derived from language code). languageId is optional in request inputs and required only for tenants that use custom language variants (for example, Strings). If custom variants are not used, callers provide language and language is used as the effective language ID.
"en-US"
Associated Style Guide (id, name, description, language, version).
Show child attributes
Show child attributes
UUID of the association (UUID v7). Null when this response was resolved via the organization's default Style Guide rather than an explicit association.
Timestamp when the association was created. Null when this response was resolved via the organization's default Style Guide.
"2024-01-15T10:30:00Z"
Timestamp when the association was last modified. Null when this response was resolved via the organization's default Style Guide.
"2024-01-15T10:30:00Z"
User ID of the user who created the association. Null when this response was resolved via the organization's default Style Guide.
User ID of the user who last modified the association. Null when this response was resolved via the organization's default Style Guide.
Was this page helpful?