MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Response body format:
{
  "status": "success" | "error",
  "error"?: string,
  "data": any
}

Here is a list of general errors that could occur on almost every request:

Base URL

https://api.trops.io

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Languages

Index

Example request:
curl --request GET \
    --get "https://api.trops.io/languages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.trops.io/languages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.trops.io/languages',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
  "status": "success",
  "data": {
    "languages": [
      "aa",
      "ab",
      "ae",
      ...
    ]
  }
}
         

Request   

GET languages

Branches

Store

requires authentication

Example request:
curl --request POST \
    "https://api.trops.io/projects/e29b6898-0dea-3ccd-9f97-7be87dfec6f5/branches" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"new_branch\"
}"
const url = new URL(
    "https://api.trops.io/projects/e29b6898-0dea-3ccd-9f97-7be87dfec6f5/branches"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "new_branch"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/projects/e29b6898-0dea-3ccd-9f97-7be87dfec6f5/branches',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'new_branch',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": {
        "name": "new_branch",
        "term_count": 0,
        "terms": [],
        "uuid": "a369d404-b241-4968-a0f1-86bbe2a53613"
    }
}
         

Request   

POST projects/{project_uuid}/branches

URL Parameters

project_uuid   string  

Body Parameters

name   string  

Validation rules:
max:100
unique:branches,project_id

Delete

requires authentication

Example request:
curl --request DELETE \
    "https://api.trops.io/branches/e4b38d37-4d78-344c-a6ba-ed2052a5fae2" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.trops.io/branches/e4b38d37-4d78-344c-a6ba-ed2052a5fae2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.trops.io/branches/e4b38d37-4d78-344c-a6ba-ed2052a5fae2',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": null
}
         

Example response (403):

                    
          {
    "status": "error",
    "error": "delete_main_branch",
    "data": null
}
         

Request   

DELETE branches/{uuid}

URL Parameters

uuid   string  

Users

Register

Example request:
curl --request POST \
    "https://api.trops.io/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"email\": \"john.doe@example.com\",
    \"password\": \"4xY63RnDTF\",
    \"language\": \"en\",
    \"password_confirmation\": \"4xY63RnDTF\"
}"
const url = new URL(
    "https://api.trops.io/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "password": "4xY63RnDTF",
    "language": "en",
    "password_confirmation": "4xY63RnDTF"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/register',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'John Doe',
            'email' => 'john.doe@example.com',
            'password' => '4xY63RnDTF',
            'language' => 'en',
            'password_confirmation' => '4xY63RnDTF',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": {
        "uuid": "40e6a8ed-a025-4fc1-bd2e-2eafaf189a46"
    }
}
         

Request   

POST register

Body Parameters

name   string  

email   string  

Validation rules:
email
unique:users

password   string  

Validation rules:
min:8
max:64
mixed_case
contains_number

language   string (optional)  

Defaults to en.
Validation rules:
size:2
exists:languages,code

password_confirmation   string  

Must be identical with password

Verify

Example request:
curl --request POST \
    "https://api.trops.io/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"f4da622b-1219-4dab-aa00-53282d85651b\",
    \"expires\": 1642722362,
    \"signature\": \"b757e0008873ff1e73dc7e530cdd38b513c633629e9a451c6f62491c1ea5d8c9\"
}"
const url = new URL(
    "https://api.trops.io/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "uuid": "f4da622b-1219-4dab-aa00-53282d85651b",
    "expires": 1642722362,
    "signature": "b757e0008873ff1e73dc7e530cdd38b513c633629e9a451c6f62491c1ea5d8c9"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/verify',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'uuid' => 'f4da622b-1219-4dab-aa00-53282d85651b',
            'expires' => 1642722362,
            'signature' => 'b757e0008873ff1e73dc7e530cdd38b513c633629e9a451c6f62491c1ea5d8c9',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": null
}
         

Example response (403):

                    
          {
    "status": "error",
    "error": "invalid_signature",
    "data": null
}
         

Example response (409):

                    
          {
    "status": "error",
    "error": "already_verified",
    "data": null
}
         

Request   

POST verify

Body Parameters

uuid   string  

The uuid of the user that should be verified.
Validation rules:
uuid

expires   integer  

A timestamp when this verification will expire.
Validation rules:
numeric

signature   string  

Validation rules:
size:64

Login

Example request:
curl --request POST \
    "https://api.trops.io/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"john.doe@example.com\",
    \"password\": \"4xY63RnDTF\"
}"
const url = new URL(
    "https://api.trops.io/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "john.doe@example.com",
    "password": "4xY63RnDTF"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/login',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'john.doe@example.com',
            'password' => '4xY63RnDTF',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": {
        "uuid": "ac41c471-0acb-3f89-bcda-ff8df2e3ba51",
        "language": "sk",
        "token": "1|v0ee69I7NOqBXjz4iiVBuuKAKhz3or1FGCVtNpmS"
    }
}
         

