Zephyr REST API

About API

Zephyr Enterprise exposes its data via a REST API. You can use the API to:

  • Import data from other tools to Zephyr.

  • Integrate Zephyr with other applications.

  • Get information about users, projects, releases, test case repositories and the underlying folders, test cases, custom fields, execution cycles.

  • Create new test case folders, test cases, requirements, execution cycles, execution phases.

  • Add/modify/delete attachments and phases of existing execution cycles.

  • Assign test execution schedules.

  • Update test cases and test case execution status.

  • Create an execution cycle and update the status of a test case execution run.

  • Run quick search and Advanced Search (use ZQL).

  • And more.

Reference

An API reference in the API Blueprint format is available here:

https://zephyrenterprisev3.docs.apiary.io

Base URL

The base URL for API calls is:

http(s)://SERVER[:PORT]/flex/services/rest/latest

or in case of Zephyr Enterprise Cloud instances:

https://YOUR_SUBDOMAIN.yourzephyr.com/flex/services/rest/latest

JSON

The API uses JSON as the data format for most requests and responses. POST and PUT request containing a JSON request body must include the Content-Type header:

Content-Type: application/json

Authentication

Most API operations require authentication. Zephyr Enterprise API supports the following methods of authenticating requests:

  • API tokens (supported since v. 6.6)

  • Basic authentication

  • Cookie authentication

Important

If your Zephyr Enterprise instance uses single sign-on, you must use API tokens. If Zephyr is configured with internal authentication, you can use any of the API authentication methods.

API tokens (v. 6.6 and later)

API tokens allow a client application to impersonate a user without providing the user's actual password. To learn how to create an API token, see Create and Manage API Tokens in Zephyr.

The API token must be sent in the Authorization request header as follows:

Authorization: Bearer YOUR_API_TOKEN

If you use cURL to make requests, you can send this header like this:

curl -H "Authorization: Bearer YOUR_API_TOKEN" ...

Basic authentication

The API supports Basic authentication which uses your Zephyr Enterprise username and password. Send the username and password as a Base64-encoded string in the Authorization header:

Authorization: Basic base64(username + ':' + password)

If you use cURL to send requests, use the -u flag to specify your username and password:

curl -u "username:password" http://...

Note

Basic authentication requires that the username and password consist of ASCII characters. If they contain non-ASCII characters, use an API token instead.

Use cases

Got questions?

Ask your Zephyr API questions in our Community, or contact Support for assistance.

Publication date: