Trigger an import¶
This page explains how to stage an import and how to cancel an import through the Permission Assist API.
Before you begin¶
Make sure you have the following:
- API credentials (refer to Getting started)
- An application with an existing import schedule configured in Permission Assist
- A data file in the configured shared directory
Find the application ID¶
The API references applications by their unique ID. To find this value, complete the following steps:
- Log in to Permission Assist.
- Go to the Manage menu and select Applications.
- Select the application.
- Copy the application ID from the URL in your browser's address bar or from the application settings page.
Stage an import¶
To stage an import, send a POST request to the stage endpoint. The
request body includes the application ID. Permission Assist looks up the
application's configured import schedule and uses those settings to
create the import.
import requests
url = "https://[your-pa-server]/api/application-imports/stage"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer [your-token]"
}
payload = {
"applicationId": "[your-application-id]"
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code, response.json())
Understand the response¶
Success (HTTP 201):
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"kind": "Application Import",
"number": 42,
"type": "Api",
"status": "Pending",
"buildStart": null,
"buildEnd": null,
"application": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"kind": "Application",
"name": "Jack Henry Silverlake",
"priority": "Critical",
"isArchived": false,
"lastUpdated": "2026-02-20T08:15:00"
}
}
A successful response means Permission Assist staged the import and queued it for processing. It does not mean the import has finished. The background build job picks up Pending imports and runs them sequentially.
Error responses:
| HTTP Status | Meaning |
|---|---|
400 |
Application ID is missing, the application was not found, or the application is archived |
401 |
Invalid or missing API credentials |
422 |
The application does not have an import schedule configured, the connector is not available, or required file paths are not configured in the schedule |
For a complete list, refer to Error codes.
Note
You can stage multiple imports for the same application. Each call creates a separate Pending import record, and the background job processes them sequentially.
Cancel an import¶
To cancel a staged or in-progress import, send a POST request to the
cancel endpoint with the import ID.
curl -X POST https://[your-pa-server]/api/application-imports/cancel \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [your-token]" \
-d '{
"applicationImportId": "[the-import-id]"
}'
Success (HTTP 200):
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"kind": "Application Import",
"number": 42,
"type": "Api",
"status": "Canceling",
"buildStart": "2026-02-20T02:00:00",
"buildEnd": null,
"application": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"kind": "Application",
"name": "Jack Henry Silverlake",
"priority": "Critical",
"isArchived": false,
"lastUpdated": "2026-02-20T08:15:00"
}
}
The API sets the import status to Canceling. The background build job
detects this status change and stops the import. Imports that have not yet
started processing are skipped entirely.
Error responses:
| HTTP Status | Meaning |
|---|---|
400 |
Import ID is missing |
401 |
Invalid or missing API credentials |
404 |
The import was not found |
409 |
The import has already finished, failed, been canceled, or is already being canceled |
Verify the import¶
After staging an import, verify it completed successfully by checking the import results in Permission Assist.
To verify the import, complete the following steps:
- Log in to Permission Assist.
- Go to the Manage menu and select Applications.
- Select the application.
- Review the import history to confirm the import completed.
The audit trail records the name of the API token that triggered the import, so you can distinguish API-triggered imports from manual or scheduled imports.