Set Integration Panel
Create or replace a custom Integration Panel definition.
PUT https://api.sonorancad.com/v2/integration-panels/{panelKey}
Rate limit:
30 requests per minuteper API key.
Create a new panel or replace the complete definition of an existing panel. If definition.key is present, it must match panelKey.
Path Parameters
panelKey
string
Stable 2-80 character panel key.
Request Body
definition
object
Yes
Complete schema version 1 panel definition.
See the Manifest Reference for every definition option.
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 definition = {
schemaVersion = 1,
key = "example.fire-alarms",
name = "Fire Alarm",
icon = "fas fa-bell",
surfaces = { "dispatch", "fire" },
body = {
{ type = "text", text = "Connected to the alarm controller." }
}
}
local response = sonoran.cad:setIntegrationPanelV2("example.fire-alarms", definition)
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
Sonoran.js
Sonoran.Net
Import this YAML into Postman with Import -> Raw text.
Response
Last updated
Was this helpful?

