incident.io
Port's incident.io integration syncs incidents, alerts, the people involved, the teams that own them, and who is on call into your context lake.
Prerequisites
Create an API key
- In incident.io, open API keys.
- Create a key that can read incidents, alerts, users, teams, and schedules.
| Kind | API | Scope |
|---|---|---|
| User | GET /v2/users | users.view |
| Team | GET /v3/teams | catalog_entries.view |
| Schedule | GET /v2/schedules | schedules.view |
| Incident | GET /v2/incidents | View incidents. The list reference does not name a separate scope. |
| Alert | GET /v2/alerts | alerts.view |
If a kind's permission is missing, that kind's resync fails and Port keeps the entities already ingested for it. The other kinds still sync.
The API origin defaults to https://api.incident.io. Set incidentIoApiUrl only when you need a different https origin.
Setup
Choose one of the following installation methods. Not sure which method is right for your use case? Check the available installation methods.
The prerequisites required for installation are listed below.
-
Go to the incident.io Connectors page in Port.
-
Under
Select your installation method, chooseHosted by Port. -
Configure the
Installation parametersandAdvanced configurationas you wish (see below for details).
Installation parameters
Each integration requires specific parameters (such as an API token, a URL, etc.), as seen in Port's UI when installing it. Hover over the ⓘ icon next to each parameter to see more details about it.
Advanced configuration
- During the installation process each integration may have additional settings under the
Advanced configurationsection in Port's UI. Additionally, each integration has one or more settings that can be configured after installation. To do so, click on the integration's name in the Connectors page and navigate to theSettingtab. Hover over the ⓘ icon next to each setting to see more details about it.
Port secrets
Some integration settings require sensitive pieces of data, such as tokens. For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.
When filling in such a setting, its value will be obscured (shown as ••••••••).
For each such setting, Port will automatically create a secret in your organization.
To see all secrets in your organization, follow these steps.
Port source IP addresses
When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses. You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:
- Europe (EU):
54.73.167.226,63.33.143.237,54.76.185.219 - United States (US):
3.234.37.33,54.225.172.136,3.225.234.99
-
Go to the incident.io Connectors page in the Port app.
-
Select the
Self-hostedmethod. -
A
helmcommand will be displayed, with default values already filled out (e.g. your Port client ID, client secret, etc). Copy the command, replace the placeholders with your values, then run it in your terminal to install the integration.
Live event support
Currently, live events are not supported for this integration.
Resyncs will be performed periodically (with a configurable interval), or manually triggered by you via Port's UI.
Therefore, real-time events (including GitOps) will not be ingested into Port immediately.
Live events support for this integration is WIP and will be supported in the near future.
The resync interval can be configured using the scheduledResyncInterval parameter. See the optional parameters section below for more details.
Scalable mode for large integrations
If you are deploying the integration at scale and want to decouple the resync process from the live events process (recommended for large or high-throughput environments), you can enable scalable mode by adding the following flags to your Helm install command:
--set workload.kind="CronJob" \
--set workload.cron.resyncTimeoutMinutes=60 \
--set scheduledResyncInterval="'*/60 * * * *'" \
--set liveEvents.worker.enabled=true
Required parameters:
port.clientId- Your Port client ID.port.clientSecret- Your Port client secret.port.baseUrl- Your Port API URL:https://api.port.iofor EU,https://api.us.port.iofor US.integration.identifier- Identifier for this integration installation.integration.type- The integration type.integration.eventListener.type- The event listener type.integration.secrets.incidentIoApiKey- incident.io API key. See API keys.
Optional parameters (click to expand)
integration.config.incidentIoApiUrl- incident.io API origin. Defaults tohttps://api.incident.io.scheduledResyncInterval- The number of minutes between each resync.initializePortResources- Whentrue, the integration creates the default blueprints and mapping. Defaults totrue.
- GitHub
- Jenkins
- Azure DevOps
- GitLab
- Go to the incident.io Connectors page in the Port app.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitHub Actions secret |
|---|---|---|---|
port_client_id | Your Port client ID (How to get the credentials). | ✓ | ✓ |
port_client_secret | Your Port client secret (How to get the credentials). | ✓ | ✓ |
port_base_url | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
incident_io_api_key | incident.io API key with access to view incidents, plus the users.view, alerts.view, catalog_entries.view, and schedules.view scopes. | ✓ | ✓ |
incident_io_api_url | incident.io API origin. Defaults to https://api.incident.io. | ✗ | ✗ |
initialize_port_resources | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
integration_identifier | The identifier of the integration that will be installed. | ✗ | ✗ |
send_raw_data_examples | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Your Jenkins agent must be able to run Docker commands.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a Jenkins credential (Secret Text) |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | incident.io API key with access to view incidents, plus the users.view, alerts.view, catalog_entries.view, and schedules.view scopes. | ✓ | ✓ |
OCEAN__ | incident.io API origin. Defaults to https://api.incident.io. | ✗ | ✗ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a Jenkinsfile pipeline file:Jenkins pipeline (click to expand)
Prerequisites
- Your Azure Devops agent should be able to run docker commands. Learn more about agents here.
- You must have permissions to create and manage Azure DevOps variable groups for storing credentials.
Set up your credentials
- Create a Variable Group: Name it port-ocean-credentials.
- Store the required variables (see the table below).
- Authorize Your Pipeline:
-
Go to "Library" -> "Variable groups."
-
Find port-ocean-credentials and click on it.
-
Select "Pipeline Permissions" and add your pipeline to the authorized list.
-
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as an Azure DevOps pipeline variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | incident.io API key with access to view incidents, plus the users.view, alerts.view, catalog_entries.view, and schedules.view scopes. | ✓ | ✓ |
OCEAN__ | incident.io API origin. Defaults to https://api.incident.io. | ✗ | ✗ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a azure-pipeline.yml pipeline file:Azure pipeline (click to expand)
- Go to the incident.io Connectors page in the Port app.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitLab CI/CD variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | incident.io API key with access to view incidents, plus the users.view, alerts.view, catalog_entries.view, and schedules.view scopes. | ✓ | ✓ |
OCEAN__ | incident.io API origin. Defaults to https://api.incident.io. | ✗ | ✗ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Configuration
Port integrations use a YAML mapping block to ingest data from the third-party API into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
Default mapping configuration
This is the default mapping configuration for this integration:
Default mapping configuration (click to expand)
deleteDependentEntities: true
createMissingRelatedEntities: false
resources:
- kind: user
selector:
query: 'true'
includeInactive: false
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"incidentIoUser"'
properties:
email: .email
role: .base_role.name
isActive: .is_active
slackUserId: .slack_user_id
onCallSeat: .seats.on_call
responseSeat: .seats.response
- kind: team
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"incidentIoTeam"'
properties:
externalId: .catalog_entry.external_id
memberCount: '(.members // []) | length'
relations:
members: '[.members[]?.id // empty]'
- kind: schedule
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"incidentIoSchedule"'
properties:
timezone: .timezone
currentOnCall: '[.current_shifts[]?.user.name // empty] | unique'
currentShiftEndsAt: '[.current_shifts[]?.end_at // empty] | sort | .[0]'
link: .permalink
relations:
teams: '.team_ids // []'
onCall: '[.current_shifts[]?.user.id // empty] | unique'
- kind: alert
selector:
query: 'true'
daysBack: 90
port:
entity:
mappings:
identifier: .id
title: .title
blueprint: '"incidentIoAlert"'
properties:
description: .description
status: .status
priority: '[.attributes[]? | select((.attribute.name // "") | ascii_downcase == "priority") | .value.label // .value.literal // empty][0]'
sourceUrl: .source_url
deduplicationKey: .deduplication_key
createdAt: .created_at
updatedAt: .updated_at
- kind: incident
selector:
query: 'true'
daysBack: 90
port:
entity:
mappings:
identifier: .id
title: .reference + " " + .name
blueprint: '"incidentIoIncident"'
properties:
reference: .reference
summary: .summary
status: .incident_status.name
statusCategory: .incident_status.category
severity: .severity.name
mode: .mode
visibility: .visibility
incidentType: .incident_type.name
createdAt: .created_at
updatedAt: .updated_at
lastActivityAt: .last_activity_at
slackChannel: .slack_channel_name
workloadMinutes: .workload_minutes_total
link: .permalink
postmortemUrl: .postmortem_document_url
relations:
teams: '.team_ids // []'
lead: '[.incident_role_assignments[]? | select(.role.role_type == "lead") | .assignee.id // empty][0]'
creator: .creator.user.id
Monitoring and sync status
To learn more about how to monitor and check the sync status of your integration, see the relevant documentation.
Mapping and selectors per resource
Use the explorer below to view the blueprint, the default mapping, a sample payload, and the resulting Port entity for each resource.
{
"identifier": "incidentIoUser",
"title": "incident.io User",
"icon": "User",
"schema": {
"properties": {
"email": {
"type": "string",
"format": "user",
"title": "Email"
},
"role": {
"type": "string",
"title": "Role"
},
"isActive": {
"type": "boolean",
"title": "Active"
},
"slackUserId": {
"type": "string",
"title": "Slack user ID"
},
"onCallSeat": {
"type": "string",
"title": "On-call seat"
},
"responseSeat": {
"type": "string",
"title": "Response seat"
}
},
"required": []
},
"relations": {}
}
- kind: user
selector:
query: 'true'
includeInactive: false
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"incidentIoUser"'
properties:
email: .email
role: .base_role.name
isActive: .is_active
slackUserId: .slack_user_id
onCallSeat: .seats.on_call
responseSeat: .seats.response
{
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"email": "lisa@example.com",
"role": "owner",
"is_active": true,
"slack_user_id": "U02AYNF2XJM",
"base_role": {
"id": "01FCNDV6P870EA6S7TK1DSYDG4",
"name": "Owner",
"slug": "owner"
},
"custom_roles": [],
"seats": {
"on_call": "full_access",
"response": "full_access"
}
}
{
"identifier": "01FCNDV6P870EA6S7TK1DSYDG0",
"title": "Lisa Karlin Curtis",
"blueprint": "incidentIoUser",
"icon": "User",
"team": [],
"properties": {
"email": "lisa@example.com",
"role": "Owner",
"isActive": true,
"slackUserId": "U02AYNF2XJM",
"onCallSeat": "full_access",
"responseSeat": "full_access"
}
}
Below are the supported selectors for this resource. Use them under the selector key in your integration mapping configuration to control which resources are returned from the API.
| Selector | Type | Description |
|---|---|---|
includeInactive | boolean | Also sync deactivated and not-yet-active users. Default: false. |
Sync behavior
Relations point at users and teams that were synced. Missing targets are not created as placeholder entities.
status is the org's status name, stored as a string, so a renamed status still syncs. statusCategory is the stable API value (triage, live, learning, and the rest) and keeps a color per category. postmortemUrl is set only when the incident has postmortem_document_url.
Incremental sync
Incidents also sync on the incremental interval. The incident list filter only accepts a calendar date (yyyy-mm-dd), so an incremental run re-reads incidents updated on the cursor's UTC day, still inside daysBack. It updates those incidents and leaves the rest of the catalog until the next full resync.
Alerts also sync on the incremental interval. updated_at accepts a timestamp, so that run starts at the cursor and stays inside daysBack. priority is taken from an alert attribute named Priority.
Full resync
A full resync deletes incidents and alerts created outside daysBack. Users, teams, and schedules refresh on the full resync only. Who is on call comes from current_shifts, which changes as the rotation turns without changing the schedule's updated_at.
The incidents list is limited to 60 requests per minute. The other list endpoints share the account limit of 1200 requests per minute. The client stays under both, and Ocean retries 429 and 5xx responses.
To view and test the mapping against live API responses, use the jq playground in your connectors page.