Skip to main content
POST
/
api
/
trpc
/
test.delete
Delete Test
curl --request POST \
  --url https://app.tryiris.dev/api/trpc/test.delete \
  --header 'Content-Type: application/json' \
  --header 'IRIS_ACCESS_TOKEN: <iris_access_token>' \
  --data '
{
  "where": {
    "id": "<string>"
  }
}
'
[
  {
    "result": {
      "data": {
        "json": {
          "id": "4e3f1eeb-9779-450d-83c0-49b75b4d1c63",
          "name": "First Test",
          "description": "Test the login flow",
          "url": "https://medx1.ai",
          "naturalLanguageInput": "Goto https://medx1.ai\nLook for getting started button\nClick on the button\nSubmit the results",
          "status": "DRAFT",
          "isActive": true,
          "projectId": "fa2d07f4-b608-411f-9455-ad5080dbbaed",
          "createdById": "21a857f1-ba5f-4435-bcf6-f910ec07c0dc",
          "createdAt": "2024-12-20T08:47:38.895Z",
          "updatedAt": "2024-12-20T08:47:38.895Z"
        }
      }
    }
  }
]

Delete Test

Delete a specific test by its ID.

Headers

IRIS_ACCESS_TOKEN
string
required
Your Iris API access token

Body

where
object
required
Query parameters to identify the test

Response

Returns the deleted test details upon success.
{
  "0": {
    "json": {
      "where": {
        "id": "<test-id>"
      }
    }
  }
}
[
  {
    "result": {
      "data": {
        "json": {
          "id": "4e3f1eeb-9779-450d-83c0-49b75b4d1c63",
          "name": "First Test",
          "description": "Test the login flow",
          "url": "https://medx1.ai",
          "naturalLanguageInput": "Goto https://medx1.ai\nLook for getting started button\nClick on the button\nSubmit the results",
          "status": "DRAFT",
          "isActive": true,
          "projectId": "fa2d07f4-b608-411f-9455-ad5080dbbaed",
          "createdById": "21a857f1-ba5f-4435-bcf6-f910ec07c0dc",
          "createdAt": "2024-12-20T08:47:38.895Z",
          "updatedAt": "2024-12-20T08:47:38.895Z"
        }
      }
    }
  }
]

Response Fields

id
string
Unique identifier of the deleted test
name
string
Name of the test
description
string
Description of the test
url
string
URL where the test was configured to run
naturalLanguageInput
string
The test steps in natural language format
status
string
Status of the test (e.g., “DRAFT”)
isActive
boolean
Whether the test was active
projectId
string
ID of the project the test belonged to
createdById
string
ID of the user who created the test
createdAt
date
Timestamp when the test was created
updatedAt
date
Timestamp when the test was last updated