General approach for using Allure Testops API calls

Modified on Fri, 22 Dec, 2023 at 8:00 AM

We'll describe the approach based on an example.


The task (problem/issue/you name it)

How can I use the API to add an installed integration to a project and also add a given token.

The approach

The Allure Testops API makes requests from the frontend of the application to the backend, meaning all you will be doing is pretending to be the frontend.

This is done as follows

Let's reword the task: you need to add globally configured integration with existing user credentials to an arbitrary project.

How to perform such a task.

  1. open developer tools in your browser 
  2. open the project integration page
  3. click Add integration
  4. enter credentials for integration
  5. check that they are accepted by the remote system (test connection)
  6. Click Add integration
  7. In Devtools, find the API request that was sent when you clicked Add integration
  8. You will need data from Headers and Payloads
  9. The headers show you exactly which API method and its type was used (GET, POST, etc.)
  10. Payload will give you all the data you need to use
  11. Descriptions of all API calls are available at {URL}/swagger-ui.html, you can find the one you need by simply searching the page
  12. The description of authentication for executing API requests is described in the documentation:  https://docs.qameta.io/allure-testops/advanced/api/#authentication

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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article