Skip to main content
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

Import API

Download OpenAPI (YAML)Version 1.0

Base URL: https://localhost:8090

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
ScopeDescription
systemFull 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
NameTypeRequiredDescription
contentstring

YAML content to import. May contain multiple YAML documents separated by ---. Supports template variables in the format {{.VARIABLE_NAME}}.

variablesobject

Key-value pairs for template variable substitution. Variables referenced in the YAML content via {{.VARIABLE_NAME}} syntax are replaced with their corresponding values.

dryRunboolean

When true, validates the import content and returns expected outcomes without persisting any changes to the system.

Default: false

deletionsarray of ResourceDeletion

Resources to remove. The declarative payload in content can create and update but never remove, so a resource dropped from a configuration would otherwise linger on every deployment that configuration was applied to.

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 content.

optionsImportOptions

Configuration options that control import behavior.

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
resourceTypestringYes

Type of the resource to delete (e.g., Application, Connection, Flow, etc.).

resourceKeystringYes

Unique identifier or key of the resource within its type. Typically the resource name or handle.

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
contentstring

YAML content to import. May contain multiple YAML documents separated by ---. Supports template variables in the format {{.VARIABLE_NAME}}.

variablesobject

Key-value pairs for template variable substitution. Variables referenced in the YAML content via {{.VARIABLE_NAME}} syntax are replaced with their corresponding values.

dryRunboolean

When true, validates the import content and returns expected outcomes without persisting any changes to the system.

Default: false

deletionsarray of ResourceDeletion

Resources to remove. The declarative payload in content can create and update but never remove, so a resource dropped from a configuration would otherwise linger on every deployment that configuration was applied to.

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 content.

optionsImportOptions

Configuration options that control import behavior.

ResourceDeletion​

Type: object

Identifies a runtime resource to remove during an import.

2 properties
NameTypeRequiredDescription
resourceTypestringYes

Type of the resource to remove. A type with no runtime delete operation, such as translation or server_config, is reported as an unsupported outcome rather than silently skipped.

idstringYes

Identifier of the resource to remove.

ImportOptions​

Type: object

Configuration options that control import behavior.

3 properties
NameTypeRequiredDescription
upsertboolean

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: true

continueOnErrorboolean

When true, continues processing remaining documents even if one document fails. When false, stops processing and returns error on first failure.

Default: true

targetstring

Target storage for imported resources. - runtime: Imports into runtime stores (database/in-memory) Currently only runtime is supported.

Allowed values: runtime. Default: runtime

ImportResponse​

Type: object

Response containing import operation results.

2 properties
NameTypeRequiredDescription
summaryImportSummaryYes

Aggregated metrics for the import operation.

resultsarray of ImportItemOutcomeYes

Detailed outcome for each imported resource document.

ImportSummary​

Type: object

Aggregated metrics for the import operation.

5 properties
NameTypeRequiredDescription
totalDocumentsintegerYes

Total number of YAML documents processed.

deletedinteger

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 results. Not every service distinguishes an absent id from a removed one, so this is the count of deletions that completed rather than a guarantee that each one had something to remove.

importedintegerYes

Number of documents successfully imported or validated.

failedintegerYes

Number of documents that failed during import.

importedAtstring (date-time)Yes

ISO 8601 timestamp of when the import was performed.

ImportItemOutcome​

Type: object

Result of importing a single resource document.

7 properties
NameTypeRequiredDescription
resourceTypestringYes

Type of the resource being imported.

resourceIdstring (uuid)

UUID identifier of the imported resource. Only present when import succeeded.

resourceNamestring

Name or display identifier of the imported resource. Only present when import succeeded.

operationstring

Type of operation performed on the resource. Only present when import succeeded.

Allowed values: create, update

statusstringYes

Status of the import operation for this resource.

Allowed values: success, failed

codestring

Error code when status is failed. Omitted when status is success.

messagestring

Human-readable message describing the result. Contains error details when status is failed. Successful user, agent and application imports include a warning here when a non-empty top-level state was ignored.

DeleteResourceRequest​

Type: object

Request to delete a file-backed declarative resource.

2 properties
NameTypeRequiredDescription
resourceTypestringYes

Type of the resource to delete (e.g., Application, Connection, Flow, etc.).

resourceKeystringYes

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
NameTypeRequiredDescription
resourceTypestringYes

Type of the deleted resource.

resourceKeystringYes

Unique identifier of the deleted resource.

deletedFilestringYes

File path of the deleted declarative resource file, relative to the repository root.

Error​

Type: object

Standard error response.

3 properties
NameTypeRequiredDescription
codestringYes

Error code. Codes follow the IMP-XXXX convention.

messageI18nMessageYes

Internationalized message with translation key and default value.

descriptionI18nMessage

Internationalized message with translation key and default value.

I18nMessage​

Type: object

Internationalized message with translation key and default value.

2 properties
NameTypeRequiredDescription
keystringYes

Translation key for fetching localized message.

defaultValuestringYes

Default message in English (fallback).

Was this page helpful?