Testsigma provides a robust API to manage the Executions and Execution Data using RESTful API Calls. Below given are some of the utilities provided by Testsigma API.


Point to remember:

We need to make sure the API request is authenticated. Otherwise, it may return a 401 Unauthorized Error as response.


1. Starting the Execution

We can start an execution in Testsigma easily using the following API request:


http://app.testsigma.com/rest/execution/<execution-id>/run


And Here's the format for a cURL request:


curl -X POST -H 'Content-type: application/json' -u <Username>:<Password> https://app.testsigma.com/rest/execution/<execution-id>/run


Note: Replace <Username> and <Password> with your real credentials and the <execution-id> part with actual execution-id.


For more details, refer the article - Start/Trigger an execution in Testsigma using REST API



2. Uploading APK/IPA/Attachment files to Testsigma Uploads

We can upload a new file to Testsigma Uploads using the following API Request:


http://app.testsigma.com/rest/storage/upload


And Here's the format for a cURL request:


curl - u "<Username>:<Password>" - X POST http://app.testsigma.com/rest/storage/upload -H "Content-Type=multipart/form-data" -F "app=@</path/to/the/apkfile.apk>" 
-F 'data={
"name": "<app_name>",
"type": "<file_type>",
"version": "<version_name>",
"project": "<Project_name>"
};type = application/json'


Note: Replace <Username> and <Password> with your real credentials and the <app_name>, <version_name>, and <Project_name> parts with corresponding details.


For more details, refer the article - Uploading files to Testsigma Uploads using REST API