Update a trigger in the Application
curl --request PATCH \
--url https://sapi.withsutro.com/applications/{applicationId}/triggers/{triggerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-sutro-api-client: <api-key>' \
--data '
{
"trigger": {
"id": "<string>",
"type": "<unknown>",
"eventName": "<string>",
"payload": {}
},
"actionId": "<string>",
"initialState": {},
"validation": [
"<string>"
],
"isPublic": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scode": {
"requirements": [
{
"id": "<string>",
"description": "<string>",
"parentId": "<string>"
}
],
"appId": "<string>",
"version": "<string>",
"appOverview": {
"name": "<string>",
"jobToBeDone": "<string>",
"unsupportedUserJourneys": [
{
"name": "<string>",
"description": "<string>",
"reason": "<string>",
"steps": [
"<string>"
]
}
],
"draftUserJourneys": [
{
"name": "<string>",
"outcome": "<string>",
"steps": [
"<string>"
]
}
]
},
"appDescription": "<string>",
"appDraft": {
"sitemap": {
"nodes": [
{
"id": "<string>",
"route": "<string>",
"content": [
{
"title": "<string>",
"description": "<string>"
}
]
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"type": "<string>"
}
]
},
"requirements": [
{
"id": "<string>",
"description": "<string>",
"parentId": "<string>"
}
]
},
"domainModel": {
"models": [
{
"name": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>"
}
],
"requirements": [
{
"id": "<string>",
"description": "<string>",
"parentId": "<string>"
}
],
"isUserModel": true
}
]
},
"actions": [
{
"id": "<string>",
"effects": [
{
"actionEffectId": "<string>",
"effect": "<string>",
"params": {},
"bindParams": {},
"next": "<string>",
"onError": {
"nextId": "<string>",
"continueOriginalFlow": true
}
}
],
"startEffectId": "<string>",
"bindReturnValue": "<string>",
"onError": {
"nextId": "<string>",
"continueOriginalFlow": true
},
"referenceRequirements": [
"<string>"
]
}
],
"triggers": [
{
"trigger": {
"id": "<string>",
"type": "<unknown>",
"eventName": "<string>",
"payload": {}
},
"actionId": "<string>",
"initialState": {},
"validation": [
"<string>"
],
"isPublic": true,
"referenceRequirements": [
"<string>"
]
}
],
"userModelId": "<string>",
"models": [
{
"id": "<string>",
"name": "<string>",
"fields": [
{
"id": "<string>",
"name": "<string>",
"relationshipOwner": true,
"min": 123,
"max": 123,
"to": "<string>",
"accessControl": {
"rules": [
{
"criteria": "<string>"
}
]
},
"computed": "<string>",
"defaultValue": "<unknown>",
"enum": [
"<string>"
]
}
],
"accessControl": {
"rules": [
{
"criteria": "<string>"
}
]
},
"referenceRequirements": [
"<string>"
]
}
],
"personas": [
{
"name": "<string>"
}
]
},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"jobs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"implementationJobId": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"errorMessage": "<string>",
"errorStack": "<string>",
"startedAt": "<string>",
"completedAt": "<string>"
}
]
},
"isActive": true,
"name": "<string>",
"serverVersion": "<string>",
"lastPublishedAt": "2023-11-07T05:31:56Z",
"lastUnpublishedAt": "2023-11-07T05:31:56Z"
}triggers
Update a trigger in the Application
Updates a trigger in the Application. Accepts a partial TriggerMapping object.
Update a trigger in the Application
curl --request PATCH \
--url https://sapi.withsutro.com/applications/{applicationId}/triggers/{triggerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-sutro-api-client: <api-key>' \
--data '
{
"trigger": {
"id": "<string>",
"type": "<unknown>",
"eventName": "<string>",
"payload": {}
},
"actionId": "<string>",
"initialState": {},
"validation": [
"<string>"
],
"isPublic": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scode": {
"requirements": [
{
"id": "<string>",
"description": "<string>",
"parentId": "<string>"
}
],
"appId": "<string>",
"version": "<string>",
"appOverview": {
"name": "<string>",
"jobToBeDone": "<string>",
"unsupportedUserJourneys": [
{
"name": "<string>",
"description": "<string>",
"reason": "<string>",
"steps": [
"<string>"
]
}
],
"draftUserJourneys": [
{
"name": "<string>",
"outcome": "<string>",
"steps": [
"<string>"
]
}
]
},
"appDescription": "<string>",
"appDraft": {
"sitemap": {
"nodes": [
{
"id": "<string>",
"route": "<string>",
"content": [
{
"title": "<string>",
"description": "<string>"
}
]
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"type": "<string>"
}
]
},
"requirements": [
{
"id": "<string>",
"description": "<string>",
"parentId": "<string>"
}
]
},
"domainModel": {
"models": [
{
"name": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>"
}
],
"requirements": [
{
"id": "<string>",
"description": "<string>",
"parentId": "<string>"
}
],
"isUserModel": true
}
]
},
"actions": [
{
"id": "<string>",
"effects": [
{
"actionEffectId": "<string>",
"effect": "<string>",
"params": {},
"bindParams": {},
"next": "<string>",
"onError": {
"nextId": "<string>",
"continueOriginalFlow": true
}
}
],
"startEffectId": "<string>",
"bindReturnValue": "<string>",
"onError": {
"nextId": "<string>",
"continueOriginalFlow": true
},
"referenceRequirements": [
"<string>"
]
}
],
"triggers": [
{
"trigger": {
"id": "<string>",
"type": "<unknown>",
"eventName": "<string>",
"payload": {}
},
"actionId": "<string>",
"initialState": {},
"validation": [
"<string>"
],
"isPublic": true,
"referenceRequirements": [
"<string>"
]
}
],
"userModelId": "<string>",
"models": [
{
"id": "<string>",
"name": "<string>",
"fields": [
{
"id": "<string>",
"name": "<string>",
"relationshipOwner": true,
"min": 123,
"max": 123,
"to": "<string>",
"accessControl": {
"rules": [
{
"criteria": "<string>"
}
]
},
"computed": "<string>",
"defaultValue": "<unknown>",
"enum": [
"<string>"
]
}
],
"accessControl": {
"rules": [
{
"criteria": "<string>"
}
]
},
"referenceRequirements": [
"<string>"
]
}
],
"personas": [
{
"name": "<string>"
}
]
},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"jobs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"implementationJobId": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"errorMessage": "<string>",
"errorStack": "<string>",
"startedAt": "<string>",
"completedAt": "<string>"
}
]
},
"isActive": true,
"name": "<string>",
"serverVersion": "<string>",
"lastPublishedAt": "2023-11-07T05:31:56Z",
"lastUnpublishedAt": "2023-11-07T05:31:56Z"
}Authorizations
Builder authentication and authorization
A unique identifier for the API Client making a request
Path Parameters
Pattern:
^urn:sutro:trigger:.*$Body
application/json
Partial trigger mapping with fields to update
Response
The updated application
An application
Unique identifier for the application
The application's SCode definition
Show child attributes
Show child attributes
The project this application belongs to
Show child attributes
Show child attributes
Whether the application is currently active for billing/runtime purposes
The name of the application
The current saved server version (semver)
When the application was last published
When the application was last unpublished
Was this page helpful?
⌘I