Skip to main content

Initiates configuration objects import job

POST 

/sp-config/import

This post will import objects from a JSON configuration file into a tenant. By default, every import will first export all existing objects supported by sp-config as a backup before the import is attempted. The backup is provided so that the state of the configuration prior to the import is available for inspection or restore if needed. The backup can be skipped by setting "excludeBackup" to true in the import options. If a backup is performed, the id of the backup will be provided in the ImportResult as the "exportJobId". This can be downloaded using the /sp-config/export/{exportJobId}/download endpoint. You cannot currently import from the Non-Employee Lifecycle Management (NELM) source. You cannot use this endpoint to back up or store NELM data. For more information about the object types that currently support import functionality, refer to SaaS Configuration. The request will need the following security scope:

  • sp:config:manage

Request

Query Parameters

    preview boolean

    This option is intended to give the user information about how an import operation would proceed, without having any effect on the target tenant. If this parameter is "true", no objects will be imported. Instead, the import process will pre-process the import file and attempt to resolve references within imported objects. The import result file will contain messages pertaining to how specific references were resolved, any errors associated with the preprocessing, and messages indicating which objects would be imported.

    Example: true

Body

required

The form-data "name" attribute for the file content must be "data".

Example

data: "config_export_0340b957-5caa-44f6-ada2-d3c4c5bd0b19.json",
options: {
"excludeTypes": [],
"includeTypes": ["TRIGGER_SUBSCRIPTION"],
"objectOptions": {
"TRIGGER_SUBSCRIPTION": {
"includedIds": [ "193446a1-c431-4326-8ba7-d6eebf922948"],
"includedNames":[]
}
},
"defaultReferences": [
{
"type": "TRIGGER_SUBSCRIPTION",
"id": "be9e116d-08e1-49fc-ab7f-fa585e96c9e4",
"name": "Test Trigger"
}
],
"excludeBackup": false
}

Sample Import File

{
"version": 1,
"timestamp": "2021-05-10T15:19:23.425041-05:00",
"tenant": "sampleTenant",
"options": {
"excludeTypes": [],
"includeTypes": ["TRIGGER_SUBSCRIPTION"],
"objectOptions": null
},
"objects": [{
"version": 1,
"self": {
"type": "TRIGGER_SUBSCRIPTION",
"name": "test trigger",
"id": "193446a1-c431-4326-8ba7-d6eebf922948"
},
"object": {
"type": "HTTP",
"enabled": true,
"httpConfig": {
"url": "https://localhost",
"httpAuthenticationType": "NO_AUTH",
"basicAuthConfig": null,
"bearerTokenAuthConfig": null,
"httpDispatchMode": "SYNC"
},
"triggerName": "Access Request Submitted",
"responseDeadline": "PT1H",
"name": "test trigger",
"triggerId": "idn:access-request-pre-approval"
}
}
]
}
    data binaryrequired

    JSON file containing the objects to be imported.

    options object
    excludeTypes string[]

    Possible values: [IDENTITY_OBJECT_CONFIG, IDENTITY_PROFILE, RULE, SOURCE, TRANSFORM, TRIGGER_SUBSCRIPTION]

    Object type names to be excluded from an sp-config export command.

    includeTypes string[]

    Possible values: [IDENTITY_OBJECT_CONFIG, IDENTITY_PROFILE, RULE, SOURCE, TRANSFORM, TRIGGER_SUBSCRIPTION]

    Object type names to be included in an sp-config export command. IncludeTypes takes precedence over excludeTypes.

    objectOptions object

    Additional options targeting specific objects related to each item in the includeTypes field

    property name* ObjectExportImportOptions
    includedIds string[]

    Object ids to be included in an import or export.

    includedNames string[]

    Object names to be included in an import or export.

    defaultReferences string[]

    Possible values: [IDENTITY_OBJECT_CONFIG, IDENTITY_PROFILE, RULE, SOURCE, TRANSFORM, TRIGGER_SUBSCRIPTION]

    List of object types that can be used to resolve references on import.

    excludeBackup boolean

    Default value: false

    By default, every import will first export all existing objects supported by sp-config as a backup before the import is attempted. If excludeBackup is true, the backup will not be performed.

Responses

Import job accepted and queued for processing.

Schema
    jobId stringrequired

    Unique id assigned to this job.

    status stringrequired

    Possible values: [NOT_STARTED, IN_PROGRESS, COMPLETE, CANCELLED, FAILED]

    Status of the job.

    type stringrequired

    Possible values: [EXPORT, IMPORT]

    Type of the job, either export or import.

    expiration date-timerequired

    The time until which the artifacts will be available for download.

    created date-timerequired

    The time the job was started.

    modified date-timerequired

    The time of the last update to the job.

Loading...