• Aql
    • Icon
    • Import
    • Importsource
    • Iql
    • Object
    • Objectconnectedtickets
    • Objectschema
    • Objecttype
    • Objecttypeattribute
    • Operations
    • Progress
    • Config
    • Global
    Cloud
    Assets / Guides / REST API

    Importsource

    Postman Collection
    OpenAPI
    PUT

    Put importsource {uuid} mapping

    Provide object schema and mapping configuration for the external import

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    uuid

    string

    Required

    Request bodyapplication/json

    any

    Responses

    This status code has no content.

    PUT/importsource/{uuid}/mapping
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 curl --request PUT \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{uuid}/mapping' \ --header 'Authorization: Bearer <access_token>' \ --header 'Content-Type: application/json' \ --data '{ "schema": { "objectSchema": { "name": "Disk Analysis Tool", "description": "Data imported from The Disk Analysis Tool", "objectTypes": [ { "externalId": "object-type/hard-drive", "name": "Hard Drive", "description": "A hard drive found during scanning", "attributes": [ { "externalId": "object-type-attribute/duid", "name": "DUID", "description": "Device Unique Identifier", "type": "text", "label": true, "minimumCardinality": 1, "maximumCardinality": 1, "unique": false }, { "externalId": "object-type-attribute/disk-label", "name": "Disk Label", "description": "Hard drive label", "type": "text", "minimumCardinality": 1, "maximumCardinality": 1, "unique": false }, { "externalId": "object-type-attribute/status", "name": "HardDriveStatus", "description": "The hard drive status", "type": "status", "typeValues": [ "Schema Scope Status", "Global Scope Status", "New Status" ] } ], "children": [ { "externalId": "object-type/file", "name": "File", "description": "A file present in a hard drive", "attributes": [ { "externalId": "object-type-attribute/path", "name": "Path", "description": "Path of the file", "type": "text", "label": true, "minimumCardinality": 1, "maximumCardinality": 1, "unique": false }, { "externalId": "object-type-attribute/size", "name": "Size", "description": "Size of the file", "type": "integer", "minimumCardinality": 1, "maximumCardinality": 1, "unique": false } ] } ] } ] }, "statusSchema": { "statuses": [ { "name": "New Status", "description": "", "category": "active" } ] } }, "mapping": { "objectTypeMappings": [ { "objectTypeExternalId": "object-type/hard-drive", "objectTypeName": "Hard Drive", "selector": "hardDrives", "description": "Mapping for Hard Drives", "attributesMapping": [ { "attributeExternalId": "object-type-attribute/duid", "attributeName": "DUID", "attributeLocators": [ "id" ], "externalIdPart": true }, { "attributeExternalId": "object-type-attribute/disk-label", "attributeName": "Disk Label", "attributeLocators": [ "label" ] }, { "attributeExternalId": "object-type-attribute/status", "attributeName": "HardDriveStatus", "attributeLocators": [ "status" ] } ] }, { "objectTypeExternalId": "object-type/file", "objectTypeName": "File", "selector": "hardDrives.files", "description": "Maps files found in hard drives", "attributesMapping": [ { "attributeExternalId": "object-type-attribute/path", "attributeName": "Path", "attributeLocators": [ "path" ], "externalIdPart": true }, { "attributeExternalId": "object-type-attribute/size", "attributeName": "Size", "attributeLocators": [ "size" ] } ] } ] } }'
    PATCH

    Patch importsource {uuid} mapping

    Update object schema and mapping configuration for the external import

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    uuid

    string

    Required

    Request bodyapplication/json

    any

    Responses

    This status code has no content.

    PATCH/importsource/{uuid}/mapping
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 curl --request PATCH \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{uuid}/mapping' \ --header 'Authorization: Bearer <access_token>' \ --header 'Content-Type: application/json' \ --data '{ "$schema": "https://api.stg.atlassian.com/jsm/assets/imports/external/schema/versions/2021_09_15", "schema": { "objectSchema": { "name": "Disk Analysis Tool", "description": "Data imported from The Disk Analysis Tool", "objectTypes": [ { "externalId": "object-type/hard-drive", "name": "Hard Drive", "description": "A hard drive found during scanning", "attributes": [ { "externalId": "object-type-attribute/manufacturer", "name": "Manufacturer", "description": "Manufacturer name", "type": "text" } ], "children": [ { "externalId": "object-type/folder", "name": "Folder", "description": "A folder present in a hard drive", "attributes": [ { "externalId": "object-type-attribute/folder-name", "name": "Name", "description": "Folder name", "type": "text", "label": true } ] }, { "externalId": "object-type/file", "name": "File", "description": "A file present in a hard drive", "attributes": [ { "externalId": "object-type-attribute/path", "name": "Path", "description": "Updated description for the path attribute", "type": "text", "label": true } ] } ] } ] } }, "mapping": { "objectTypeMappings": [ { "objectTypeExternalId": "object-type/hard-drive", "objectTypeName": "Hard Drive", "selector": "hardDrives", "description": "Mapping for Hard Drives", "attributesMapping": [ { "attributeExternalId": "object-type-attribute/duid", "attributeName": "DUID", "attributeLocators": [ "id" ], "externalIdPart": true }, { "attributeExternalId": "object-type-attribute/disk-label", "attributeName": "Disk Label", "attributeLocators": [ "label" ] }, { "attributeExternalId": "object-type-attribute/manufacturer", "attributeName": "Manufacturer", "attributeLocators": [ "manufacturer" ] } ] }, { "objectTypeExternalId": "object-type/folder", "objectTypeName": "Folder", "selector": "hardDrives.folders", "description": "Mapping for Folder", "attributesMapping": [ { "attributeExternalId": "object-type-attribute/folder-name", "attributeName": "Name", "attributeLocators": [ "name" ], "externalIdPart": true } ] } ] } }'
    GET

    Get importsource {importSourceId} configstatus

    Get the current status of the import configuration

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importSourceId

    string

    Required

    Responses

    Returns the status of the import configuration, can be one of: IDLE, DISABLED, MISSING_MAPPING, RUNNING

    application/json

    any

    GET/importsource/{importSourceId}/configstatus
    1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceId}/configstatus' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
    200Response
    1 2 3 { "status": "IDLE" }
    GET

    Get importsource {importSourceId} schema-and-mapping

    Get the current schema and mapping of the import configuration

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importSourceId

    string

    Required

    Responses

    application/json

    any

    GET/importsource/{importSourceId}/schema-and-mapping
    1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceId}/schema-and-mapping' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
    200Response
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 { "schema": { "objectSchema": { "name": "docs", "description": "", "objectTypes": [ { "externalId": "object-type/hard-drive", "name": "Hard Drive", "description": "A hard drive found during scanning", "attributes": [ { "name": "Key", "description": "", "type": "text", "label": false, "minimumCardinality": 1, "maximumCardinality": 1, "unique": false }, { "externalId": "object-type-attribute/duid", "name": "DUID", "description": "Device Unique Identifier", "type": "text", "label": true, "minimumCardinality": 1, "maximumCardinality": 1, "unique": false }, { "externalId": "object-type-attribute/disk-label", "name": "Disk Label", "description": "Hard drive label", "type": "text", "label": false, "minimumCardinality": 0, "maximumCardinality": 1, "unique": false } ], "children": [ { "externalId": "object-type/file", "name": "File", "description": "A file present in a hard drive", "attributes": [ { "name": "Key", "description": "", "type": "text", "label": false, "minimumCardinality": 1, "maximumCardinality": 1, "unique": false }, { "externalId": "object-type-attribute/size", "name": "Size", "description": "Size of the file", "type": "integer", "label": false, "minimumCardinality": 0, "maximumCardinality": 1, "unique": false }, { "externalId": "object-type-attribute/path", "name": "Path", "description": "Path of the file", "type": "text", "label": true, "minimumCardinality": 1, "maximumCardinality": 1, "unique": false } ] } ] } ] } }, "mapping": { "objectTypeMappings": [ { "objectTypeExternalId": "object-type/hard-drive", "objectTypeName": "Hard Drive", "selector": "hardDrives", "description": "Mapping for Hard Drives", "attributesMapping": [ { "attributeExternalId": "object-type-attribute/duid", "attributeName": "DUID", "attributeLocators": [ "id" ], "externalIdPart": true }, { "attributeExternalId": "object-type-attribute/disk-label", "attributeName": "Disk Label", "attributeLocators": [ "label" ], "externalIdPart": false } ] }, { "objectTypeExternalId": "object-type/file", "objectTypeName": "File", "selector": "hardDrives.files", "description": "Maps files found in hard drives", "attributesMapping": [ { "attributeExternalId": "object-type-attribute/path", "attributeName": "Path", "attributeLocators": [ "path" ], "externalIdPart": true }, { "attributeExternalId": "object-type-attribute/size", "attributeName": "Size", "attributeLocators": [ "size" ], "externalIdPart": false } ] } ] } }
    POST

    Post importsource {importSourceUuid} executions

    Move to the data ingestion steps of external imports

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importSourceUuid

    string

    Required

    Responses

    application/json

    any

    POST/importsource/{importSourceUuid}/executions
    1 2 3 4 curl --request POST \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceUuid}/executions' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
    200Response
    1 2 3 4 5 6 7 8 9 { "links": { "submitProgress": "https://api.atlassian.com/jsm/insight/workspace/fd8d86e0-3401-40bd-adb4-bb50b8e39288/v1/importsource/4d4095c3-cb7c-4d59-9b75-a381ea4b1975/executions/07a58b26-e93a-49c6-9381-1fe235943018/progress", "submitResults": "https://api.atlassian.com/jsm/insight/workspace/fd8d86e0-3401-40bd-adb4-bb50b8e39288/v1/importsource/4d4095c3-cb7c-4d59-9b75-a381ea4b1975/executions/07a58b26-e93a-49c6-9381-1fe235943018/data", "getExecutionStatus": "https://api.atlassian.com/jsm/insight/workspace/fd8d86e0-3401-40bd-adb4-bb50b8e39288/v1/importsource/4d4095c3-cb7c-4d59-9b75-a381ea4b1975/executions/07a58b26-e93a-49c6-9381-1fe235943018/status", "cancel": "https://api.atlassian.com/jsm/insight/workspace/fd8d86e0-3401-40bd-adb4-bb50b8e39288/v1/importsource/4d4095c3-cb7c-4d59-9b75-a381ea4b1975/executions/07a58b26-e93a-49c6-9381-1fe235943018" }, "result": "success" }
    DEL

    Delete importsource {importSourceUuid} executions {importExecutionUuid}

    Cancel current on-going import

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importExecutionUuid

    string

    Required
    importSourceUuid

    string

    Required

    Responses

    This status code has no content.

    DEL/importsource/{importSourceUuid}/executions/{importExecutionUuid}
    1 2 3 curl --request DELETE \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceUuid}/executions/{importExecutionUuid}' \ --header 'Authorization: Bearer <access_token>'
    PUT

    Put importsource {importSourceUuid} executions {importExecutionUuid} progress

    Submit progress of ingesting data

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importExecutionUuid

    string

    Required
    importSourceUuid

    string

    Required

    Request bodyapplication/json

    any

    Responses

    This status code has no content.

    PUT/importsource/{importSourceUuid}/executions/{importExecutionUuid}/progress
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 curl --request PUT \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceUuid}/executions/{importExecutionUuid}/progress' \ --header 'Authorization: Bearer <access_token>' \ --header 'Content-Type: application/json' \ --data '{ "steps": { "total": 3, "current": 2, "description": "Gathering data" }, "objects": { "total": 500, "processed": 125 } }'
    POST

    Post importsource {importSourceUuid} executions {importExecutionUuid} data

    Providing data to be ingested

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importExecutionUuid

    string

    Required
    importSourceUuid

    string

    Required

    Request bodyapplication/json

    any

    Responses

    This status code has no content.

    POST/importsource/{importSourceUuid}/executions/{importExecutionUuid}/data
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 curl --request POST \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceUuid}/executions/{importExecutionUuid}/data' \ --header 'Authorization: Bearer <access_token>' \ --header 'Content-Type: application/json' \ --data '{ "data": { "hardDrives": [ { "id": "Hard drive ID", "label": "Hard drive label", "files": [ { "path": "/file/path", "size": 123456 } ] } ] }, "clientGeneratedId": "a-unique-id", "completed": true }'
    GET

    Get importsource {importSourceUuid} executions {importExecutionUuid} status

    Get the status of the import

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importExecutionUuid

    string

    Required
    importSourceUuid

    string

    Required

    Responses

    application/json

    any

    GET/importsource/{importSourceUuid}/executions/{importExecutionUuid}/status
    1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceUuid}/executions/{importExecutionUuid}/status' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
    200Response
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 { "status": "DONE", "progressResult": { "type": "IMPORT", "id": 438, "started": "2023-06-15T12:13:03.952+00:00", "ended": "2023-06-15T12:13:05.124+00:00", "objectSchemaId": 266, "result": "OK", "status": "FINISHED", "infoMessage": "No data to import", "jobId": "241d9437-eb25-4008-a346-8daafbb91026", "importSourceId": "3e9f17a6-61db-4bdd-a313-6dd38c81bfca", "populatedObjectTypes": [ "Operating System", "Hard Drive" ], "onlyExecutedForObjectTypes": [], "objectTypeResultMap": { "2547": { "id": null, "objectTypeName": "Hard Drive", "objectTypeId": 2547, "objectsUpdated": 0, "objectsCreated": 1, "objectsIdentical": 0, "objectsMissingUpdated": 0, "objectsMissingDeleted": 0, "entriesInSource": 1, "duplicateEnries": 0, "emptyLabelEntries": 0, "emptyExternalIdEntries": 0, "objectsFilteredWithQlQuery": 0, "errorMessages": null, "readExternalDataTimeInMs": 221, "mapExternalDataTimeInMs": 0, "qlQueryFilteringTimeInMs": 0, "decidingActionsTimeInMs": 0, "writeInsightDataTimeInMs": 154, "postFunctionTimeInMs": 0, "executionTimeInMs": 375, "objectsWithUpdatedReferences": 1 }, "2548": { "id": null, "objectTypeName": "Operating System", "objectTypeId": 2548, "objectsUpdated": 0, "objectsCreated": 2, "objectsIdentical": 0, "objectsMissingUpdated": 0, "objectsMissingDeleted": 0, "entriesInSource": 2, "duplicateEnries": 0, "emptyLabelEntries": 0, "emptyExternalIdEntries": 0, "objectsFilteredWithQlQuery": 0, "errorMessages": null, "readExternalDataTimeInMs": 220, "mapExternalDataTimeInMs": 0, "qlQueryFilteringTimeInMs": 0, "decidingActionsTimeInMs": 0, "writeInsightDataTimeInMs": 266, "postFunctionTimeInMs": 0, "executionTimeInMs": 486, "objectsWithUpdatedReferences": 0 } }, "errorMessages": null, "totalNumberEntriesInImport": 3 } }
    GET

    Get importsource {importSourceUuid} executions status

    Get the status of the most recently created import execution

    Scopes
    import:import-configuration:cmdb

    Request

    Path parameters

    importSourceUuid

    string

    Required

    Responses

    application/json

    any

    GET/importsource/{importSourceUuid}/executions/status
    1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceUuid}/executions/status' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
    200Response
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 { "status": "DONE", "progressResult": { "type": "IMPORT", "id": 438, "started": "2023-06-15T12:13:03.952+00:00", "ended": "2023-06-15T12:13:05.124+00:00", "objectSchemaId": 266, "result": "OK", "status": "FINISHED", "infoMessage": "No data to import", "jobId": "241d9437-eb25-4008-a346-8daafbb91026", "importSourceId": "3e9f17a6-61db-4bdd-a313-6dd38c81bfca", "populatedObjectTypes": [ "Operating System", "Hard Drive" ], "onlyExecutedForObjectTypes": [], "objectTypeResultMap": { "2547": { "id": null, "objectTypeName": "Hard Drive", "objectTypeId": 2547, "objectsUpdated": 0, "objectsCreated": 1, "objectsIdentical": 0, "objectsMissingUpdated": 0, "objectsMissingDeleted": 0, "entriesInSource": 1, "duplicateEnries": 0, "emptyLabelEntries": 0, "emptyExternalIdEntries": 0, "objectsFilteredWithQlQuery": 0, "errorMessages": null, "readExternalDataTimeInMs": 221, "mapExternalDataTimeInMs": 0, "qlQueryFilteringTimeInMs": 0, "decidingActionsTimeInMs": 0, "writeInsightDataTimeInMs": 154, "postFunctionTimeInMs": 0, "executionTimeInMs": 375, "objectsWithUpdatedReferences": 1 }, "2548": { "id": null, "objectTypeName": "Operating System", "objectTypeId": 2548, "objectsUpdated": 0, "objectsCreated": 2, "objectsIdentical": 0, "objectsMissingUpdated": 0, "objectsMissingDeleted": 0, "entriesInSource": 2, "duplicateEnries": 0, "emptyLabelEntries": 0, "emptyExternalIdEntries": 0, "objectsFilteredWithQlQuery": 0, "errorMessages": null, "readExternalDataTimeInMs": 220, "mapExternalDataTimeInMs": 0, "qlQueryFilteringTimeInMs": 0, "decidingActionsTimeInMs": 0, "writeInsightDataTimeInMs": 266, "postFunctionTimeInMs": 0, "executionTimeInMs": 486, "objectsWithUpdatedReferences": 0 } }, "errorMessages": null, "totalNumberEntriesInImport": 3 } }
    POST

    Post importsource {importSourceId} token

    Generate a Bearer token which can be used to authenticate against Assets /importsource/ APIs, to take actions against the specified import source.

    Scopes
    import:import-configuration:cmdb

    Request

    This request has no parameters.

    Responses

    Returns a Bearer token which can be used to authenticate against Assets /importsource/ APIs, to take actions against the specified import source.

    application/json

    any

    POST/importsource/{importSourceId}/token
    1 2 3 4 curl --request POST \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/importsource/{importSourceId}/token' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
    200Response
    1 2 3 { "token": "ATCTT3xFfGN...XYZ" }

    Rate this page: