For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Integration Panel

Get one active integration panel and its stored instances.

GET https://api.sonorancad.com/v2/integration-panels/{panelKey}

Rate limit: 120 requests per minute per API key.

Get one active integration panel and its stored instances.

Path Parameters

Name
Type
Description

panelKey

string

Stable panel key.

Example Request

-- luarocks install sonoran.lua
local Sonoran = require("sonoran")
local sonoran = Sonoran.createClient({
  product = Sonoran.productEnums.CAD,
  communityId = "YOUR_COMMUNITY_ID",
  apiKey = "YOUR_API_KEY",
  defaultServerId = 1
})

local response = sonoran.cad:getIntegrationPanelV2("example.fire-alarms")
print(response.success)

Use this tab from the server side of a FiveM resource. Never expose the API key to client scripts.

Sonoran.lua and Sonoran.js use the configured client exported by sonorancad. Sonoran.Net must read the CAD convars and create a client. Grant the resource access to the protected key with add_convar_permission your-resource-name read sonoran_apiKey.

Sonoran.lua

local cad = exports["sonorancad"]:getCadClient()
local response = cad:getIntegrationPanelV2("example.fire-alarms")
print(response.success)

Sonoran.js

(async () => {
  const cad = exports["sonorancad"].getCadClient();
  const response = await cad.getIntegrationPanelV2('example.fire-alarms');
  console.log(response.success ? response.data : response.reason);
})();

Sonoran.Net

using CitizenFX.Core.Native;
using Sonoran;

var communityId = API.GetConvar("sonoran_communityID", "");
var apiKey = API.GetConvar("sonoran_apiKey", "");
var serverId = int.TryParse(API.GetConvar("sonoran_serverId", "1"), out var parsed) ? parsed : 1;

using var sonoran = new SonoranClient(new SonoranClientOptions
{
    product = SonoranProduct.CAD,
    communityId = communityId,
    apiKey = apiKey,
    defaultServerId = serverId
});

var response = await sonoran.Cad.getIntegrationPanelV2("example.fire-alarms");

Import this YAML into Postman with Import -> Raw text.

Response

Last updated

Was this helpful?