Example response (401):

                    
          {
    "status": "error",
    "error": "wrong_credentials",
    "data": null
}
         

Example response (401):

                    
          {
    "status": "error",
    "error": "not_verified",
    "data": null
}
         

Request   

POST login

Body Parameters

email   string  

Validation rules:
email

password   string  

Validation rules:
max:64

OAuth URL

Example request:
curl --request GET \
    --get "https://api.trops.io/login/github?language=en" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.trops.io/login/github"
);

const params = {
    "language": "en",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.trops.io/login/github',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'language'=> 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
  "status": "success",
  "data": {
    "url": "https://github.com/login/oauth/authorize?client_id=1234&redirect_uri=http://api.trops.io/login/github/callback&scope=user:email&response_type=code
  }
}
         

Request   

GET login/{provider}

URL Parameters

provider   string  

The provider to use for OAuth. Valid values are github, google.

Query Parameters

language   string (optional)  

Only needed if a new user is created.
Defaults to en.
Validation rules:
size:2
exists:languages,code

Logout

requires authentication

Example request:
curl --request POST \
    "https://api.trops.io/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"all\": true
}"
const url = new URL(
    "https://api.trops.io/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "all": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/logout',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'all' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": null
}
         

Example response (403):

                    
          {
    "status": "error",
    "error": "not_auth_token",
    "data": null
}
         

Request   

POST logout

Body Parameters

all   boolean (optional)  

Defaults to false. If this is set to true all API tokens of the current user will be invalidated.

Projects

Index

requires authentication

Example request:
curl --request GET \
    --get "https://api.trops.io/projects" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.trops.io/projects"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.trops.io/projects',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": {
        "projects": [
            {
                "color": "#20603D",
                "branches": [
                    {
                        "name": "main",
                        "term_count": 1,
                        "uuid": "a6a2ff68-a4b7-4f4c-840a-9c1369f35c69"
                    }
                ],
                "default_lang": "en",
                "description": "My first project",
                "languages": [
                    "en",
                    "de",
                    "fr"
                ],
                "name": "Project One",
                "uuid": "613c6064-a23b-4166-bbdc-f25fb22f4e92"
            }
        ]
    }
}
         

Request   

GET projects

Store

requires authentication

Example request:
curl --request POST \
    "https://api.trops.io/projects" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Project One\",
    \"description\": \"My first project\",
    \"default_lang\": \"en\",
    \"color\": \"#20603D\",
    \"languages\": [
        \"en\",
        \"de\",
        \"fr\"
    ]
}"
const url = new URL(
    "https://api.trops.io/projects"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Project One",
    "description": "My first project",
    "default_lang": "en",
    "color": "#20603D",
    "languages": [
        "en",
        "de",
        "fr"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/projects',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Project One',
            'description' => 'My first project',
            'default_lang' => 'en',
            'color' => '#20603D',
            'languages' => [
                'en',
                'de',
                'fr',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": {
        "color": "#20603D",
        "branches": [
            {
                "name": "main",
                "term_count": 0,
                "uuid": "a6a2ff68-a4b7-4f4c-840a-9c1369f35c69"
            }
        ],
        "default_lang": "en",
        "description": "My first project",
        "languages": [
            "en",
            "de",
            "fr"
        ],
        "name": "Project One",
        "uuid": "613c6064-a23b-4166-bbdc-f25fb22f4e92"
    }
}
         

Request   

POST projects

Body Parameters

name   string  

Validation rules:
max:50

description   string (optional)  

default_lang   string (optional)  

Defaults to en.
Validation rules:
size:2
exists:languages,code

color   string (optional)  

Defaults to a random hex color.
Validation rules:
size:7
hex_color

languages   string[] (optional)  

Validation rules:
size:2
exists:languages,code

Show

requires authentication

Example request:
curl --request GET \
    --get "https://api.trops.io/projects/3191a22d-bdcd-3d76-8645-df282d3dfc47?branch=6c5bac24-df7f-4e87-8f97-8f9f77ddc965" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.trops.io/projects/3191a22d-bdcd-3d76-8645-df282d3dfc47"
);

const params = {
    "branch": "6c5bac24-df7f-4e87-8f97-8f9f77ddc965",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.trops.io/projects/3191a22d-bdcd-3d76-8645-df282d3dfc47',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'branch'=> '6c5bac24-df7f-4e87-8f97-8f9f77ddc965',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": {
        "color": "#c3e6f8",
        "branch": {
            "uuid": "a6a2ff68-a4b7-4f4c-840a-9c1369f35c69",
            "name": "main",
            "term_count": 2,
            "terms": {
                "bbc70d55-2b64-43e9-9cd3-6ecffdfaba8b": {
                    "term": "term-1",
                    "terms": {
                        "3f747e12-6a47-4a61-8242-c8770bbc21ba": {
                            "term": "nested-term"
                        }
                    }
                }
            }
        },
        "branches": [
            {
                "name": "main",
                "term_count": 2,
                "uuid": "a6a2ff68-a4b7-4f4c-840a-9c1369f35c69"
            }
        ],
        "default_lang": "en",
        "description": "My first project",
        "languages": [
            "en",
            "de",
            "fr"
        ],
        "name": "Project One",
        "uuid": "613c6064-a23b-4166-bbdc-f25fb22f4e92"
    }
}
         

