Import API
This API imports declarative resources from YAML content into runtime stores or file storage.
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
clientCredentials flow, token URL /oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Full system access |
Import
Import declarative resource definitions from YAML into the runtime store, or delete resources by declaration.
Import declarative resources
POST /import
Imports one or more declarative YAML documents into runtime stores or file storage. Supports template variable substitution, dry-run mode, and configurable error handling. A connection document for an identity provider, an SMS or email sender, or an AuthZEN PDP has to carry ouId or ouHandle, because every connection belongs to one organization unit. An item without either fails, a dry run included.
Scopes: system
Request body (required): application/json
Schema: ImportRequest
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
content | string | YAML content to import. May contain multiple YAML documents separated by | |
variables | object | Key-value pairs for template variable substitution. Variables referenced in the YAML content via | |
dryRun | boolean | When true, validates the import content and returns expected outcomes without persisting any changes to the system. Default: | |
deletions | array of ResourceDeletion | Resources to remove. The declarative payload in Removals run after the upserts, so a resource this same request moved or replaced is in place before its predecessor is pruned, and they are ordered as the reverse of the import dependency order so a dependent goes before what it depends on. Deleting something already absent is reported as success, which is what makes re-applying the same configuration a no-op. A request may carry deletions and no | |
options | ImportOptions | Configuration options that control import behavior. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Import completed | ImportResponse |
400 | Invalid import request or processing error | Error |
401 | Unauthorized - missing or invalid authentication token | Error |
500 | Internal server error | Error |
Delete imported declarative resource file
POST /import/delete
Deletes a file-backed declarative resource by resource type and key. This removes the declarative resource file from the file storage.
Scopes: system
Request body (required): application/json
Schema: DeleteResourceRequest
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
resourceType | string | Yes | Type of the resource to delete (e.g., Application, Connection, Flow, etc.). |
resourceKey | string | Yes | Unique identifier or key of the resource within its type. Typically the resource name or handle. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Resource file deleted successfully | DeleteResourceResponse |
400 | Invalid delete request or deletion error | Error |
401 | Unauthorized - missing or invalid authentication token | Error |
500 | Internal server error | Error |
Schemas
ImportRequest
Type: any of: object, object
Request payload for importing declarative resources. The content should contain one or more YAML documents separated by ---.
A request has to carry work to do: either content to upsert, or deletions to remove, or both. A request carrying neither is rejected.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
content | string | YAML content to import. May contain multiple YAML documents separated by | |
variables | object | Key-value pairs for template variable substitution. Variables referenced in the YAML content via | |
dryRun | boolean | When true, validates the import content and returns expected outcomes without persisting any changes to the system. Default: | |
deletions | array of ResourceDeletion | Resources to remove. The declarative payload in Removals run after the upserts, so a resource this same request moved or replaced is in place before its predecessor is pruned, and they are ordered as the reverse of the import dependency order so a dependent goes before what it depends on. Deleting something already absent is reported as success, which is what makes re-applying the same configuration a no-op. A request may carry deletions and no | |
options | ImportOptions | Configuration options that control import behavior. |
ResourceDeletion
Type: object
Identifies a runtime resource to remove during an import.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
resourceType | string | Yes | Type of the resource to remove. A type with no runtime delete operation, such as |
id | string | Yes | Identifier of the resource to remove. |
ImportOptions
Type: object
Configuration options that control import behavior.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
upsert | boolean | When true, attempts to update existing resources and creates them if they don't exist. When false, only creates new resources and fails if resource already exists. Default: | |
continueOnError | boolean | When true, continues processing remaining documents even if one document fails. When false, stops processing and returns error on first failure. Default: | |
target | string | Target storage for imported resources. - Allowed values: |
ImportResponse
Type: object
Response containing import operation results.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
summary | ImportSummary | Yes | Aggregated metrics for the import operation. |
results | array of ImportItemOutcome | Yes | Detailed outcome for each imported resource document. |
ImportSummary
Type: object
Aggregated metrics for the import operation.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalDocuments | integer | Yes | Total number of YAML documents processed. |
deleted | integer | Number of deletions this request completed. A dry run completes none, and a resource a service reports as not found is not counted, though both are still reported as a success in | |
imported | integer | Yes | Number of documents successfully imported or validated. |
failed | integer | Yes | Number of documents that failed during import. |
importedAt | string (date-time) | Yes | ISO 8601 timestamp of when the import was performed. |
ImportItemOutcome
Type: object
Result of importing a single resource document.
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
resourceType | string | Yes | Type of the resource being imported. |
resourceId | string (uuid) | UUID identifier of the imported resource. Only present when import succeeded. | |
resourceName | string | Name or display identifier of the imported resource. Only present when import succeeded. | |
operation | string | Type of operation performed on the resource. Only present when import succeeded. Allowed values: | |
status | string | Yes | Status of the import operation for this resource. Allowed values: |
code | string | Error code when status is | |
message | string | Human-readable message describing the result. Contains error details when status is |
DeleteResourceRequest
Type: object
Request to delete a file-backed declarative resource.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
resourceType | string | Yes | Type of the resource to delete (e.g., Application, Connection, Flow, etc.). |
resourceKey | string | Yes | Unique identifier or key of the resource within its type. Typically the resource name or handle. |
DeleteResourceResponse
Type: object
Response confirming deletion of a declarative resource file.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
resourceType | string | Yes | Type of the deleted resource. |
resourceKey | string | Yes | Unique identifier of the deleted resource. |
deletedFile | string | Yes | File path of the deleted declarative resource file, relative to the repository root. |
Error
Type: object
Standard error response.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Error code. Codes follow the IMP-XXXX convention. |
message | I18nMessage | Yes | Internationalized message with translation key and default value. |
description | I18nMessage | Internationalized message with translation key and default value. |
I18nMessage
Type: object
Internationalized message with translation key and default value.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Translation key for fetching localized message. |
defaultValue | string | Yes | Default message in English (fallback). |
Was this page helpful?