đšī¸ Trigger your Integration
This guide explains how you can trigger your integration using Port.
After setting up & running your integration, you can trigger it using Port's UI/API.
Triggering your integration will run the integration resync and will resync all the data from the source into port and creating new data, update existing data and delete data that no longer exists in the source by doing so.
If a resync event is received by your integration while it is actively performing a resync, the currently running resync will be aborted and a new resync process will start.
If a new resync trigger consistently aborts a running resync, it means that your integration never finishes a complete resync process (which means some information from the 3rd-party system might never appear in Port).
Triggering using Port's UIâ
-
Login to Port and browse to the builder page.
-
Open the ingest modal by expanding one of the blueprints and clicking the ingest button on the blueprint.
or
-
Select the integration you want to trigger a resync for from the list of your installed integrations.
-
Click on the
Resync
button.
Triggering using Port's APIâ
By patching the integration either with a new configuration or by patching it with no changes, The integration will detect the trigger and perform a resync.
- Swagger
- cURL
- Python
- Navigate to the Port API.
- Click on the
Authorize
button and set your token in theValue
field. - Under the
Integrations
section, use the integration PATCH route using the integration identifier as specified in theconfig.yaml
file of your integration.
curl -X PATCH \
-H "Authorization: Bearer YOUR_JWT_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{}' \
https://api.getport.io/v1/integration/YOUR_INTEGRATION_IDENTIFIER_HERE
import requests
integration_identifier = "YOUR_INTEGRATION_IDENTIFIER_HERE"
jwt_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://api.getport.io/v1/integration/{integration_identifier}"
headers = {
"Authorization": f"Bearer {jwt_token}",
"Content-Type": "application/json"
}
response = requests.patch(url, headers=headers, json={})