Retrieve the list of styles defined for the project (scope: styles.read)
curl --request GET \
--url https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles', 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://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles",
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://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles"
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://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles")
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{
"workspace": "z3plqkvf52r",
"project": "3e95a13e7f1",
"colors": [
{
"id": "strong-blue",
"name": "Strong Blue",
"rgb": "0,102,204",
"cmyk": "100,50,0,20",
"hex": "#0066CC",
"pms": "300 C",
"pms2": "2935 U",
"ral": 5015
}
],
"types": [
{
"id": "body-small",
"name": "Body Small",
"family": "font-sohne-buch",
"size": 14,
"leading": 20,
"tracking": 0,
"casing": "none",
"spacing": 0,
"responsive": true,
"features": {}
}
]
}{
"error": "invalid_request",
"error_description": "workspace-id is required"
}{
"error": "invalid_client",
"error_description": "The client credentials are invalid"
}{
"error": "access_denied",
"error_description": "The scope 'projects.read' is required to access this resource"
}{
"error": "not_found",
"error_description": "The project has not been published"
}Project
Retrieve the list of styles defined for the project (scope: styles.read)
GET
/
workspace
/
{workspace-id}
/
project
/
{project-id}
/
styles
Retrieve the list of styles defined for the project (scope: styles.read)
curl --request GET \
--url https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles', 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://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles",
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://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles"
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://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.standards.site/beta/workspace/{workspace-id}/project/{project-id}/styles")
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{
"workspace": "z3plqkvf52r",
"project": "3e95a13e7f1",
"colors": [
{
"id": "strong-blue",
"name": "Strong Blue",
"rgb": "0,102,204",
"cmyk": "100,50,0,20",
"hex": "#0066CC",
"pms": "300 C",
"pms2": "2935 U",
"ral": 5015
}
],
"types": [
{
"id": "body-small",
"name": "Body Small",
"family": "font-sohne-buch",
"size": 14,
"leading": 20,
"tracking": 0,
"casing": "none",
"spacing": 0,
"responsive": true,
"features": {}
}
]
}{
"error": "invalid_request",
"error_description": "workspace-id is required"
}{
"error": "invalid_client",
"error_description": "The client credentials are invalid"
}{
"error": "access_denied",
"error_description": "The scope 'projects.read' is required to access this resource"
}{
"error": "not_found",
"error_description": "The project has not been published"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The identifier for the workspace
The identifier for the project in the workspace
Response
The list of styles was retrieved successfully
The workspace id (matches the workspace-id sent with the request)
Example:
"z3plqkvf52r"
The project id (matches the project-id sent with the request)
Example:
"3e95a13e7f1"
The color styles that have been defined for the project
Show child attributes
Show child attributes
The type styles that have been defined for the project
Show child attributes
Show child attributes