Request   

GET projects/{uuid}

URL Parameters

uuid   string  

Query Parameters

branch   string (optional)  

Defaults to the uuid of the main branch. UUID of a branch of this project to return the branch specific terms.

Update

requires authentication

Example request:
curl --request PUT \
    "https://api.trops.io/projects/0949c36b-6d99-32db-962a-2349d4f96bb6" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"New project name\",
    \"description\": \"My updated project description\",
    \"default_lang\": \"ru\",
    \"color\": \"#FF905A\",
    \"languages\": [
        \"pt\",
        \"hi\",
        \"tr\"
    ]
}"
const url = new URL(
    "https://api.trops.io/projects/0949c36b-6d99-32db-962a-2349d4f96bb6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "New project name",
    "description": "My updated project description",
    "default_lang": "ru",
    "color": "#FF905A",
    "languages": [
        "pt",
        "hi",
        "tr"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.trops.io/projects/0949c36b-6d99-32db-962a-2349d4f96bb6',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'New project name',
            'description' => 'My updated project description',
            'default_lang' => 'ru',
            'color' => '#FF905A',
            'languages' => [
                'pt',
                'hi',
                'tr',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": {
        "color": "#FF905A",
        "branches": [
            {
                "name": "main",
                "term_count": 1,
                "uuid": "a6a2ff68-a4b7-4f4c-840a-9c1369f35c69"
            }
        ],
        "default_lang": "ru",
        "description": "My updated project description",
        "languages": [
            "hi",
            "pt",
            "ru",
            "tr"
        ],
        "name": "New project name",
        "uuid": "613c6064-a23b-4166-bbdc-f25fb22f4e92"
    }
}
         

Request   

PUT projects/{uuid}

URL Parameters

uuid   string  

Body Parameters

name   string  

Validation rules:
max:50

description   string (optional)  

default_lang   string (optional)  

Defaults to en.
Validation rules:
size:2
exists:languages,code

color   string (optional)  

Defaults to a random hex color.
Validation rules:
size:7
hex_color

languages   string[] (optional)  

Validation rules:
size:2
exists:languages,code

Delete

requires authentication

Example request:
curl --request DELETE \
    "https://api.trops.io/projects/3ec10078-8967-33c0-9ba6-aee36f06c331" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.trops.io/projects/3ec10078-8967-33c0-9ba6-aee36f06c331"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.trops.io/projects/3ec10078-8967-33c0-9ba6-aee36f06c331',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                    
          {
    "status": "success",
    "data": null
}
         

Request   

DELETE projects/{uuid}

URL Parameters

uuid   string  

Endpoints

GET _ignition/health-check

requires authentication

Example request:
curl --request GET \
    --get "https://api.trops.io/_ignition/health-check" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.trops.io/_ignition/health-check"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.trops.io/_ignition/health-check',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
                  cache-control: no-cache, private
                                  content-type: application/json
                                  access-control-allow-origin: 
                 
                    
          {
    "status": "error",
    "error": "not_found",
    "data": null
}
         

Request   

GET _ignition/health-check

POST _ignition/execute-solution

requires authentication

Example request:
curl --request POST \
    "https://api.trops.io/_ignition/execute-solution" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"solution\": \"porro\"
}"
const url = new URL(
    "https://api.trops.io/_ignition/execute-solution"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "solution": "porro"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/_ignition/execute-solution',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'solution' => 'porro',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
                  cache-control: no-cache, private
                                  content-type: application/json
                                  access-control-allow-origin: 
                 
                    
          {
    "status": "error",
    "error": "not_found",
    "data": null
}
         

Request   

POST _ignition/execute-solution

Body Parameters

solution   string  

parameters   object (optional)  

POST _ignition/update-config

requires authentication

Example request:
curl --request POST \
    "https://api.trops.io/_ignition/update-config" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"theme\": \"auto\",
    \"editor\": \"harum\",
    \"hide_solutions\": false
}"
const url = new URL(
    "https://api.trops.io/_ignition/update-config"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "theme": "auto",
    "editor": "harum",
    "hide_solutions": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.trops.io/_ignition/update-config',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'theme' => 'auto',
            'editor' => 'harum',
            'hide_solutions' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
                  cache-control: no-cache, private
                                  content-type: application/json
                                  access-control-allow-origin: 
                 
                    
          {
    "status": "error",
    "error": "not_found",
    "data": null
}
         

Request   

POST _ignition/update-config

Body Parameters

theme   string  

editor   string  

hide_solutions   boolean