Skip to content

web sdk system endpoints

Andre Lafleur edited this page Apr 25, 2026 · 7 revisions

Querying system information

The Web SDK provides endpoints for querying license usage, generating authentication tokens, and controlling server-wide exception handling behavior.

License usage

Retrieve the current and maximum allowed counts for licensed items in the system.

Listing all license item usage

GET /licenseItemUsage

Response

{
  "Rsp": {
    "Status": "Ok",
    "Result": {
      "Camera": {
        "CurrentCount": 8,
        "MaximumCount": 100000
      },
      "Door": {
        "CurrentCount": 0,
        "MaximumCount": 100000
      },
      "Cardholder": {
        "CurrentCount": 16,
        "MaximumCount": 1000000
      }
    }
  }
}

The response contains an entry for every licensed item type in the system. Each entry has two fields:

  • CurrentCount: The number of items currently in use
  • MaximumCount: The maximum number of items allowed by the license. A value of -1 indicates no limit.

Querying a specific license item

GET /licenseItemUsage/{item-name}

Replace {item-name} with the name of the license item (e.g., Camera, Door, Cardholder). The name is case-sensitive and must match exactly.

Response

{
  "Rsp": {
    "Status": "Ok",
    "Result": {
      "CurrentCount": 8,
      "MaximumCount": 100000
    }
  }
}

An invalid or wrongly-cased item name returns HTTP 400 with an HTML error body rather than a JSON Rsp envelope.

Web tokens

Generate signed JWT tokens for the authenticated session. The tokens contain Genetec-specific claims that identify the user, their administrator status, and the issuing Security Center system.

Getting an encoded token

GET /GetWebTokenEncoded

Response

{
  "Rsp": {
    "Status": "Ok",
    "Result": {
      "ErrorDescription": null,
      "Success": true,
      "Token": "eyJhbGciOiJSUzI1NiIs..."
    }
  }
}

Response fields

  • Success: true if the token was generated successfully
  • Token: The JWT token string in compact serialized form
  • ErrorDescription: null on success, or an error message if token generation failed

Getting a decoded token

GET /GetWebTokenDecoded

Returns the JWT payload as a JSON object instead of the encoded token string.

Response

{
  "Rsp": {
    "Status": "Ok",
    "Result": {
      "http://genetec.com/Claims/Name": "Admin",
      "http://genetec.com/Claims/UserId": "00000000000000000000000000000003",
      "http://genetec.com/Claims/IsAdmin": 1,
      "nbf": 1772129813,
      "exp": 1772158613,
      "iat": 1772129813,
      "iss": "GenetecSts://4f970080738a4f2b8890ec960e1d0352",
      "aud": "genetec://WebToken"
    }
  }
}

Token claims

  • http://genetec.com/Claims/Name: The display name of the authenticated user
  • http://genetec.com/Claims/UserId: The GUID of the authenticated user (without hyphens)
  • http://genetec.com/Claims/IsAdmin: 1 if the user is an administrator, 0 otherwise
  • nbf: The "not before" timestamp (Unix epoch seconds)
  • exp: The token expiration timestamp (Unix epoch seconds)
  • iat: The "issued at" timestamp (Unix epoch seconds)
  • iss: The token issuer identifier
  • aud: The intended audience for the token

Exception handling

Control how the Web SDK handles exceptions from method calls and collection updates during q= query processing.

POST /ignoreremoteexception/{state}

Replace {state} with true or false.

  • true: Exceptions from method calls and collection updates are suppressed. The failed operation is omitted from the response and the request returns Rsp.Status="Ok" when the remaining query segments succeed.
  • false: Exceptions are reported normally as Rsp.Status="Fail". This is the default behavior.

This flag does not affect property read errors, property write errors, query parsing errors, or indexed collection reads such as Credentials[0]. Those still fail regardless of this setting.

Warning

This flag is process-wide on the Web SDK instance. Setting it from one session affects every other caller on that instance until it is changed again. Set it back to false when you are done.

Successful response

{
  "Rsp": {
    "Status": "Ok"
  }
}

Error response for invalid state value

{
  "Rsp": {
    "Status": "Fail",
    "Result": {
      "SdkErrorCode": "InvalidValue",
      "Message": "Invalid value [invalid]"
    }
  }
}

Platform SDK

Plugin SDK

Workspace SDK

Media SDK

Macro SDK

Web SDK

Media Gateway

Genetec Web Player

Clone this wiki locally