Automation API

Automation API

API Base URL

http://<service manager ip or hostname>:<service manager port>/platform [e.g. http://localhost:7766/platform]

Services

API Request

End Point

<Base URL>/tokens/token [ e.g. http://localhost:7766/platform/tokens/token ]

Method

POST

Query Params

-

Headers

Content-Type: application/json

Authorization

-

Body

-

API Response

{ "success": true, "token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTY2NTE2NTc0MywiaWF0IjoxNjY1MTQ3NzQzfQ.EPM17liyqrcDmlyx9oIRIpVNvuF_RcYHzQZEXa3Iczwb0j3XRipvRNmrVIiGlcjLE0_v-xk-q4pf5gipDiq4Kg" }

Curl

curl -X POST "http://localhost:7766/platform/tokens/token" -H "accept: */*"

API Request

End Point

<Base URL>/project/{projectId}/testexecution/execute [e.g. http://localhost:7766/platform/project/QPR-01/testexecution/execute ]

Method

POST

Query Params

projectId - <Project ID>

Headers

Content-Type: application/json

Authorization

Bearer <API Token>

Body

{ "name": "TestExecution", "type": "TESTCASE", "id": "QTC-01", "job_id": "", "profiles": ["PRF-01"] }

Note:

“name”: New execution Name

“type”: TESTCASE

“id”: Test Case ID

“job_id”: This should be empty in case of individual test case execution

“profiles”: Specify Profile ID against which test should execute.

API Response

{ "success": true, "id": "QTE-314" }

Curl

curl -X POST "http://localhost:7766/platform/project/QPR-01/testexecution/execute" -H "accept: */*" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTY2NTE2NzA3NCwiaWF0IjoxNjY1MTQ5MDc0fQ.JXg07LB4nQ3KDUaRcXx-PIeV0sW78XDgwUUZcV3ZtK8-n77gaWF1eksEZ-A-hk2N7I8rwEV4YhJUw5S69krlIg" -H "Content-Type: application/json" -d "{ \"name\": \"TestExecution\", \"type\": \"TESTCASE\", \"id\": \"QTC-01\", \"job_id\": \"\", \"profiles\": [\"PRF-01\"]}"

API Request

End Point

<Base URL>/project/{projectId}/testexecution/execute [e.g. http://localhost:7766/platform/project/QPR-01/testexecution/execute ]

Method

POST

Query Params

projectId - <Project ID>

Headers

Content-Type: application/json

Authorization

Bearer <API Token>

Body

{ "name": "TestExecution", "type": "TESTCYCLE", "id": "TEC-01", "job_id": "", "profiles": [] }

Note:

“name”: New execution Name

“type”: TESTCYCLE

“id”: Test Cycle ID

“job_id”: This should be empty in case of individual test case execution

“profiles”: []

API Response

{ "success": true, "id": "QTE-315" }

Curl

curl -X POST "http://localhost:7766/platform/project/QPR-01/testexecution/execute" -H "accept: */*" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTY2NTE2NzA3NCwiaWF0IjoxNjY1MTQ5MDc0fQ.JXg07LB4nQ3KDUaRcXx-PIeV0sW78XDgwUUZcV3ZtK8-n77gaWF1eksEZ-A-hk2N7I8rwEV4YhJUw5S69krlIg" -H "Content-Type: application/json" -d "{ \"name\": \"TestExecution\", \"type\": \"TESTCYCLE\", \"id\": \"TEC-01\", \"job_id\": \"\", \"profiles\": []}"

API Request

End Point

<Base URL>/project/{projectId}/testexecution/execute [e.g. http://localhost:7766/platform/project/QPR-01/testexecution/execute ]

Method

POST

Query Params

projectId - <Project ID>

Headers

Content-Type: application/json

Authorization

Bearer <API Token>

Body

{ "name": "TestExecution", "type": "TESTCYCLE", "id": "TEC-01", "job_id": "TCJ-01", "profiles": [] }

Note:

“name”: New execution Name

“type”: TESTCYCLE

“id”: Test Cycle ID

“job_id”: Test Cycle Job ID

“profiles”: []

API Response

{ "success": true, "id": "QTE-316" }

Curl

curl -X POST "http://localhost:7766/platform/project/QPR-01/testexecution/execute" -H "accept: */*" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTY2NTE2NzA3NCwiaWF0IjoxNjY1MTQ5MDc0fQ.JXg07LB4nQ3KDUaRcXx-PIeV0sW78XDgwUUZcV3ZtK8-n77gaWF1eksEZ-A-hk2N7I8rwEV4YhJUw5S69krlIg" -H "Content-Type: application/json" -d "{ \"name\": \"TestExecution\", \"type\": \"TESTCYCLE\", \"id\": \"TEC-01\", \"job_id\": \"TCJ-01\", \"profiles\": []}"

API Request

End Point

<Base URL>/project/{projectId}/testexecution/{executionId} [e.g. http://localhost:7766/platform/project/QPR-01/testexecution/QTE-314 ]

Method

GET

Query Params

projectId - <Project ID>

executionId - <Execution ID>

Headers

Content-Type: application/json

Authorization

Bearer <API Token>

Body

-

API Response

{ "id": "QTE-314", "name": "TestExecution", "type": "TESTCASE", "status": "COMPLETED", "createdAt": 1665149099386, "updatedAt": 1665149100105, "result": { "EXECUTING": 0, "FAILED": 0, "NOT_EXECUTED": 0, "SKIPPED": 0, "PENDING": 0, "PASSED": 1 } }

Curl

curl -X GET "http://localhost:7766/platform/project/QPR-01/testexecution/QTE-314" -H "accept: */*" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTY2NTE2NzA3NCwiaWF0IjoxNjY1MTQ5MDc0fQ.JXg07LB4nQ3KDUaRcXx-PIeV0sW78XDgwUUZcV3ZtK8-n77gaWF1eksEZ-A-hk2N7I8rwEV4YhJUw5S69krlIg"

API Request

End Point

<Base URL>/project/{projectId}/testexecution/{executionId} [e.g. http://localhost:7766/platform/project/QPR-01/testexecution/QTE-314 ]

Method

GET

Query Params

projectId - <Project ID>

executionId - <Execution ID>

Headers

Content-Type: application/json

Authorization

Bearer <API Token>

Body

-

API Response

{ "testLogs": [ { "id": "ETL-327", "name": "Test01", "desc": "Testing", "status": "PASSED", "startTime": 1664877988980, "duration": 347, "testcaseId": "QTC-01", "tcVersion": 7, "executionId": "QTE-314", "createdAt": 1664877988581, "updatedAt": 1664877989377, "context": [] } ], "testJobs": [] }

Curl

curl -X GET "http://localhost:7766/platform/project/QPR-01/testexecution/QTE-314/test-logs" -H "accept: */*" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTY2NTE2NzA3NCwiaWF0IjoxNjY1MTQ5MDc0fQ.JXg07LB4nQ3KDUaRcXx-PIeV0sW78XDgwUUZcV3ZtK8-n77gaWF1eksEZ-A-hk2N7I8rwEV4YhJUw5S69krlIg"