--- title: "Integrate with API in Autify | Autify Guide" slug: "integrate-with-api" description: "Learn How to Leverage API Integration for Advanced Automation Testing in Autify. Get Started Today!" updated: 2024-05-10T09:06:15Z published: 2024-05-10T09:06:15Z canonical: "help.autify.com/integrate-with-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Integrate with API ## Autify API **See [our OpenAPI definition](https://autifyhq.github.io/autify-api/#/) for API specifications.** **However, for CI/CD integrations, we highly recommend to use our official integrations. See [CI/CD with Autify](https://help.autify.com/docs/cicd-with-autify).** Autify provides an API. By using the API, you can integrate with CI/CD tools such as CircleCI and Jenkins, and it can be included in the development flow, such as executing a specific test plan automatically when the source code is merged. Access tokens are generated for each user. If you would like to share them, we recommend creating a user specifically for the API! ## Issue a personal access token You will need a personal access token to use APIs, so make sure you generate one in advance. Access tokens are generated for each user. If you would like to share them, we recommend creating a user specifically for the API! To generate a personal access token, go to ***[Settings]*** in the side menu, open ***[User settings]***, and click create button on ***[Generate Personal Access Token]***. ![](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/zndsk-Screen_Shot_2021-09-14_at_17.13.51.png) ## Using Autify API ### With Autify CLI [Autify Command Line Interface (CLI)](https://help.autify.com/docs/autify-command-line-interface) provides low level commands for each Autify API so that you can create any solutions by shell script or equivalent easily. Autify CLI has several high level commands such as `autify web test run` to give you streamlined experiences for complex use cases. **Please consider to use these commands first** before crafting your solutions by calling Autify API directly. A few examples with Autify CLI: #### Run a test with the specified Scenario IDs and execution environments (capabilities) ``` $ autify web api execute-scenarios --project-id 0 --execute-scenarios-request '{ "scenarios": [{"id": 111}], "capabilities": [{"os": "Linux", "browser": "Chrome"}] }' { "result_id": 222 } ``` #### Get a detailed test result for a given Test Result ID ``` $ autify web api describe-result --project-id 0 --result-id 222 { "id": 222, "status": "passed", "review_needed": false, "test_plan_capability_results": [ { "id": 333, "capability": { "os": "Linux", "browser": "Chrome", ... }, "test_case_results": [ { "id": 444, "status": "passed", "project_url": "https://app.autify.com/...", "review_needed": 0, ... } ] } ], ... } ``` See [GitHub readme](https://github.com/autifyhq/autify-cli#commands) for `autify web api` commands for more details. ### Your HTTP client If Autify CLI is available for your environment, we highly recommend to use Autify CLI version above. If you need SDK or official support for your environment, feel free to open a request on [GitHub Issues](https://github.com/autifyhq/autify-cli/issues) If you want to integrate with Autify API and your own HTTP client e.g. `curl`, you can configure your client to send an HTTP request like below: #### Run a test with the specified Scenario IDs and execution environments (capabilities) ``` POST /projects/0/execute_scenarios HTTP/1.1 Accept: application/json, text/plain, */* Content-Type: application/json Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN Content-Length: 77 Host: app.autify.com {"scenarios":[{"id":111}],"capabilities":[{"os":"Linux","browser":"Chrome"}]} ``` #### Get a detailed test result for a given Test Result ID ``` GET /projects/0/results/222 HTTP/1.1 Accept: application/json, text/plain, */* Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN Host: app.autify.com ``` See [our OpenAPI definition](https://autifyhq.github.io/autify-api/#/) for API specifications.