דלג לתוכן הראשי
GET
/
scenarios
/
manage
curl -g "https://YOUR_PROJECT.texterchat.com/server/api/v2/scenarios/manage" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "total": 123,
  "scenarios": [
    {
      "_id": "<string>",
      "system": "<string>",
      "drafts": [
        {}
      ],
      "inactiveRevisions": [
        {
          "_id": "<string>",
          "scenarioId": "<string>",
          "name": "<string>",
          "description": "<string>",
          "version": 123,
          "parentVersion": 123,
          "revisionComment": "<string>",
          "triggerEvents": [
            "<string>"
          ],
          "conditions": [
            [
              {
                "name": "<string>",
                "params": "<unknown>",
                "confidentialData": true
              }
            ]
          ],
          "loaders": {
            "beforeConditions": [
              {
                "name": "<string>",
                "alias": "<string>",
                "params": "<unknown>",
                "confidentialData": true
              }
            ],
            "afterConditions": [
              {
                "name": "<string>",
                "alias": "<string>",
                "params": "<unknown>",
                "confidentialData": true
              }
            ]
          },
          "actions": [
            {
              "name": "<string>",
              "params": "<unknown>",
              "confidentialData": true
            }
          ],
          "loops": [
            {
              "loop": {}
            }
          ],
          "tags": [
            "<string>"
          ],
          "attachedData": {},
          "system": "<string>",
          "options": {
            "unorderedActions": true
          },
          "metadata": {
            "authorUid": "<string>",
            "created": 123,
            "modified": 123,
            "activated": 123,
            "activations": [
              {
                "timestamp": 123,
                "userUid": "<string>"
              }
            ]
          }
        }
      ],
      "activeRevision": {
        "_id": "<string>",
        "scenarioId": "<string>",
        "name": "<string>",
        "description": "<string>",
        "version": 123,
        "parentVersion": 123,
        "revisionComment": "<string>",
        "triggerEvents": [
          "<string>"
        ],
        "conditions": [
          [
            {
              "name": "<string>",
              "params": "<unknown>",
              "confidentialData": true
            }
          ]
        ],
        "loaders": {
          "beforeConditions": [
            {
              "name": "<string>",
              "alias": "<string>",
              "params": "<unknown>",
              "confidentialData": true
            }
          ],
          "afterConditions": [
            {
              "name": "<string>",
              "alias": "<string>",
              "params": "<unknown>",
              "confidentialData": true
            }
          ]
        },
        "actions": [
          {
            "name": "<string>",
            "params": "<unknown>",
            "confidentialData": true
          }
        ],
        "loops": [
          {
            "loop": {}
          }
        ],
        "tags": [
          "<string>"
        ],
        "attachedData": {},
        "system": "<string>",
        "options": {
          "unorderedActions": true
        },
        "metadata": {
          "authorUid": "<string>",
          "created": 123,
          "modified": 123,
          "activated": 123,
          "activations": [
            {
              "timestamp": 123,
              "userUid": "<string>"
            }
          ]
        }
      }
    }
  ]
}

הרשאות

Authorization
string
header
נדרש

API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.

פרמטרי שאילתה

skip
string

The number of results to skip (0-100000)

limit
string

The maximum number of results to return (1-1000)

triggerEvents[]
string[]

Return only scenarios having one of these trigger events in their active revision (e.g. domain.message.created)

onlyActive
enum<string>

Return only scenarios with an active revision

אפשרויות זמינות:
true,
false
draftsAuthor
string

Return only scenarios with drafts created by this user

sortLatestModified
enum<string>

Sort the scenarios by modified time

אפשרויות זמינות:
asc,
desc
sortLatestActivated
enum<string>

Sort the scenarios by activated time

אפשרויות זמינות:
asc,
desc

תגובה

The matching scenarios and total count. Field-by-field reference: The Scenario object

total
number

Total number of scenarios matching the query

scenarios
object[]