Skip to main content

Initiates Configuration Objects Import Job.

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. Request will need the following security scope:

  • sp:config:manage
Query Parameters
  • preview boolean

    This option is intended to give the user information about how an import operation would proceed, without having any affect on the target tenant. If 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
Request 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 string required

    Name of JSON file containing the objects to be imported.

  • options object
  • excludeTypes string[]

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

  • includeTypes string[]

    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* object
  • defaultReferences object[]

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

  • type string

    Possible values: [ACCOUNT_CORRELATION_CONFIG, ACCESS_PROFILE, ACCESS_REQUEST_APPROVAL, ACCOUNT, APPLICATION, CAMPAIGN, CAMPAIGN_FILTER, CERTIFICATION, CLUSTER, CONNECTOR_SCHEMA, ENTITLEMENT, GOVERNANCE_GROUP, IDENTITY, IDENTITY_PROFILE, IDENTITY_REQUEST, LIFECYCLE_STATE, PASSWORD_POLICY, ROLE, RULE, SOD_POLICY, SOURCE, TAG_CATEGORY, TASK_RESULT, REPORT_RESULT, SOD_VIOLATION, ACCOUNT_ACTIVITY]

    DTO type

  • id string

    ID of the object to which this reference applies

  • name string

    Human-readable display name of the object to which this reference applies

  • 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 string

    Unique id assigned to this job.

  • status string

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

    Status of the job.

  • type string

    Possible values: [EXPORT, IMPORT]

    Type of the job, either export or import.

  • message string

    This message contains additional information about the overall status of the job.

  • description string

    Optional user defined description/name for export job.

  • expiration date-time

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

  • created date-time

    The time the job was started.

  • modified date-time

    The time of the last update to the job.

  • completed date-time

    The time the job was completed.

Loading...