Fetching execution results using Opkey APIs on Postman



Opkey provides APIs for fetching test execution results and other data in JSON format via tools like Postman.  

Listed below are the Opkey APIs to fetch the desired outputs from Opkey's Project workspace. 


GetSuiteResult 

 

This API fetches the execution result of a test suite from an Opkey project in JSON format. 

API URI = URL + Resource_Path + Query_Parameter 

If the Opkey Web domain URL is https://www.xyz.myopkey.com then…


API URI (Variable): https://www.xyz.myopkey.com/api/OpkeyRestV2/GetSuiteResult?ProjectName=NameOfProject&BuildName=NameOfBuild&SessionName=NameOfExecutionSession


Resource Path (Static): /api/OpkeyRestV2/GetSuiteResult


Query Parameter(Variable): ProjectName=NameOfProject&BuildName=NameOfBuild&SessionName=NameOfExecutionSession


Note: Here, the API URI and Query Parameters are variables that depend on your Project, Build, Session etc.

On the Postman application choose the GET method and input the API URL. Navigate to the Params tab and enter the Query Parameters such as ProjectNameBuildName, and SessionName 

Click on the Send button to fetch the result.

 


Authorize 


This API fetches the Authorization Token of your Opkey environment by using Opkey credentials.

On your Postman application choose the POST method and input the API URI. The API URI includes the Opkey Web domain URL, Resource Path, and Query Parameters i.e

Proceed to the Authorization tab, and enter your Opkey Username and Password. Click on Send to obtain the Authorization Token. 

 


The Authorization Token is fetched which can be used in further APIs as input. 

 

GetTestCaseResult 

 

This API fetches the details of the execution result of the Test Case in a Suite. 

Choose the GET Method and input the API URI. Then, proceed to the Params tab to add Query Parameters such as ProjectNameBuildNameSessionName, and TestCaseStepID. 

 


Navigate to the Authorization tab and input the Authorization Token. Once done, click on the Send button to execute the GET Method and retrieve the execution result. 

You can view the details of the Test Case Execution Result in JSON format by accessing the Body tab. 

 

GetAllSessionsOfABuild 

This API fetches all the sessions from an executed build. 

Opt for the "GET Method" and input the API URL. Then, move to the "Params" tab to include query parameters such as Project Name and Build Name. 

 


Navigate to the "Authorization" tab and input the Authorization Token. After that, click on the "Send" button, execute the GET method, and retrieve the execution result. 

The results will now appear in the "Suite Execution Result" details in JSON format, accessible under the Body tab. 


 

GetAllSessionsOfProject 

This API fetches the details of the execution result of all sessions from a project. 

Select the “GET” method and enter the API URI, go to the “Params” tab, and enter the “Project Name”. 


 


Navigate to the Authorization tab and input the Authorization Token. Afterward, click on the Send button to execute the GET Method and fetch the execution result. 

You can review the details of the Test Case Execution Result in JSON format by accessing the Body tab. 

 

 



GetAllTagsOfSession 

 

This API retrieves details about the execution result of all tags within a session. 

 


Select the Get method and go to the Param Tab. Enter the query Parameters of ProjectName, Build Name, and SessionName. Access the Authorization tab and input the Authorization Token. Then, click the Send button to execute the "GET" Method and fetch the execution result. 

You can view the details of the Test Case Execution Result in JSON format under the Body tab. 

 

GetAllMetadataBuild 

This API fetches the details of the Project’s MetadataBuild in JSON format. 

Choose the Get Method and input the API URL. Then, move to the Params tab and input Query Parameters such as Project Name. 

Proceed to the Authorization tab and input the Authorization Token. Then, click on the Send button to execute the Get Method and retrieve the execution result. 


 

GetAllMetadataSessionOfBuild 

This API fetches all MetaData Session of Build in JSON format. 

Select Get Method and input the API URL. Move to the Params tab and input Query Parameters as ProjectName, and BuildName.  

 

 


GetSessionMetadata 

This API fetches the execution result of the MetaData Session in JSON Format. 

Select Get Method and input the API URL. Move to the Params tab and input Query Parameters of  ProjectName. Go to the Authorization tab and input the Authorization Token. Click on the Send button to fetch the result


 

 



You’re now at the end of the article. 

Read related articles on Soap API  and Rest API 

 

 

 

 

 

 

 

 

 

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article