Integrations

Let the docs site try API calls

PATCH/api/integrations/docs
Admin. Needs an unlock token (x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.

Off by default: browsers may not call the API from other websites. On, the docs site (https://tempolight.pages.dev/docs) may send requests here from its API reference, with CORS for that address only; the PIN lock still applies.

Request body application/json

tryItboolean

Allow the docs site's Try it panel.

Responses

200OKapplication/json
tryItboolean
originsstring[]

The docs site's addresses that may call the API.

400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequired

What went wrong, in a sentence for people.

403Locked, or not allowed.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X PATCH 'http://localhost:8080/api/integrations/docs' \
  -H 'content-type: application/json' \
  -d '{
  "tryIt": true
}'
Response
{
  "tryIt": true,
  "origins": [
    "https://tempolight.pages.dev",
    "http://localhost:3000",
    "http://127.0.0.1:3000"
  ]
}
Edit on GitHub