Skip to content

web sdk tasks

Andre Lafleur edited this page Mar 21, 2026 · 4 revisions

Executing saved tasks

Saved tasks are report queries stored in Security Center that you can retrieve and execute through the Web SDK. Tasks are either public (visible to all users) or private (visible only to the user who created them).

Listing saved tasks

Retrieve the list of saved tasks available to the authenticated user.

List public tasks:

GET /tasks/public

List private tasks:

GET /tasks/private

Response:

{
  "Rsp": {
    "Status": "Ok",
    "Result": [
      {
        "Guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "Name": "Daily door activity",
        "TaskType": "Door Activity"
      }
    ]
  }
}

Response fields:

  • Guid: The unique identifier for the saved task
  • Name: The display name of the saved task
  • TaskType: A display label for the report category (e.g., Door Activity, Camera Activity, Access, Alarm). Returns Not executable report when the saved task cannot be mapped to an executable report category.

The result is an empty array when no saved tasks exist.

Executing a saved task by GUID

Execute a saved task using its GUID. The server runs the report query and returns the results.

POST /tasks/execute/{task-guid}

Replace {task-guid} with the GUID returned from the listing endpoints.

Important

POST requests require the Content-Length: 0 header since there is no request body. Without this header, the request fails with HTTP 411 "Length Required".

Optional query parameter:

  • maxResultCount: Optional positive integer. Limits the number of results returned. If omitted, the server applies its own report-manager limit.
POST /tasks/execute/{task-guid}?maxResultCount=100

Successful response:

{
  "Rsp": {
    "Status": "Ok",
    "Result": []
  }
}

The Result array contains the report query results. The structure varies depending on the report type. The response status can also be TooManyResults or Partial instead of Ok.

Error response:

{
  "Rsp": {
    "Status": "Fail",
    "Result": {
      "Message": "Query unsuccessful: SystemNotRunning"
    }
  }
}

Executing a saved task by name

Execute a saved task using its type and name instead of its GUID.

Execute a public task:

POST /tasks/public/execute/{task-type}/{task-name}

Execute a private task:

POST /tasks/private/execute/{task-type}/{task-name}

Replace {task-type} with the report category display label from the task listing (e.g., Door Activity) and {task-name} with the task name. URL-encode spaces in both values.

Important

POST requests require the Content-Length: 0 header since there is no request body. Without this header, the request fails with HTTP 411 "Length Required".

Optional query parameter:

  • maxResultCount: Limits the number of results returned.

Error response when the task is not found (HTTP 404):

{
  "Rsp": {
    "Status": "Fail",
    "Result": {
      "SdkErrorCode": "InvalidValue",
      "Message": "Could not find task of type SomeType with logical name SomeName."
    }
  }
}

Security Center SDK

  • Security Center SDK Developer Guide Overview of the SDK framework and how to build integrations with Security Center.

    • Platform SDK

      • Overview Introduction to the Platform SDK and core concepts.
      • Connecting to Security Center Step-by-step guide for connecting and authenticating with the SDK.
      • SDK Certificates Details certificates, licensing, and connection validation.
      • Referencing SDK Assemblies Best practices for referencing assemblies and resolving them at runtime.
      • SDK Compatibility Guide Understanding backward compatibility and versioning in the SDK.
      • Entity Guide Explains the core entity model, inheritance, and how to work with entities.
      • Entity Cache Guide Describes the engine's local entity cache and synchronization.
      • Transactions Covers batching operations for performance and consistency.
      • Events Subscribing to real-time system events.
      • Actions Sending actions to Security Center.
      • Security Desk Displaying content on monitors, reading tiles, sending tasks, and messaging operators.
      • Custom Events Defining, raising, and subscribing to custom events.
      • ReportManager Querying entities and activity data from Security Center.
      • ReportManager Query Reference Complete reference of query types, parameters, and response formats.
      • Privileges Checking, querying, and setting user privileges.
      • Partitions Entity organization and access control through partitions.
      • Logging How to configure logging, diagnostics, and debug methods.
    • Plugin SDK

    • Workspace SDK

    • Macro SDK

      • Overview How macros work, creating and configuring macro entities, automation, and monitoring.
      • Developer Guide Developing macro code with the UserMacro class and Security Center SDK.

Web SDK Developer Guide

  • Getting Started Setup, authentication, and basic configuration for the Web SDK.
  • Referencing Entities Entity discovery, search capabilities, and parameter formats.
  • Entity Operations CRUD operations, multi-value fields, and method execution.
  • About access control in the Web SDK Concepts, relationships, and common access-control operations.
  • About video in the Web SDK Concepts, relationships, configuration, and common video operations.
  • Users and user groups Creating users, managing group membership, and assigning privileges.
  • Partitions Managing partitions, entity membership, and user access control.
  • Custom Fields Creating, reading, writing, and filtering custom entity fields.
  • Custom Card Formats Managing custom credential card format definitions.
  • Actions Control operations for doors, cameras, macros, and notifications.
  • Events and Alarms Real-time event monitoring, alarm monitoring, and custom events.
  • Incidents Incident management, creation, and attachment handling.
  • Reports Activity reports, entity queries, and historical data retrieval.
  • Tasks Listing and executing saved report tasks.
  • Macros Monitoring currently running macros.
  • Custom Entity Types Listing, retrieving, and deleting custom entity type descriptors.
  • System Endpoints License usage, web tokens, and exception handling.
  • Performance Guide Optimization tips and best practices for efficient API usage.
  • Reference Entity GUIDs, EntityType enumeration, and EventType enumeration.
  • Under the Hood Technical architecture, query reflection, and SDK internals.
  • Troubleshooting Common error resolution and debugging techniques.

Media Gateway Developer Guide


Web Player Developer Guide

  • Developer Guide Complete guide to integrating GWP for live and playback video streaming.
  • API Reference Full API documentation with interfaces, methods, properties, and events.
  • Sample Application Comprehensive demo showcasing all GWP features with timeline and PTZ controls.
  • Multiplexing Sample Multi-camera grid demo using a shared WebSocket connection.

Clone this wiki locally