XPRESSO
- Welcome to XPRESSO!
- About XPRESSO
- Getting Started with XPRESSO
- Quick Start
- Setting up your Test Environment
- Defining your Lab Resources
- Job Creation, Execution & Test Results
- Tracking Events
- Integrating XPRESSO with other Tools and Services
- System Administrator Tasks
- Working with APIs
- Change Log
- Glossary
Job(s), Bundle(s), and Profile(s) REST APIs
About XPRESSO Job(s), Bundle(s), and Profile(s) REST APIs
XPRESSO provides the following public REST APIs to retrieve Job(s), Bundle(s), and Profile(s) information:
Retrieve Jobs
Returns jobs defined under group.
- URL:
/api/v2/jobs
- Method:
GET
- Permission Required: No permission required.
- Group: retrieved from
headers
- Success Response
- Condition: Authorized User.
- Code:
200 OK
- Response example:json
Copy
[ { "id": "af0cfb5f-9323-4b72-a979-639d2343b0b7", "name": "My_Awesome_Test", "harness": "pyATS", "job_file": "/path/to/job_file.py", "description": "", "support_mailers": "support@mailer.com", "interest_lists": ["user1@company.com", "user2@company.com"], "profiles": [ { "id": "00caa38b-961c-439a-a740-666721022b73", "name": "DEFAULT", "is_default": true, "priority": 4, "configuration_state": "ENABLED", "date_created": "2019-08-13T19:08:54.914958Z", "interest_lists": ["user1@company.com", "user2@company.com"], "engine_instance": { "id": "75e32472-e6d9-425f-be88-49be550c2ef1", "name": "jenkins", }, "enginefields": [], "harness_instances": [ { "id": "cc78c21a-dc61-4722-9a77-89eb46558ab7", "name": "MyHarness", "harness": "pyATS", "path": "/path/to/harness", "configuration_state": "ENABLED", "operational_state": "ONLINE", "site": "SJC", "bldg": "ALL", "config": "", } ], "harnessfields": [], "max_run_time": 43200, "envargs": [ { "id": 40, "name": "PYTHONPATH", "value": "/path/to/pythonpath/", } ], "jobargs": [ { "id": 10, "job_arg": 13, "name": "-trigger_groups", "value": "And('pyats', Not('physical'))", "flag": false, "inherits": false, } ], "testbeds": [ { "name": "MyTestbed", "id": "2966f51c-097d-45fb-8a88-ee60240693be", "clean": "123456-1234-1234-12345678900", } ], "metadata": [ { "id": 30, "metaclass": "coverageType", "identifier": "Sanity", } ], "topologies": [], "support_mailers": "support@mailer.com", "created_by": "user", "deleted": false } ], "args": [ { "id": 13, "name": "-trigger_groups", "code_name": "-trigger_groups", "default_value": null, "description": "", "immutable": false, "flag": false } ], "configuration_state": "ENABLED", "site": null, "bldg": null, "date_created": "2019-08-13T19:08:53.957028Z", "deleted": false, "created_by": "user" } ]
Retrieve Job
Return job information.
- URL:
/api/v2/jobs/:id
- Method:
GET
- Permission Required: No permission required. User needs to be a member of the group that owns the job.
- Group: retrieved from
headers
- Success Response
- Condition: If job exists and Authorized User is a member of the group.
- Code:
200 OK
- Response example:json
Copy
{ "id": "af0cfb5f-9323-4b72-a979-639d2343b0b7", "name": "My_Awesome_Test", "harness": "pyATS", "job_file": "/path/to/job_file.py", "description": "", "support_mailers": "support@mailer.com", "interest_lists": ["user1@company.com", "user2@company.com"], "profiles": [ { "id": "00caa38b-961c-439a-a740-666721022b73", "name": "DEFAULT", "is_default": true, "priority": 4, "configuration_state": "ENABLED", "date_created": "2019-08-13T19:08:54.914958Z", "interest_lists": ["user1@company.com", "user2@company.com"], "engine_instance": { "id": "75e32472-e6d9-425f-be88-49be550c2ef1", "name": "jenkins", }, "enginefields": [], "harness_instances": [ { "id": "cc78c21a-dc61-4722-9a77-89eb46558ab7", "name": "MyHarness", "harness": "pyATS", "path": "/path/to/harness", "configuration_state": "ENABLED", "operational_state": "ONLINE", "site": "SJC", "bldg": "ALL", "config": "", } ], "harnessfields": [], "max_run_time": 43200, "envargs": [ { "id": 40, "name": "PYTHONPATH", "value": "/path/to/pythonpath/", } ], "jobargs": [ { "id": 10, "job_arg": 13, "name": "-trigger_groups", "value": "And('pyats', Not('physical'))", "flag": false, "inherits": false, } ], "testbeds": [ { "name": "MyTestbed", "id": "2966f51c-097d-45fb-8a88-ee60240693be", "clean": "123456-1234-1234-12345678900", } ], "metadata": [ { "id": 30, "metaclass": "coverageType", "identifier": "Sanity", } ], "topologies": [], "support_mailers": "support@mailer.com", "created_by": "user", "deleted": false } ], "args": [ { "id": 13, "name": "-trigger_groups", "code_name": "-trigger_groups", "default_value": null, "description": "", "immutable": false, "flag": false } ], "configuration_state": "ENABLED", "site": null, "bldg": null, "date_created": "2019-08-13T19:08:53.957028Z", "deleted": false, "created_by": "user" }
- Error Response
- Condition: If job does not exist with provided
id
- Code:
404 NOT FOUND
- Response example:
{ detail: 'Not Found' }
- Condition: If job does not exist with provided
Search Jobs
Returns jobs defined under group.
URL:
/api/v2/jobs/search
Method:
POST
Permission Required: No permission required.
Group: retrieved from
headers
Data Payload:
NOTE:
All fields are optional, but at least one should be provided.
All keys provided are queried with AND logic.
All items in a list under a key are queried with OR logic (egname: ['name1', 'name2']
)jsonCopy
{ "id": ["id1", "id2"], "name": ["name1", "name2"], "group": ["Group1", "Group2"], "tags": ["tag1", "tag2"] }
Success Response
- Condition: Authorized User.
- Code:
200 OK
- Response example:json
Copy
[ { "id": "af0cfb5f-9323-4b72-a979-639d2343b0b7", "name": "My_Awesome_Test", "harness": "pyATS", "job_file": "/path/to/job_file.py", "description": "", "support_mailers": "support@mailer.com", "interest_lists": ["user1@company.com", "user2@company.com"], "profiles": [ { "id": "00caa38b-961c-439a-a740-666721022b73", "name": "DEFAULT", "is_default": true, "priority": 4, "configuration_state": "ENABLED", "date_created": "2019-08-13T19:08:54.914958Z", "interest_lists": ["user1@company.com", "user2@company.com"], "engine_instance": { "id": "75e32472-e6d9-425f-be88-49be550c2ef1", "name": "jenkins", }, "enginefields": [], "harness_instances": [ { "id": "cc78c21a-dc61-4722-9a77-89eb46558ab7", "name": "MyHarness", "harness": "pyATS", "path": "/path/to/harness", "configuration_state": "ENABLED", "operational_state": "ONLINE", "site": "SJC", "bldg": "ALL", "config": "", } ], "harnessfields": [], "max_run_time": 43200, "envargs": [ { "id": 40, "name": "PYTHONPATH", "value": "/path/to/pythonpath/", } ], "jobargs": [ { "id": 10, "job_arg": 13, "name": "-trigger_groups", "value": "And('pyats', Not('physical'))", "flag": false, "inherits": false, } ], "testbeds": [ { "name": "MyTestbed", "id": "2966f51c-097d-45fb-8a88-ee60240693be", "clean": "123456-1234-1234-12345678900", } ], "metadata": [ { "id": 30, "metaclass": "coverageType", "identifier": "Sanity", } ], "topologies": [], "support_mailers": "support@mailer.com", "created_by": "user", "deleted": false } ], "args": [ { "id": 13, "name": "-trigger_groups", "code_name": "-trigger_groups", "default_value": null, "description": "", "immutable": false, "flag": false } ], "configuration_state": "ENABLED", "site": null, "bldg": null, "date_created": "2019-08-13T19:08:53.957028Z", "deleted": false, "created_by": "user" } ]
- Error Response
- Condition: If no jobs can be found with the given criteria
- Code:
404 NOT FOUND
- Response example:
{ detail: 'Not Found' }
Retrieve Bundles
Returns bundles defined under group.
- URL:
/api/v2/bundles
- Method:
GET
- Permission Required: No permission required.
- Group: retrieved from
headers
- Success Response
- Condition: Authorized User.
- Code:
200 OK
- Response example:json
Copy
[ { "id": "23c900f9-eb8c-40ad-9268-cb4205d7a617", "name": "firstbundle", "description": "created a new bundle", "deleted": false, "profiles": [ { "id": "00caa38b-961c-439a-a740-666721022b73", "name": "DEFAULT", "is_default": true, "priority": 4, "configuration_state": "ENABLED", "date_created": "2019-08-13T19:08:54.914958Z", "interest_lists": ["user1@company.com", "user2@company.com"], "engine_instance": { "id": "75e32472-e6d9-425f-be88-49be550c2ef1", "name": "jenkins", }, "enginefields": [], "harness_instances": [ { "id": "cc78c21a-dc61-4722-9a77-89eb46558ab7", "name": "MyHarness", "harness": "pyATS", "path": "/path/to/harness", "configuration_state": "ENABLED", "operational_state": "ONLINE", "site": "SJC", "bldg": "ALL", "config": "", } ], "harnessfields": [], "max_run_time": 43200, "envargs": [ { "id": 40, "name": "PYTHONPATH", "value": "/path/to/pythonpath/", } ], "jobargs": [ { "id": 10, "job_arg": 13, "name": "-trigger_groups", "value": "And('pyats', Not('physical'))", "flag": false, "inherits": false, } ], "testbeds": [ { "name": "MyTestbed", "id": "2966f51c-097d-45fb-8a88-ee60240693be", "clean": "123456-1234-1234-12345678900", } ], "metadata": [ { "id": 30, "metaclass": "coverageType", "identifier": "Sanity", } ], "topologies": [], "support_mailers": "support@mailer.com", "created_by": "user", "deleted": false } ], "profile_ids": [ "b7672128-d6c1-40b3-b30c-80fa50edca03", "00caa38b-961c-439a-a740-666721022b73" ], "created_by": "user2", "date_created": "2019-08-26T19:42:28.868779Z" } ]
Retrieve Bundle
Return bundle information.
- URL:
/api/v2/bundles/:id
- Method:
GET
- Permission Required: No permission required. User needs to be a member of the group that owns the bundle.
- Group: retrieved from
headers
- Success Response
- Condition: If bundle exists and Authorized User is a member of the group.
- Code:
200 OK
- Response example:json
Copy
{ "id": "23c900f9-eb8c-40ad-9268-cb4205d7a617", "name": "firstbundle", "description": "created a new bundle", "deleted": false, "profiles": [ { "id": "00caa38b-961c-439a-a740-666721022b73", "name": "DEFAULT", "is_default": true, "priority": 4, "configuration_state": "ENABLED", "date_created": "2019-08-13T19:08:54.914958Z", "interest_lists": ["user1@company.com", "user2@company.com"], "engine_instance": { "id": "75e32472-e6d9-425f-be88-49be550c2ef1", "name": "jenkins", }, "enginefields": [], "harness_instances": [ { "id": "cc78c21a-dc61-4722-9a77-89eb46558ab7", "name": "MyHarness", "harness": "pyATS", "path": "/path/to/harness", "configuration_state": "ENABLED", "operational_state": "ONLINE", "site": "SJC", "bldg": "ALL", "config": "", } ], "harnessfields": [], "max_run_time": 43200, "envargs": [ { "id": 40, "name": "PYTHONPATH", "value": "/path/to/pythonpath/", } ], "jobargs": [ { "id": 10, "job_arg": 13, "name": "-trigger_groups", "value": "And('pyats', Not('physical'))", "flag": false, "inherits": false, } ], "testbeds": [ { "name": "MyTestbed", "id": "2966f51c-097d-45fb-8a88-ee60240693be", "clean": "123456-1234-1234-12345678900", } ], "metadata": [ { "id": 30, "metaclass": "coverageType", "identifier": "Sanity", } ], "topologies": [], "support_mailers": "support@mailer.com", "created_by": "user", "deleted": false } ], "profile_ids": [ "b7672128-d6c1-40b3-b30c-80fa50edca03", "00caa38b-961c-439a-a740-666721022b73" ], "created_by": "user2", "date_created": "2019-08-26T19:42:28.868779Z" }
- Error Response
- Condition: If bundle does not exist with provided
bundle_id
- Code:
404 NOT FOUND
- Response example:
{ detail: 'Not Found' }
- Condition: If bundle does not exist with provided
Retrieve Profiles
Returns profiles defined under group.
- URL:
/api/v2/profiles
- Method:
GET
- Permission Required: No permission required.
- Group: retrieved from
headers
- Success Response
- Condition: Authorized User.
- Code:
200 OK
- Response example:json
Copy
[ { "id": "00caa38b-961c-439a-a740-666721022b73", "name": "DEFAULT", "is_default": true, "priority": 4, "configuration_state": "ENABLED", "date_created": "2019-08-13T19:08:54.914958Z", "interest_lists": ["user1@company.com", "user2@company.com"], "engine_instance": { "id": "75e32472-e6d9-425f-be88-49be550c2ef1", "name": "jenkins", }, "enginefields": [], "harness_instances": [ { "id": "cc78c21a-dc61-4722-9a77-89eb46558ab7", "name": "MyHarness", "harness": "pyATS", "path": "/path/to/harness", "configuration_state": "ENABLED", "operational_state": "ONLINE", "site": "SJC", "bldg": "ALL", "config": "", } ], "harnessfields": [], "max_run_time": 43200, "envargs": [ { "id": 40, "name": "PYTHONPATH", "value": "/path/to/pythonpath/", } ], "jobargs": [ { "id": 10, "job_arg": 13, "name": "-trigger_groups", "value": "And('pyats', Not('physical'))", "flag": false, "inherits": false, } ], "testbeds": [ { "name": "MyTestbed", "id": "2966f51c-097d-45fb-8a88-ee60240693be", "clean": "123456-1234-1234-12345678900", } ], "metadata": [ { "id": 30, "metaclass": "coverageType", "identifier": "Sanity", } ], "topologies": [], "support_mailers": "support@mailer.com", "created_by": "user", "deleted": false } ]
Retrieve Profile
Returns profile information.
- URL:
/api/v2/profile/:id
- Method:
GET
- Permission Required: No permission required. User needs to be a member of the group that owns the profile.
- Group: retrieved from
headers
- Success Response
- Condition: If profile exists and Authorized User is a member of the group.
- Code:
200 OK
- Response example:json
Copy
{ "id": "00caa38b-961c-439a-a740-666721022b73", "name": "DEFAULT", "is_default": true, "priority": 4, "configuration_state": "ENABLED", "date_created": "2019-08-13T19:08:54.914958Z", "interest_lists": ["user1@company.com", "user2@company.com"], "engine_instance": { "id": "75e32472-e6d9-425f-be88-49be550c2ef1", "name": "jenkins", }, "enginefields": [], "harness_instances": [ { "id": "cc78c21a-dc61-4722-9a77-89eb46558ab7", "name": "MyHarness", "harness": "pyATS", "path": "/path/to/harness", "configuration_state": "ENABLED", "operational_state": "ONLINE", "site": "SJC", "bldg": "ALL", "config": "", } ], "harnessfields": [], "max_run_time": 43200, "envargs": [ { "id": 40, "name": "PYTHONPATH", "value": "/path/to/pythonpath/", } ], "jobargs": [ { "id": 10, "job_arg": 13, "name": "-trigger_groups", "value": "And('pyats', Not('physical'))", "flag": false, "inherits": false, } ], "testbeds": [ { "name": "MyTestbed", "id": "2966f51c-097d-45fb-8a88-ee60240693be", "clean": "123456-1234-1234-12345678900", } ], "metadata": [ { "id": 30, "metaclass": "coverageType", "identifier": "Sanity", } ], "topologies": [], "support_mailers": "support@mailer.com", "created_by": "user", "deleted": false }
- Error Response
- Condition: If profile does not exist with provided
id
- Code:
404 NOT FOUND
- Response example:
{ detail: 'Not Found' }
- Condition: If profile does not exist with provided