Connect Opsgenie, or change the connection
Checks the API key with Opsgenie before keeping anything and keeps it in the secret store; the key is write-only and is never returned. The first connection also makes the signing token and returns it once in `signingToken`; connecting again changes the name, region, toggle and, when `apiKey` is giv
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
Idempotency-Key?stringMakes retries safe. A repeated key with the same request returns the first result and sets
Idempotent-Replayed: true. The same key with a different request answers 409
idempotency.key_reused, and while the first request is still running 409
idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack
of sign-in or permission are not kept, so a retry runs again.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
name*string1 <= length <= 100region*stringUS uses api.opsgenie.com, EU uses api.eu.opsgenie.com.
"us""eu"apiKey?stringThe API key. Required the first time; later an empty one keeps the key that is there. Never returned.
openAlerts?booleanCreate an Opsgenie alert when Wardn opens an incident on its own.
The connection.
application/json- response
name*stringregion*string"us""eu"baseUrl*stringThe REST API's address for the region.
webhookPath*stringThe address Opsgenie is told to call, such as /api/v1/webhooks/opsgenie/<id>.
openAlerts*booleansigningToken?stringThe token webhooks must carry. Shown once, when the connection is first made.
connectedAt*stringdate-timecurl -X PUT 'https://wardn.example.com/api/v1/opsgenie' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "region": "us"}'{ "name": "string", "region": "us", "baseUrl": "string", "webhookPath": "string", "openAlerts": true, "signingToken": "string", "connectedAt": "2019-08-24T14:15:22Z"}Disconnect Opsgenie DELETE
Removes the connection, its webhook address, its credentials and what was mapped. Incidents already opened stay, and on-call groups it filled are emptied as they next sync. Disconnecting what is not connected changes nothing. Needs `integration:manage`.
Rotate the Opsgenie signing token POST
Makes a new signing token and returns it once. The old one stops working at once, so the new one must be pasted into Opsgenie. Needs `integration:manage`.