Installing
Your first request
You’ll need an API key from Settings > API keys (see API keys). Then:HttpClient, so create one and reuse it.
Finding an endpoint
The methods follow the URL:GET /v2/incidentsisclient.V2.Incidents.GetAsync().GET /v2/incidents/{id}isclient.V2.Incidents[id].GetAsync().POST /v2/incidentsisclient.V2.Incidents.PostAsync(body).
/v2/alert_attributes is client.V2.AlertAttributes. Every method is async and takes an optional CancellationToken. Query parameters go on request.QueryParameters, and request and response types live in IncidentIo.Models.
Pagination
List endpoints are cursor-paginated. Read the next cursor fromPaginationMeta.After and pass it back:
Filtering
Some list endpoints take filters in the formfield[operator]=value, like status[one_of]=firing. The generator can’t express these as typed parameters, so the SDK leaves them out. You can still use them: pass them in the URL with WithUrl, which keeps authentication and everything else about the request.
Uri.EscapeDataString if they can contain &, =, or spaces.
Errors
A documented error status throwsIncidentIo.Models.ErrorResponse, which carries the API’s error body. Anything else throws Kiota’s ApiException, which ErrorResponse derives from:
RequestId.
Configuration
HttpClient, you can build the client from a Kiota request adapter instead. The README shows how.
Retries
Unlike most of our other SDKs, this one retries for you. Requests that fail with429, 503, or 504 are retried up to three times, honouring the Retry-After header the API sends when you hit the rate limit.
One thing to watch out for: a retried POST can be applied twice if the first attempt reached us before failing. Creating an incident or an escalation takes an IdempotencyKey for exactly this reason, so set it.
Enum values
We add enum values as a backwards-compatible change. When a response carries a value your version of the SDK doesn’t know, that property reads asnull rather than throwing, and the rest of the response is unaffected. Upgrade the package to see the new value.
Deprecated endpoints
Endpoints we’ve deprecated stay available and are marked[Obsolete], so the compiler warns at the call site (CS0618). Don’t go by the version in the name: some V2 endpoints are deprecated too. If you build with TreatWarningsAsErrors, add CS0618 to WarningsNotAsErrors so a newly deprecated endpoint doesn’t fail your build.
Versioning
The SDK is kept up to date with the API automatically. Additions to the API are minor versions. A change that would break your code, like a removed type or member, is released as a new major version, and its release notes list what changed.Resources
NuGet
The
IncidentIo package and its versions.GitHub
Source, README, and issues for the .NET SDK.
API reference
Endpoints, authentication, rate limits, and errors.
All SDKs
Clients for Go, TypeScript, Python, Rust, Ruby, and PHP.