Authentication

Applies to TestEngine 1.31, last modified on June 07, 2024

To do most tasks in TestEngine, you must authenticate yourself. This topic describes how you can do this.

Basic authentication

In basic authentication, you must provide your Base64-encoded login and password in the Authorization header. For example:

Authorization: Basic dXNlcjpwYXNzd29yZA==

Example

Access token

When you use an access token, you authenticate your requests with a token issued by TestEngine. This authentication is more secure since you do not provide your credentials with every request.

The access token does not have an expiration date. If you need to reset the token, revoke it manually.

To authorize requests with an access token:

  1. Get an access token by using the following operation:

    POST  http://<testengine-host>:8080/api/v1/token

    Authentication

    The request must be authenticated by a TestEngine user. TestEngine will issue the access token for the authenticated user.
  2. TestEngine responses with a JSON object containing the access token:

    JSON

    {
        "token": "37YkM3l4KQijXxv320HD_n4G2Dc"
    }
  3. Specify the Authorized: Bearer <access token> header to authenticate a request. See the examples below.

See details on SwaggerHub.

Example

Revoke a single access token

Use the following operation:

DELETE  http://<testengine-host>:8080/api/v1/token/

Body

A JSON object containing a token to revoke:
{
  "token" : "string"
}

Authentication

Basic authentication by a TestEngine user.

See details on SwaggerHub.

Example

Revoke all your access tokens

Use the following operation:

DELETE  http://<testengine-host>:8080/api/v1/tokens/

Authentication

Basic authentication by a TestEngine user.

See details on SwaggerHub.

Example

See Also

Remove Jobs
Get Results
Run Tests

Highlight search results