Skip to main content
POST
/
api
/
trpc
/
test.update
Update Test
curl --request POST \
  --url https://app.tryiris.dev/api/trpc/test.update \
  --header 'Content-Type: application/json' \
  --header 'IRIS_ACCESS_TOKEN: <iris_access_token>' \
  --data '
{
  "where.id": "<string>",
  "data.name": "<string>",
  "data.description": "<string>",
  "data.url": "<string>",
  "data.naturalLanguageInput": "<string>",
  "data.isActive": true
}
'
[
  {
    "result": {
      "data": {
        "json": {
          "id": "f7cee2e0-69bf-457e-a2e0-cd0dc0299dea",
          "name": "Pikachu",
          "description": "This is to test that wikipedia's pikachu page is live",
          "url": "https://en.wikipedia.org/wiki/Pikachu",
          "naturalLanguageInput": "Goto google.com\nLook for : https://en.wikipedia.org/wiki/Pikachu\nFind the section: Conception and development\nIf the section is available, its success",
          "status": "DRAFT",
          "isActive": true,
          "projectId": "e52a06ec-6a16-4ae1-9a06-75cab17423c5",
          "createdById": "21a857f1-ba5f-4435-bcf6-f910ec07c0dc",
          "createdAt": "2025-01-01T08:43:07.964Z",
          "updatedAt": "2025-01-01T08:45:45.728Z"
        }
      }
    }
  }
]

Update Test

Update an existing test’s configuration including name, description, URL, and test instructions.

Headers

IRIS_ACCESS_TOKEN
string
required
Your Iris API access token

Body

where.id
string
required
The unique identifier of the test to update
data.name
string
New name for the test
data.description
string
Updated description of the test
data.url
string
The URL to be tested
data.naturalLanguageInput
string
Test instructions in natural language
data.isActive
boolean
Whether the test is active

Response

Returns the updated test configuration.
{
  "0": {
    "json": {
      "where": {
        "id": "f7cee2e0-69bf-457e-a2e0-cd0dc0299dea"
      },
      "data": {
        "name": "Pikachu",
        "description": "This is to test that wikipedia's pikachu page is live",
        "url": "https://en.wikipedia.org/wiki/Pikachu",
        "naturalLanguageInput": "Goto google.com\nLook for : https://en.wikipedia.org/wiki/Pikachu\nFind the section: Conception and development\nIf the section is available, its success",
        "isActive": true
      }
    }
  }
}
[
  {
    "result": {
      "data": {
        "json": {
          "id": "f7cee2e0-69bf-457e-a2e0-cd0dc0299dea",
          "name": "Pikachu",
          "description": "This is to test that wikipedia's pikachu page is live",
          "url": "https://en.wikipedia.org/wiki/Pikachu",
          "naturalLanguageInput": "Goto google.com\nLook for : https://en.wikipedia.org/wiki/Pikachu\nFind the section: Conception and development\nIf the section is available, its success",
          "status": "DRAFT",
          "isActive": true,
          "projectId": "e52a06ec-6a16-4ae1-9a06-75cab17423c5",
          "createdById": "21a857f1-ba5f-4435-bcf6-f910ec07c0dc",
          "createdAt": "2025-01-01T08:43:07.964Z",
          "updatedAt": "2025-01-01T08:45:45.728Z"
        }
      }
    }
  }
]

Response Fields

id
string
Unique identifier of the test
name
string
Name of the test
description
string
Description of the test
url
string
URL being tested
naturalLanguageInput
string
Test instructions in natural language
status
string
Current status of the test
isActive
boolean
Whether the test is active
projectId
string
ID of the project this test belongs 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