Skip to main content
PATCH
/
api
/
projects
/
{projectId}
/
test-events
Upsert test event
curl --request PATCH \
  --url https://api.example.com/api/projects/{projectId}/test-events \
  --header 'Content-Type: application/json' \
  --data '
{
  "testEvent": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "context": "<string>",
    "category": "private",
    "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "context": "<string>",
  "category": "private",
  "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Path Parameters

projectId
string<uuid>
required

ID of the project containing the test event

Body

application/json
testEvent
object
required

Test event data to create or update

Response

200 - application/json

The created or updated test event

The created or updated test event

id
string<uuid>
required

Unique identifier of the test event

name
string
required

Name of the test event

context
string
required

JSON context data for the test event

category
enum<string>
required

Category of the test event (private, shared, or global)

Available options:
private,
shared,
global
projectId
string<uuid>
required

ID of the project this test event belongs to

userId
string<uuid> | null

ID of the user who owns this test event (for private events)

documentId
string<uuid> | null

ID of the document this test event is associated with