☁️

API Integration

API / data

How long is our incident history stored in Allma's webapp?

Allma currently retains all your incident history for you in our Allma webapp without a time limit. Your data is there as long as you have an account with Allma.

Does Allma have an API?

Yes. See our developer documentation for the API key and to access.

Can I use Allma's API to ETL my data?

Yes, you can ETL your data via our API Keys to your data tool of choice. Just log in to Allma webapp to access.

2. Login with your Slack account

4. Run the following mutation to generate a new API key. Name it semantically after its use. NOTE: These keys are scoped to the user who generated them. If an admin generates the key, it will have their administrative privileges to use the mutations that allow setting changes, etc.

mutation {
  createApiKey(input:{name:"Snowflake"}) {
    name
    value
  }
}

5. Copy the value that is returned in the output.

{
  "data": {
    "createApiKey": {
      "name": "Snowflake",
      "value": "151f16zcz5343fake123445435498fsdf"
    }
  }
}

6. Test using cURL or some other tool by using the value from step 4 as the authorization header on the request.

7. Example of how to test/use the API:

curl -H "Content-Type: application/json" -H "Authorization: Bearer {API_KEY_FROM_STEP_5}" https://app.allma.io/graphql -d '{ "query": "{ workspace { id name } }" }'

Examples

To return a list of Incidents with details on their state and time to resolution.

query Incidents{
  incidents {
    nodes{
      name,
      createdOn,
      declaredOn,
      identifiedOn,
      mitigatedOn,
      isResolved,
      resolvedOn,
      incidentStatusId,
      timeToIdentifiedMinutes,
      timeToMitigatedMinutes,
      timeToResolvedMinutes
    }
  }
}

Will return:

{
	"data": {
		"incidents": {
			"nodes": [{
					"name": "The first incident! :tada:",
					"createdOn": "2020-06-05T22:52:44.000Z",
					"declaredOn": null,
					"identifiedOn": null,
					"mitigatedOn": null,
					"isResolved": true,
					"resolvedOn": "2020-06-05T22:55:30.000Z",
					"incidentStatusId": "RESOLVED",
					"timeToIdentifiedMinutes": 0,
					"timeToMitigatedMinutes": 0,
					"timeToResolvedMinutes": 2.7666666666666666
				},
				{
					"name": "Bot connectivity issues",
					"createdOn": "2020-12-18T20:01:09.000Z",
					"declaredOn": null,
					"identifiedOn": "2020-12-18T20:13:08.000Z",
					"mitigatedOn": "2020-12-18T20:13:27.000Z",
					"isResolved": true,
					"resolvedOn": "2020-12-18T20:49:23.000Z",
					"incidentStatusId": "RESOLVED",
					"timeToIdentifiedMinutes": 11.983333333333333,
					"timeToMitigatedMinutes": 12.3,
					"timeToResolvedMinutes": 48.233333333333334
				}
			]
		}
	}
}