{
  "info": {
    "name": "VORTEX OpenAPI (Prod)",
    "description": "API for managing VORTEX devices and related resources",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.vortexcloud.com/v1",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Alarms",
      "item": [
        {
          "name": "Get all alarm settings",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/alarms",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "alarms"
              ],
              "variable": [],
              "query": []
            },
            "description": "Retrieve all alarm settings under the default organization."
          },
          "response": []
        },
        {
          "name": "Get specified alarm setting",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/alarms/:alarmId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "alarms",
                ":alarmId"
              ],
              "variable": [
                {
                  "key": "alarmId",
                  "value": "string",
                  "description": "ID of the alarm setting"
                }
              ],
              "query": []
            },
            "description": "Retrieve information about a specified alarm setting."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Archives",
      "item": [
        {
          "name": "Get all archives",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/archives",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "archives"
              ],
              "variable": [],
              "query": []
            },
            "description": "Retrieve all archives of specified devices in a specified time range under the default organization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"deviceIdList\": [\n    \"string\"\n  ],\n  \"startTimestamp\": 0,\n  \"endTimestamp\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Delete archive",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/archives/:archiveId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "archives",
                ":archiveId"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                },
                {
                  "key": "archiveId",
                  "value": "string",
                  "description": "ID of the archive"
                }
              ],
              "query": []
            },
            "description": "Delete a specified archive"
          },
          "response": []
        },
        {
          "name": "Enable or disable sharing of archive",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/archives/:archiveId/share/:action",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "archives",
                ":archiveId",
                "share",
                ":action"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                },
                {
                  "key": "archiveId",
                  "value": "string",
                  "description": "ID of the archive"
                },
                {
                  "key": "action",
                  "value": "on",
                  "description": "Action of the sharing"
                }
              ],
              "query": []
            },
            "description": "Enable or disable sharing of a specified archive"
          },
          "response": []
        },
        {
          "name": "Get archive snapshot",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/archives/:archiveId/snapshot",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "archives",
                ":archiveId",
                "snapshot"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                },
                {
                  "key": "archiveId",
                  "value": "string",
                  "description": "ID of the archive"
                }
              ],
              "query": []
            },
            "description": "Retrieve a snapshot of a specified archive"
          },
          "response": []
        },
        {
          "name": "Get archive snapshot URL",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/archives/:archiveId/snapshot/url",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "archives",
                ":archiveId",
                "snapshot",
                "url"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                },
                {
                  "key": "archiveId",
                  "value": "string",
                  "description": "ID of the archive"
                }
              ],
              "query": []
            },
            "description": "Retrieve the snapshot URL of a specified archive"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Authentication (Deprecated)",
      "item": [
        {
          "name": "Authenticate user (Deprecated)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/auth",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "auth"
              ],
              "variable": [],
              "query": []
            },
            "description": "⚠️ **DEPRECATED**: This endpoint is deprecated and will be removed in a future version. Please use the new authentication method instead.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"string\",\n  \"password\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Refresh access token (Deprecated)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/refresh",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "refresh"
              ],
              "variable": [],
              "query": []
            },
            "description": "⚠️ **DEPRECATED**: This endpoint is deprecated and will be removed in a future version. Please use the new token refresh method instead.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"refresh_token\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "VORTEXAI",
      "item": [
        {
          "name": "Count objects",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/deepsearch/count",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "deepsearch",
                "count"
              ],
              "variable": [],
              "query": []
            },
            "description": "counting the number of objects that match the given conditions and appear between start and end time",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"start\": \"2025-05-12T06:10:59Z\",\n  \"end\": \"2025-05-14T06:10:59Z\",\n  \"mac_list\": [\n    \"0002D19B5F96\"\n  ],\n  \"obj_type\": \"Human\",\n  \"re\": {\n    \"LineCrossingDetection\": {\n      \"Direction\": \"Any\",\n      \"Line\": [\n        {\n          \"x\": 5598,\n          \"y\": 3042\n        },\n        {\n          \"x\": 6874,\n          \"y\": 3890\n        },\n        {\n          \"x\": 8033,\n          \"y\": 3428\n        }\n      ]\n    }\n  },\n  \"attributes\": {\n    \"Accessories\": [\n      \"Hat\"\n    ],\n    \"Age\": \"Adult\",\n    \"Color\": [\n      \"Red\"\n    ],\n    \"Gender\": \"Male\",\n    \"LowerColor\": [\n      \"Red\"\n    ],\n    \"Type\": \"Car\",\n    \"UpperColor\": [\n      \"Red\"\n    ]\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Devices",
      "item": [
        {
          "name": "Get all devices",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices"
              ],
              "variable": [],
              "query": [
                {
                  "key": "nextToken",
                  "value": "string",
                  "description": "Next token for pagination",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "string",
                  "description": "Limit the result count for pagination",
                  "disabled": true
                },
                {
                  "key": "permission",
                  "value": "deepsearch",
                  "description": "Filter devices based on permission level",
                  "disabled": true
                }
              ]
            },
            "description": "Retrieve information about all devices under the default organization"
          },
          "response": []
        },
        {
          "name": "Get specified device",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                }
              ],
              "query": []
            },
            "description": "Retrieve information about specified device"
          },
          "response": []
        },
        {
          "name": "Update specified device config",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                }
              ],
              "query": []
            },
            "description": "Update configuration of specified device",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Create archive",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/archive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "archive"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                }
              ],
              "query": []
            },
            "description": "Create an archive of a specified device in a specified time range under the default organization. It's expected that the generated archive file may exceed the length you specified.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"startTimestamp\": 0,\n  \"endTimestamp\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Get device DOs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/digital-outputs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "digital-outputs"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                }
              ],
              "query": []
            },
            "description": "Fetch the list of DOs (Digital Output) available on a specific device."
          },
          "response": []
        },
        {
          "name": "Trigger device DO",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/digital-outputs/:index/trigger",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "digital-outputs",
                ":index",
                "trigger"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                },
                {
                  "key": "index",
                  "value": "0",
                  "description": "Index of the DO to be triggered"
                }
              ],
              "query": []
            },
            "description": "Trigger a DO (Digital Output) on a device for a specified duration in seconds.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"duration\": 2\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Export a video segment and upload it to a specified URL",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "export"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "The ID of the device capturing the video."
                }
              ],
              "query": []
            },
            "description": "Export job creation safeguards: only camera devices are allowed. A maximum of 3 export jobs are allowed per device. Requests above this limit are rejected.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"type\": \"DEVICE_EXPORT_VIDEO\",\n  \"startTime\": \"2024-06-19T02:09:34.903Z\",\n  \"endTime\": \"2024-06-19T02:09:49.903Z\",\n  \"uploadUrl\": \"https://your-upload-url.com/path/to/upload\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Get the status of a video export job",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/jobs/:jobId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "jobs",
                ":jobId"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "The ID of the device capturing the video."
                },
                {
                  "key": "jobId",
                  "value": "00000000-0000-0000-0000-000000000000",
                  "description": "The ID of the video export job to retrieve the status for."
                }
              ],
              "query": []
            },
            "description": "Get the status of a video export job"
          },
          "response": []
        },
        {
          "name": "Get device snapshot",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/snapshot",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "snapshot"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                }
              ],
              "query": [
                {
                  "key": "timestamp",
                  "value": "0",
                  "description": "Unix timestamp in seconds; if not specified, the latest snapshot will be returned",
                  "disabled": true
                },
                {
                  "key": "precision",
                  "value": "second",
                  "description": "Determines the snapshot retrieval option.",
                  "disabled": true
                }
              ]
            },
            "description": "This API provides two options for retrieving a device snapshot, determined by the value of the 'precision' query string. Setting precision=second uses Option B for high-precision snapshots, ideal for exact timing, with 1–10s intervals via direct camera access.\n\nOption A: Low-Precision Snapshot\n\n- Quickly delivers snapshots, typically within milliseconds (via VORTEX Cloud).\n\n- Ideal for scenarios where you need quick access to a snapshot.\n\nAPI Usage:\n\n- If no timestamp is provided: It retrieves the snapshot cached by the system minutes to hours ago.\n\n- If a timestamp is provided: It retrieves the snapshot closest to that timestamp.\n\nOption B: High-Precision Snapshot (1s to 10s Interval)\n\n- Takes more time to deliver snapshots, requiring a few seconds (via direct command to VORTEX Camera).\n\n- Best for detailed analysis where precise timing is critical. Ideal for scenarios where the exact moment of the snapshot is important.\n\nAPI Usage:\n\n- If no timestamp is provided: It returns the latest device snapshot with precision to the second.\n\n- If a timestamp is provided: It only supports returning snapshots from within the last 10 seconds."
          },
          "response": []
        },
        {
          "name": "Get device snapshot URL",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/devices/:deviceId/snapshot/url",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "devices",
                ":deviceId",
                "snapshot",
                "url"
              ],
              "variable": [
                {
                  "key": "deviceId",
                  "value": "string",
                  "description": "ID of the device"
                }
              ],
              "query": [
                {
                  "key": "timestamp",
                  "value": "0",
                  "description": "Unix timestamp in seconds; if not specified, the latest snapshot URL will be returned",
                  "disabled": true
                }
              ]
            },
            "description": "Get the URL of a snapshot of a specified device. This endpoint uses low-precision snapshots with 20s to 1 minute intervals.\n\nLow-Precision Snapshot (20s to 1 Minute Interval)\n\n- Quickly delivers snapshots, typically within milliseconds (via VORTEX Cloud).\n\n- Best for real-time monitoring when speed is more important than precise timing. Ideal for scenarios where you need quick access to a snapshot.\n\nAPI Usage:\n\n- If no timestamp is provided: It fetches the latest snapshot that updates every minute.\n\n- If a timestamp is provided: It retrieves the snapshot closest to that timestamp, with snapshots updating every 20 seconds and writing to a file every minute (after every 3 snapshots)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Groups",
      "item": [
        {
          "name": "Get all groups",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/groups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "groups"
              ],
              "variable": [],
              "query": [
                {
                  "key": "nextToken",
                  "value": "string",
                  "description": "Next token for pagination",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "string",
                  "description": "Limit the result count for pagination",
                  "disabled": true
                }
              ]
            },
            "description": "Retrieve information about accessible groups under the default organization"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Organizations",
      "item": [
        {
          "name": "Get all organizations",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/organizations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "organizations"
              ],
              "variable": [],
              "query": []
            },
            "description": "Retrieve a list of accessible organizations"
          },
          "response": []
        }
      ]
    }
  ]
}
