curl --request GET \
--url https://eu.phrase.com/styleguide/api/v1/rules/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/styleguide/api/v1/rules/{id}"
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/rules/{id}', 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/rules/{id}",
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/rules/{id}"
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/rules/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/rules/{id}")
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{
"id": "01900000-0000-7000-8000-000000000001",
"rule": "Avoid passive voice in all user-facing content.",
"active": true,
"aiCheckEnabled": true,
"allContentGroups": true,
"allLanguages": true,
"contentGroups": [
{
"id": "cg-marketing-en"
}
],
"languages": [
{
"bcpCode": "en-GB",
"description": "English (United Kingdom)",
"language": "cs",
"region": "gb",
"script": "LATN"
}
],
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-06-01T14:22:00Z",
"name": "No passive voice",
"omittedReason": "<string>",
"eligibilityCheckedAt": "2024-06-01T14:22:05Z",
"styleGuide": null,
"createdBy": null,
"lastModifiedBy": null
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}Get a Rule
Returns a Rule by ID.
curl --request GET \
--url https://eu.phrase.com/styleguide/api/v1/rules/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/styleguide/api/v1/rules/{id}"
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/rules/{id}', 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/rules/{id}",
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/rules/{id}"
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/rules/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/rules/{id}")
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{
"id": "01900000-0000-7000-8000-000000000001",
"rule": "Avoid passive voice in all user-facing content.",
"active": true,
"aiCheckEnabled": true,
"allContentGroups": true,
"allLanguages": true,
"contentGroups": [
{
"id": "cg-marketing-en"
}
],
"languages": [
{
"bcpCode": "en-GB",
"description": "English (United Kingdom)",
"language": "cs",
"region": "gb",
"script": "LATN"
}
],
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-06-01T14:22:00Z",
"name": "No passive voice",
"omittedReason": "<string>",
"eligibilityCheckedAt": "2024-06-01T14:22:05Z",
"styleGuide": null,
"createdBy": null,
"lastModifiedBy": null
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}Authorizations
JWT from IDM (Authorization: Bearer )
Path Parameters
Rule ID
Response
Rule retrieved successfully
Rule details
Unique identifier for this Rule
"01900000-0000-7000-8000-000000000001"
The rule text
"Avoid passive voice in all user-facing content."
Whether this rule is active
Whether this rule is used during AI-powered quality checks
Whether this rule applies to all content groups
Whether this rule applies to all languages
Content Groups this rule applies to. Empty list means all content groups. Null means no content groups are assigned.
Show child attributes
Show child attributes
Language details for languages this rule applies to. Empty list means all languages. Null means no languages are assigned.
Show child attributes
Show child attributes
When this rule was created
"2024-01-15T10:30:00Z"
When this rule was last modified
"2024-06-01T14:22:00Z"
A short, system-generated name indicating this rule's purpose. Never user-entered; automatically generated, so it may be absent shortly after the rule is created.
"No passive voice"
Reason this rule is omitted from AI checks, as determined by an automated eligibility check. Absent if the rule is eligible, or if the check hasn't completed yet.
When the automated AI-check eligibility check last completed for this rule. Null means it hasn't run yet: eligibility is still pending, so a client should treat the AI-check state as 'checking' rather than eligible. Once set, a null omittedReason means eligible and a non-null omittedReason means omitted.
"2024-06-01T14:22:05Z"
Style Guide this rule was extracted from. Null when the rule is unlinked — either manually created or subsequently edited.
User who created this rule
User who last modified this rule
Was this page helpful?