Zephyr does not ship a general-purpose REST API you can call to control devices; what people mean by "Zephyr REST API" is almost always either the Zephyr RTOS networking stack (which speaks HTTP, not REST itself) or the Zephyr Scale test-management REST API used by QA teams. This guide covers the practical case: getting the Zephyr Scale REST API working so you can read and create test cases, cycles and results from scripts or CI. The short answer is that you need an API token, the correct regional base URL, and a tool that sends an Authorization header — then you call endpoints like /projects and /testcases with JSON bodies. Below is the full walkthrough, including the mistakes that waste the most time.

What You'll Need

  • A Zephyr Scale account (cloud or Data Center) with permission to create API tokens. On Data Center, an administrator may need to enable access tokens first.
  • An API access token generated from your Zephyr Scale profile settings.
  • The base URL for your region — cloud instances are hosted on separate regional hosts, and using the wrong one returns authentication errors rather than a helpful message.
  • A REST client: curl, Postman, or a short script in Python, Node or PowerShell. Any of these works; nothing special is required.
  • The numeric or key identifiers of the project you want to work with (for example a project key like PROJ).

Step-by-Step

  1. Confirm which Zephyr you are using. If you are a developer working with the Zephyr RTOS, stop here: the RTOS has no REST API. It has a sockets and HTTP stack you compile into firmware, and you write the server or client yourself. The rest of these steps are for Zephyr Scale, the test management product.
  2. Find your regional base URL. Log in to Zephyr Scale in the browser and look at the address bar. Cloud tenants live on region-specific hosts (for example one host for the US and another for Europe), and the API base is that host plus /rest/atm/1.0. Copy the host exactly as it appears; do not guess.
  3. Generate an API token. In Zephyr Scale, open your profile or account settings and look for the API access tokens section (the exact label varies slightly between cloud and Data Center versions and between releases). Create a new token, give it a recognisable name, and copy the value immediately — most systems show it only once. Store it in a password manager or a CI secret, never in source code.
  4. Send a test request. With curl, the shape is: curl -H "Authorization: Bearer YOUR_TOKEN" https://YOUR_HOST/rest/atm/1.0/projects. If you get a JSON list of projects back, your token and host are correct and you can stop troubleshooting. If you get 401, the token or host is wrong; if you get 403, the token is valid but the account lacks permission on that project.
  5. Read a project's test cases. Call /testcases?projectKey=PROJ with the same header. Results are paginated, so add startAt and maxResults parameters when the project is large. Always read the response envelope rather than assuming the body is a bare array.
  6. Create a test case. Send a POST to /testcases with a JSON body containing at minimum the project key, a name and the test steps. Set Content-Type: application/json. The response returns the created item's key and id — capture the id, because updates and deletes use it, not the human-readable key.
  7. Create a test cycle and add items. POST to /testcycles with the project key and a name, then add test cases to it via the cycle's items endpoint. Cycles are how results get grouped, so create the cycle before you post results.
  8. Post an execution result. Create a test run against the cycle and test case, then set its status (pass, fail, blocked, in progress). This is the endpoint your CI job should call at the end of each run so the dashboard reflects reality without anyone typing results by hand.
  9. Wrap it in a script or CI step. Put the base URL and token in environment variables, write one small function that adds the Authorization header, and reuse it for every call. Add a retry with backoff for 429 responses rather than hammering the API in a loop.

Common Mistakes

The most frequent failure is using the wrong host. Cloud and Data Center instances, and different cloud regions, have different base URLs, and a token from one will not authenticate against another. The second most common is pasting the token without the word Bearer and a space in front of it. Third is treating the human-readable test key as the API id — updates and deletes need the numeric id returned at creation. Fourth is forgetting Content-Type: application/json on POST and PUT, which produces confusing 415 or 400 errors. Finally, people hard-code tokens into repositories and then have to rotate them everywhere after a leak.

Tips

Keep separate tokens per integration (CI, local scripts, reporting) so you can revoke one without breaking the others. Log the HTTP status and a short error body on failure — the API's error messages are usually specific enough to tell you which field is wrong. Cache project and folder ids rather than looking them up on every call. When paginating, loop until you receive fewer results than your page size, not until you get an empty page, since some endpoints behave differently at the boundary. And test write operations against a scratch project first, because a bad script can create hundreds of junk test cases quickly.

Troubleshooting

If you get 401, regenerate the token, confirm the host, and check that the header is exactly Authorization: Bearer <token> with no trailing spaces or line breaks from copy-paste. If you get 403, the token works but the account cannot see that project — check project membership and permissions. If you get 404 on an endpoint you are sure exists, you are probably on the wrong base path or the wrong product version; verify the /rest/atm/1.0 prefix. If POST returns 400, read the response body: it usually names the missing or invalid field. If requests suddenly slow down or return 429, you are being rate limited — add backoff and reduce concurrency. If Data Center returns 401 for every token, an administrator may not have enabled access tokens for your account.

Frequently Asked Questions

Does the Zephyr RTOS have a REST API?

No. The RTOS provides networking and HTTP client/server libraries you compile into firmware, but there is no hosted REST service to call. You build the endpoints yourself.

Where do I get a Zephyr Scale API token?

From your profile or account settings inside Zephyr Scale, in the API access tokens section. The label varies slightly by version, and Data Center admins may need to enable tokens first.

Can I use the same token for cloud and Data Center?

No. Tokens are tied to the instance and host that issued them, so generate a separate token for each environment.

Why does my update call fail when the create worked?

Updates and deletes use the numeric id returned when the item was created, not the human-readable key. Capture the id from the create response and use that.