The System API handles the import/export functionality of configuration items in Aspire. This API enables users to save their configuration settings to a file or external storage and later restore those settings or apply them to other instances of Aspire.

Export

Export all the configuration items of the Aspire, this includes all the: connectors, credentials, connections, workflows, policies, schedules and seeds. This endpoint needs the at least the OPERATOR role to be executed.

GET /aspire/_api/system/export

The export endpoint will generate a file with a content similar to this response.

Take into consideration that components with resources loaded into elastic, will be exported, but the resource itself will not, so you will need to reupload the resource and go and select your resource in the component again.


Response

{
  "export": {
    "seeds": {
      "seed": [
        {
          "id": "<seed_id>",
          "type": "ldap-identity",
          "description": "LDAP",
          "connector": "<connector_id>",
          "seed": "dummy",
          "priority": "medium",
          "checksum": "36da0d996e4d156d33s2d54sad468ef5bbc85e09da8c",
          "connection": "<connection_id>",
          "properties": {
            "seed": "dummy",
            "userKeyAttribute": "dn",
            ...
          }
        },
        {
          "id": "<seed_id>",
          "type": "rest-api",
          "description": "REST",
          "connector": "<connector_id>",
          "seed": "N\/A",
          "priority": "medium",
          "checksum": "eb4b51659226093casdf3854sdf8f67e4f0de8217c0fd86ea565ce0",
          "connection": "<connection_id>",
          "properties": {
            "seed": "N\/A",
            "crawlRules": [
              {
                "conditionalScript": false,
                "entityType": "root",
                "shouldStop": false,
                ...
              }
            ],
            "stopOnScannerError": true
          }
        },
        ...
      ]
    },
    "connectors": {
      "connector": [
        {
          "id": "<connector_id>",
          "artifact": "com.accenture.aspire:aspire-rest-source",
          "type": "rest-api",
          "description": "RestConnector",
          "properties": {
            "debug": false,
            "wDebug": false,
            ...
          },
          "checksum": "82a70c88cbfa46dfd79d6430bfesdf5646c13089604fb609831f16f"
        },
        {
          "id": "<connector_id>",
          "artifact": "com.accenture.aspire:aspire-ldap-identity-source",
          "type": "ldap-identity",
          "description": "LDAP",
          "properties": {
            "debug": false,
            "wDebug": false,
            ...    
          },
          "checksum": "c03b3a168e0b4a5456d3df5g4caa480fb047f6459f9acac2ee65a2"
        },
        ...
      ]
    },
    "credentials": {
      "credential": [
        {
          "id": "<credential_id>",
          "type": "rest-api",
          "description": "RestCredentials",
          "properties": {
            "type": "bearer",
            "query": {
              ...
            }
          }
        },
        {
          "id": "<credential_id>",
          "type": "ldap-identity",
          "description": "LDAPCred",
          "properties": {
            "authenticationType": "SIMPLE",
            ...
          }
        },
        ...
      ]
    },
    "connections": {
      "connection": [
        {
          "id": "<connection_id>",
          "type": "rest-api",
          "description": "AlationConnection",
          "credential": "<credential_id>",
          "properties": {
            "maxRetries": 3,
            "useThrottling": false,
            "throttling": "throttling_false",
            "useProxy": false,
            "proxy": "proxy_false",
            "trustAllCertificates": false,
            ...
          }
        },
        {
          "id": "<connection_id>",
          "type": "ldap-identity",
          "description": "LDAPConn",
          "credential": "<credential_id>",
          "properties": {            
            "connectTimeout": "15s",
            "readTimeout": "15s",
            "useTLS": false,
            ...
          }
        },
        ...
      ]
    },
    "policies": {
      "policy": [
        {
          "id": "<policy_id>",
          "type": "throttle",
          "description": "pT",
          "period": "day",
          "value": 1
        },
        {
          "id": "<policy_id>",
          "type": "route",
          "description": "pR",
          "routeTo": "ss"
        },
        {
          "id": "<policy_id>",
          "type": "deleteIncremental",
          "description": "pD",
          "deletesPolicy": "IMMEDIATE",
          "deleteCheckAfterErrors": "ALWAYS"
        }
      ]
    },
    "schedules": {
      "schedule": {
        "id": "<schedule_id>",
        "type": "time",
        "description": "test",
        "enabled": "false",
        "scheduleTimeType": "daily",
        "stopOnFail": false,
        "schedule": "0 0 0 1\/1 * ?",
        "after": null,
        "seeds": "<seed_id>",
        "crawlMode": "full",
        "completeThreshold": 1.0,
        "action": "pause"
      }
    },
    "workflows": {
      "workflow": [
        {
          "id": "<workflow_id>",
          "type": "connector",
          "description": "myWorkflow",
          "checksum": "dc7d632e4fac3aed7404d2c260sd3f54eea266f9fd4af73b6251d6cb",
          "templates": {
            ...
          },
          "events": {
            "event": [
              ...
            ]
          },
          "rules": {
            "rule": [
              ...
            ]
          }
        },
        ...
      ]
    }
  }
}

Status: 200




Import

Import the configuration items of the Aspire export file, this can include: connectors, credentials, connections, workflows, policies, schedules and seeds. This endpoint needs the at least the OPERATOR role to be executed.

POST /aspire/_api/system/import

The import endpoint needs a file generated from the export.



Take into consideration that components with resources loaded into elastic, will be imported, but you will need to reupload the resource and go and select your resource in the component again.




Response

{
  "response": {
      "policies": [
          "pT",
          "pR",
          "pD"
      ],
      "connectors": [
          "RestConnector",
          "LDAP",
          "Azure",
          ...
      ],
      "credentials": [
          "RestCredentials",
          "LDAPCred",
          ...
      ],
      "connections": [
          "RESTConnection",
          "LDAPConn",
          ...
      ],
      "workflows": [
          "myWorkflow",
          ...
      ],
      "seeds": [
          "LDAP",
          "REST",
          ...
      ],
      "schedules": [
          "test"
      ]
  },
  "message": "File system_export.aspire imported successfully"
}

Status: 200, 404




Export / Import UI


You can also use the UI options to Export / Import in the Tools section:


                                                   


Also, every configuration item has the export option.



Note that the configuration items do not have the import option, this is because the import is a single endpoint for all and is handled from the import option in the tools section.

  • No labels