Environment REST APIs

About XPRESSO Environment REST APIs

XPRESSO provides the following public REST APIs to retrieve environment-related (test harness and execution engine) information.

Retrieve Test Harnesses

Returns test harness instances defined under group.

  • URL: /api/v1/harnesses
  • Method: GET
  • Permission Required: No permission required.
  • Group: retrieved from headers
  • Success Response
    • Condition: Authorized User.
    • Code: 200 OK
    • Response example:
    [
      {
        "uuid": "94f03015-5f0d-4c2e-a6e6-49ca71442a36",
        "name": "TestHarness",
        "harness": "pyATS",
        "path": "/path/to/pyATS",
        "supporting_path": "",
        "config_state": "ENABLED",
        "oper_state": "ONLINE",
        "site": "OTT",
        "bldg": "ALL",
        "support_liveview": false,
        "created_by": "test_user",
        "date_created": "2019-05-30T17:22:12.733397Z",
        "date_modified": "2019-05-30T20:41:35.288635Z",
        "deleted": false
      }
    ]
    

Retrieve Test Harness

Return test harness instance information.

  • URL: /api/v1/harnesses/:uuid
  • Method: GET
  • Permission Required: No permission required. User needs to be a member of the group that owns the test harness instance.
  • Group: retrieved from headers
  • Success Response
    • Condition: If test harness instance exists and Authorized User is a member of the group.
    • Code: 200 OK
    • Response example:
      {
        "uuid": "94f03015-5f0d-4c2e-a6e6-49ca71442a36",
        "name": "TestHarness",
        "harness": "pyATS",
        "path": "/path/to/pyATS",
        "supporting_path": "",
        "config_state": "ENABLED",
        "oper_state": "ONLINE",
        "site": "OTT",
        "bldg": "ALL",
        "support_liveview": false,
        "created_by": "test_user",
        "date_created": "2019-05-30T17:22:12.733397Z",
        "date_modified": "2019-05-30T20:41:35.288635Z",
        "deleted": false
      }
      
  • Error Response
    • Condition: If test harness instance does not exist with provided harness_id
    • Code: 404 NOT FOUND
    • Response example: { detail: 'Not Found' }

Retrieve Execution Engines

Returns execution engine instance defined under group.

  • URL: /api/v1/engines
  • Method: GET
  • Permission Required: No permission required.
  • Group: retrieved from headers
  • Success Response
    • Condition: Authorized User.
    • Code: 200 OK
    • Response example:
      [
        {
          "type": "jenkins",
          "creator": "test_user",
          "uuid": "421be594-34fa-4ea6-922a-678f3ca404f1",
          "configured_state": "ENABLED",
          "base_url": "https://my-jenkins.mycompany.com",
          "site": "OTT",
          "bldg": "ALL",
          "deleted": false,
          "date_created": "2019-05-30T18:39:28.606540Z",
          "date_modified": "2019-05-31T18:48:26.498353Z",
          "state": "ONLINE",
          "name": "ExecEngine"
        }
      ]
      

Retrieve Execution Engine

Return execution engine instance information.

  • URL: /api/v1/engines/:uuid
  • Method: GET
  • Permission Required: No permission required. User needs to be a member of the group that owns the execution engine instance.
  • Group: retrieved from headers
  • Success Response
    • Condition: If execution engine instance exists and Authorized User is a member of the group.
    • Code: 200 OK
    • Response example:
      {
        "type": "jenkins",
        "creator": "test_user",
        "uuid": "421be594-34fa-4ea6-922a-678f3ca404f1",
        "configured_state": "ENABLED",
        "base_url": "https://my-jenkins.mycompany.com",
        "site": "OTT",
        "bldg": "ALL",
        "deleted": false,
        "date_created": "2019-05-30T18:39:28.606540Z",
        "date_modified": "2019-05-31T18:48:26.498353Z",
        "state": "ONLINE",
        "name": "ExecEngine"
      }
      
  • Error Response
    • Condition: If execution engine instance does not exist with provided engine_id
    • Code: 404 NOT FOUND
    • Response example: { detail: 'Not Found' }