Working with XPRESSO REST APIs

Supported REST APIs

Refer to the following list of supported REST API command in XPRESSO:

  • Request(s) and Bundle Requests REST APIs: Provides access to the following Request(s) and Bundle Requests REST APIs:

    • Request(s): Submit | Retrieve | Stop
    • Bundle Requests: Submit
  • Job(s), Bundle(s), and Profile(s) REST APIs: Provides access to the following Job(s), Bundle(s), and Profile(s) REST APIs.

    • Job(s): Retrieve
    • Bundle(s): Retrieve
    • Profile(s): Retrieve
  • Lab Equipment REST APIs:: Provides access to the following Lab Equipment-related REST APIs:

    • Testbed(s): Retrieve
    • Testbed Clean Instructions: Retrieve
    • Topology/Topologies: Retrieve
  • Environment REST APIs: Provides access to the following environment-related REST APIs:

    • Test Harness/Test Harnesses: Retrieve
    • Execution Engine(s): Retrieve
  • Helper REST APIs: Provides access to the following environment-related REST API:

    • Resource meta information: Get

General usage rules that apply to XPRESSO REST APIs

Authenticate with JWT

Access to the XPRESSO requires that you to login into the dashboard using your registered user credentials. All other forms of access into XPRESSO including REST APIs requires the use of your API automation token to authenticate using JWT. For example, to authenticate with XPRESSO using your API automation token, set your REST API HTTP header AUTHORIZATION using this token as the authorized value.

CAUTION!
Your API automation token is a direct replacement of your user credentials for API use. Do not share it with 3rd parties.

NOTE:
Your API automation token can only be used to interact with XPRESSO REST APIs and cannot be used for any API token fields within the XPRESSO application itself. For example, when creating a new Jenkins execution engine, you are required to enter the API automation token obtained from Jenkins itself, not the XPRESSO-generated API automation token.

You can copy your current API automation token to the clipboard for use with 3rd party applications or REST APIs using the Copy icon button or update the current API automation token with a new token using the Obtain New Token icon button (both of these buttons can be accessed from the Main Navigation Bar→Login Name/Active Group Icon button→Profile→API Token menu).

NOTE:
Prior to scheduling a test run, make sure your test automation environment plugins, for example, the Jenkins pyATS Project Plugin and Jenkins pyATS Report Plugin are populated with the a refreshed API automation token value.

Mandatory Arguments

XPRESSO REST API service is hosted on the same server and the same port as the XPRESSO dashboard. When calling the available public APIs, XPRESSO needs the Authorization and Group header to be present with all the API calls. For example:

Key Value
Authorization Jwt longtokenvalue
Group GroupName

Optional Arguments

XPRESSO REST API uses offset / limit based pagination for all get and search APIs. The default page size is 10. To page, add the desired range to the request query parameters, for example: GET /api/v1/testbeds?offset=50&limit=100