Integration Information
Use the REST API to fetch integration information including settings and errors
Authenticating
To begin, you will need to authenticate to the Polarity Server to obtain a reusable bearer token that will be used with subsequent authenticated requests.
See Authentication for information on how to authenticate to the Polarity Platform and acquire an authentication token. The authentication token will be used in all the requests outlined below and is referenced in examples as <AUTH_TOKEN>
.
Get Integrations
You can retrieve information about integrations by using the GET /api/integrations
endpoint. This endpoint will return information about integrations installed on your server to include running status, integration option values, and references to any integration errors.
Examples
Paging
The default page size for the endpoint is 100 which means if you have more than 100 installed integrations you will need to increase the page size or page through the results using the page[size]
and page[number]
query parameters. The parameter page[size]
tells the endpoint the maximum number of results to return and the parameter page[number]
tells the endpoint which page of results to return.
Filtering
Integration Status
You can return only integrations that are running by using the query parameter filter[integration.status]=running
Integration Errors
You can return only integrations with errors using the filter[integration.integration-errors]=true
query parameter.
Return Payload Format
The endpoint will return a JSON payload with a list of integration models as part of a top level data
key. In addition, there will be a top level meta
key which contains paging information including the page.total
attribute which indicates the total number of integrations that could be returned by the endpoint given the applied filtering.
Each integration model contained within data
will have the following structure:
Integration Attributes
To view a full list of integration attributes returned by the fetch integration endpoints see the Integration Attributes page.
Get Integration Errors
You can fetch all integration errors using the GET /api/integrations/errors
endpoint. Only integration managers and Polarity admins are able to view errors for integrations.
Examples
Return Payload Format
The errors endpoint will return an array of error models within a top level data
attribute.
The error model has the following format:
Error Attributes
Each error model has fixed attributes common to all errors and then also includes a meta
attribute which contains integration specific error information.
code
string
A short error description
title
string
A title for the error
detail
string
A more detailed description of the error
error-count
number
The number of times the specific error has occurred.
integration-id
string
The id of the integration that returned the error
meta
object
An object containing integration specific error details. This meta
property typically contains detailed information to include stack traces and integration specific REST API error information including HTTP status codes returned by the REST API the integration is accessing.
meta.affected_users
object
The meta.affected_users
attribute contains one or more user objects. The user objects include a user id
and username
attribute for Polarity users that triggered/caused the specific error. This attribute, when available, can be used to determine which users are affected by a specific error.
occurred-on
string
An ISO 8601 formatted date-time string detailing the the last time the error occurred (e.g., 2024-04-08 14:20:07.834943Z
)
status
number
An HTTP status code associated with the error
Last updated