Packages endpoint
Sandbox tooling allows you to select different artifacts (also known as objects) and export them into a package. A package can consist of a single artifact or multiple artifacts (such as datasets or schemas). Any artifacts that are included in a package must be from the same sandbox.
The /packages
endpoint in the sandbox tooling API allows you to programmatically manage packages in your organization, including publishing a package and importing a package to a sandbox.
Create a package create
You can create a multi-artifact package, by making a POST request to the /packages
endpoint while providing values for your package’s name and package type.
API format
POST /packages/
Request
curl -X POST \
https://platform.adobe.io/data/foundation/exim/packages \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d'{
"name": "acme",
"description": "Acme Business Group",
"packageType": "PARTIAL",
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"expiry": "2023-05-20T20:05:10Z",
"artifacts": [
{
"id": "27115daa-c92b-4f17-a077-d65ffeb0c525",
"type": "PROFILE_SEGMENT",
"title": "Acme Profile Segment"
}
]
}'
name
description
packageType
sourceSandbox
expiry
artifacts
artifacts
value should be null or empty, when the packageType
is FULL
.Response
A successful response returns your newly created package. The response includes the corresponding package ID, as well as information on its status, expiry, and list of artifacts.
{
"id": "209f886b00444eac9bb5836fe32e7681",
"version": 0,
"createdDate": 1684475012105,
"modifiedDate": 1684475012105,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"tenantId": "c875b077162b40409c1327b16da99c1b",
"requestId": "devxa54a6b56d04f46119d9e3cc006fcc1cb",
"userId": "platform_exim",
"name": "acme",
"description": "Acme Business Group",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg",
"sourceSandbox": {
"name": "cjm-mr",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"packageType": "PARTIAL",
"expiry": 1684613110000,
"status": "DRAFT",
"artifactsList": [
{
"id": "d8d8ed6d-696a-40bd-b4fe-ca053ec94e29",
"type": "JOURNEY",
"found": false,
"count": 0
}
]
}
Update a package update
You can update a package, by making a PUT request to the /packages
endpoint.
Add artifacts to a package add-artifacts
To add artifacts to a package, you must provide an id
and include ADD for the action
.
API format
PUT /packages/
Request
curl -X PUT \
https://platform.adobe.io/data/foundation/exim/packages \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d'{
"id": "6fa50baedd344a278129a87e68cc9dc7",
"action": "ADD",
"expiry": "2023-05-20T20:05:10Z",
"artifacts": [
{
"id": "d8d8ed6d-696a-40bd-b4fe-ca053ec94e29@1647559351683",
"type": "JOURNEY"
}
]
}'
id
action
artifacts
expiry
The following artifact types are currently supported.
JOURNEY
ID_NAMESPACE
REGISTRY_DATATYPE
REGISTRY_CLASS
REGISTRY_MIXIN
REGISTRY_SCHEMA
CATALOG_DATASET
DULE_CONSENT_POLICY
PROFILE_SEGMENT
FLOW
Response
A successful response returns your updated package. The response includes the corresponding package ID, as well as information on its status, expiry, and list of artifacts.
{
"id": "6fa50baedd344a278129a87e68cc9dc7",
"version": 4,
"createdDate": 1684235842000,
"modifiedDate": 1684475861366,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"tenantId": "c875b077162b40409c1327b16da99c1b",
"name": "acme",
"description": "Acme Business Group",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg",
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"packageType": "PARTIAL",
"expiry": 1692251861352,
"status": "DRAFT",
"artifactsList": [
{
"id": "d8d8ed6d-696a-40bd-b4fe-ca053ec94e29@1647559351683",
"type": "JOURNEY",
"found": false,
"count": 0
},
{
"id": "d8d8ed6d-696a-40bd-b4fe-ca053ec94e29",
"type": "JOURNEY",
"found": false,
"count": 0
}
]
}
Delete artifacts from a package delete-artifacts
To delete artifacts from a package, you must provide an id
and include DELETE for the action
.
API format
PUT /packages/
Request
curl -X PUT \
https://platform.adobe.io/data/foundation/exim/packages \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d'{
"id": "6fa50baedd344a278129a87e68cc9dc7",
"action": "DELETE",
"artifacts": [
{
"id": "d8d8ed6d-696a-40bd-b4fe-ca053ec94e29@1647559351683",
"type": "JOURNEY"
}
]
}'
id
action
artifacts
Response
A successful response returns your updated package. The response includes the corresponding package ID, as well as information on its status, expiry, and list of artifacts.
{
"id": "6fa50baedd344a278129a87e68cc9dc7",
"version": 5,
"createdDate": 1684235842000,
"modifiedDate": 1684478830416,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"tenantId": "c875b077162b40409c1327b16da99c1b",
"name": "acme",
"description": "Acme Business Group",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg",
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"packageType": "PARTIAL",
"expiry": 1692254830403,
"status": "DRAFT",
"artifactsList": [
{
"id": "d8d8ed6d-696a-40bd-b4fe-ca053ec94e29",
"type": "JOURNEY",
"found": false,
"count": 0
}
]
}
Update metadata fields in a package update-metadata
To update the metadata fields in a package, you must provide an id
and include UPDATE for the action
.
API format
PUT /packages/
Request
curl -X PUT \
https://platform.adobe.io/data/foundation/exim/packages \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d'{
"id": "6fa50baedd344a278129a87e68cc9dc7",
"action": "UPDATE",
"name": "acme",
"description": "Acme Business Group",
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
}
}'
id
action
name
sourceSandbox
Response
A successful response returns your updated package. The response includes the corresponding package ID, as well as information on its description, status, expiry, and list of artifacts.
{
"id": "6fa50baedd344a278129a87e68cc9dc7",
"version": 6,
"createdDate": 1684235842000,
"modifiedDate": 1684479094129,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"tenantId": "c875b077162b40409c1327b16da99c1b",
"name": "acme",
"description": "Acme Business Group",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg",
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"packageType": "PARTIAL",
"expiry": 1692255094127,
"status": "DRAFT",
"artifactsList": [
{
"id": "d8d8ed6d-696a-40bd-b4fe-ca053ec94e29",
"type": "JOURNEY",
"found": false,
"count": 0
}
]
}
Delete a package delete
To delete a package, make a DELETE request to the /packages
endpoint and specify the ID of the package you want to delete.
API format
DELETE /packages/{PACKAGE_ID}
{PACKAGE_ID}
Request
The following request deletes the package with the ID of {PACKAGE_ID}.
curl -X DELETE \
https://platform.adobe.io/data/foundation/exim/packages/{PACKAGE_ID} \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
Response
A successful response returns a reason which shows the package ID deleted.
{
"reason": "Package d30e0424a37b46ada6a5cf37f47a86ff deleted"
}
Publish a package publish
In order to enable the import of a package into a sandbox, you must publish it. Make a GET request to the /packages
endpoint while specifying the ID of the package you want to publish.
API format
GET /packages/{PACKAGE_ID}/export
{PACKAGE_ID}
Request
The following request publishes the package with the ID of {PACKAGE_ID}.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/packages/{PACKAGE_ID}\export \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
expiryPeriod
If no value is specified, the default will be calculated as 90 (days) from the date of publishing.
Response
A successful response returns the published package.
{
"name": "acme",
"description": "Acme Business Group",
"visibility": "TENANT",
"sourceSandbox":
{
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"type": "PARTIAL",
"correlationId": "48effe5e-1bef-4250-9c71-23b93ef5d285",
"jobId": "18abab44e25f40c284a4bd6e8f52fd29"
}
Look up a package look-up-package
You can look up an individual package by making a GET request to the /packages
endpoint that includes the corresponding ID of the package in the request path.
API format
GET /packages/{PACKAGE_ID}
{PACKAGE_ID}
Request
The following request retrieves information for {PACKAGE_ID}.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/packages/{PACKAGE_ID} \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
Response
A successful response returns details for the queried package ID. The response includes the name, description, publish date and expiry date, source sandbox of the package, as well as a list of artifacts.
{
"id": "8f585fad94d042cd82dbcba594108a41",
"version": 2,
"createdDate": 1685597784000,
"modifiedDate": 1685597810000,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"tenantId": "c875b077162b40409c1327b16da99c1b",
"name": "acme",
"description": "Acme Business Group",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg",
"packageType": "PARTIAL",
"expiry": 1693373810000,
"publishDate": 1685597810000,
"status": "PUBLISHED",
"artifactsList": [
{
"id": "f4f57771-2bd2-469a-9c13-8d803eeb6515",
"type": "JOURNEY",
"found": false,
"count": 0
},
{
"id": "7f4caca7-a477-400d-a41e-c4735f8e780d",
"type": "JOURNEY",
"found": false,
"count": 0
}
],
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
}
}
List packages list-packages
You can list all the packages in your organization, by making a GET request to the /packages
endpoint.
API format
GET /packages/?{QUERY_PARAMS}
{QUERY_PARAMS}
Request
The following request retrieves information of the packages based on the {QUERY_PARAMS}.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/packages/?property=status==DRAFT,PUBLISHED&property=createdDate>=2023-05-11T18:29:59.999Z&property=createdDate<=2023-05-16T18:29:59.999Z&start=0&orderby=-createdDate&limit=20 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
Response
A successful response returns a list of packages belonging to your organization, including details such as name, status, expiry, and artifacts list.
{
"totalElements": 109,
"currentPage": 0,
"totalPages": 6,
"hasPreviousPage": false,
"hasNextPage": true,
"data": [
{
"id": "8f585fad94d042cd82dbcba594108a41",
"version": 2,
"createdDate": 1685597784000,
"modifiedDate": 1685597810000,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"tenantId": "c875b077162b40409c1327b16da99c1b",
"name": "acme",
"description": "Acme Business Group",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg",
"packageType": "PARTIAL",
"expiry": 1693373810000,
"publishDate": 1685597810000,
"status": "PUBLISHED",
"artifactsList": [
{
"id": "f4f57771-2bd2-469a-9c13-8d803eeb6515",
"type": "JOURNEY",
"found": false,
"count": 0
},
{
"id": "7f4caca7-a477-400d-a41e-c4735f8e780d",
"type": "JOURNEY",
"found": false,
"count": 0
}
],
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
}
},
{
"id": "0d7e427ce4cb4dc1b78e30ef61b125c1",
"version": 2,
"createdDate": 1685555213000,
"modifiedDate": 1685555275000,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"tenantId": "7d7d8bbe3c7c4a8ea701cc5e42c57aeb",
"name": "acme",
"description": "Acme Business Group",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg",
"packageType": "PARTIAL",
"expiry": 1693331275000,
"publishDate": 1685555275000,
"status": "PUBLISHED",
"artifactsList": [
{
"id": "626a9669a9f5b818db270e95",
"type": "CATALOG_DATASET",
"found": false,
"count": 0
}
],
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
}
}
]
}
Import a package import
This endpoint is used to fetch the conflicting objects in the specified target sandbox. Conflicting objects represent similar objects that are already present in the target sandbox.
API format
GET /packages/{PACKAGE_ID}/import?targetSandbox=targetSandboxName
{PACKAGE_ID}
Request
The following request imports the {PACKAGE_ID}.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/packages/{PACKAGE_ID}/import?targetSandbox=targetSandboxName \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
Response
Conflicts are returned in the response. The response shows the original package plus the alternatives
fragment as an array ordered by ranking.
code language-json |
---|
|
Submit an import submit-import
You can submit an import for a package once you have reviewed conflicts and provided substitutions by making a POST request to the /packages
endpoint. The result is provided as a payload, which starts the import job for the destination sandbox as specified in the payload.
Payload also accept user specified job name and description for import job. If user specified name and description is not available, then package name and description is used for job name and description.
API format
POST /packages/import
Request
The following request retrieves packages to be imported. The payload is a map of substitutions where, if an entry exists, the key is the artifactId
provided by the package, and the alternative is the value. If the map or payload is empty, no substitutions are performed.
curl -X POST \
https://platform.adobe.io/data/foundation/exim/packages/import/ \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d'{
"id": "09484a599f5f4a5faa43986643964615",
"name": "acme",
"description": "Acme Business Group",
"destinationSandbox": {
"name": "cjm-mr",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"alternatives": {
"https://ns.adobe.com/cjmstage/schemas/ac33bbd22eb4ad6656e1c7e12e9f520261fb39fd28a902a9": {
"id": "https://ns.adobe.com/cjmstage/schemas/a3b935344685afad4e52c753161cf673ec23d4fb1b3e9ce",
"type": "REGISTRY_SCHEMA"
}
}
}'
alternatives
alternatives
represent the mapping of source sandbox artifacts to the existing target sandbox artifacts. Because they are already there, the import job avoids creating these artifacts in the target sandbox.Response
{
"name": "acme",
"description": "Acme Business Group",
"visibility": "TENANT",
"sourceSandbox":
{
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"destinationSandbox":
{
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"type": "PARTIAL",
"correlationId": "48effe5e-1bef-4250-9c71-23b93ef5d285",
"jobId": "18abab44e25f40c284a4bd6e8f52fd29"
}
List all dependent objects dependent-objects
List all dependent objects for the exported objects in a package by making a POST request to the /packages
endpoint while specifying the ID of the package.
API format
POST /packages/{PACKAGE_ID}/children
{PACKAGE_ID}
Request
The following request lists all dependent objects for the {PACKAGE_ID}.
curl -X POST \
https://platform.adobe.io/data/foundation/exim/packages/{PACKAGE_ID}/children \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d'[
{
"id": "4d4c874ec3344d64bf8b3160e60ac78b",
"type": "MAPPING_SET"
},
{
"id": "https://ns.adobe.com/cjmstage/schemas/20121c2110bb2c6a585baabe5f82994577da1f7d0628234c",
"type": "REGISTRY_SCHEMA"
},
{
"id": "https://ns.adobe.com/cjmstage/classes/24c1525f4f06fae2d203c6b78e26ae479ec4541c2c0d6b26",
"type": "REGISTRY_CLASS"
}
]'
Response
A successful response returns a list of children for the objects.
[
{
"id": "4d4c874ec3344d64bf8b3160e60ac78b",
"title": "4d4c874ec3344d64bf8b3160e60ac78b",
"type": "MAPPING_SET",
"children": [
{
"id": "https://ns.adobe.com/cjmstage/schemas/20121c2110bb2c6a585baabe5f82994577da1f7d0628234c",
"title": "Dean Dataset 1 - adhoc schema - 1618950408870",
"type": "REGISTRY_SCHEMA"
}
]
},
{
"id": "https://ns.adobe.com/cjmstage/schemas/20121c2110bb2c6a585baabe5f82994577da1f7d0628234c",
"title": "Dean Dataset 1 - adhoc schema - 1618950408870",
"type": "REGISTRY_SCHEMA",
"children": [
{
"id": "https://ns.adobe.com/cjmstage/classes/24c1525f4f06fae2d203c6b78e26ae479ec4541c2c0d6b26",
"title": "Dean Dataset 1 - Adhoc class - 1618950408870",
"type": "REGISTRY_CLASS"
}
]
},
{
"id": "https://ns.adobe.com/cjmstage/classes/24c1525f4f06fae2d203c6b78e26ae479ec4541c2c0d6b26",
"title": "Dean Dataset 1 - Adhoc class - 1618950408870",
"type": "REGISTRY_CLASS",
"children": []
}
]
Check role-based permissions to import all package artifacts role-based-permissions
You can check if you have permissions to import package artifacts by making a GET request to the /packages
endpoint while specifying the ID of the package and the target sandbox name.
API format
GET /packages/preflight/{packageId}?targetSandbox=<sandbox_name
{PACKAGE_ID}
Request
The following request checks your permissions for the {PACKAGE_ID} and sandbox.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/packages/preflight/{PACKAGE_ID}?targetSandbox=<sandbox_name> \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
Response
A successful response returns resource permissions for the target sandbox, including a list of permissions required, missing permissions, type of artifact, and a decision on whether the creation is allowed.
code language-json |
---|
|
List export/import jobs list-jobs
You can list current export/import jobs by making a GET request to the /packages
endpoint.
API format
GET /packages/jobs?{QUERY_PARAMS}
{QUERY_PARAMS}
Request
The following request lists all successful import jobs.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/packages/jobs?property=requestType==IMPORT&property=jobStatus==SUCCESS&orderby=createdDate&start=0&limit=5 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
Response
A successful response returns all successful import jobs.
{
"totalElements": 42,
"currentPage": 0,
"totalPages": 9,
"hasPreviousPage": false,
"hasNextPage": true,
"data": [
{
"id": "3c1b92cf47a246d7bfbe6fd507c5d543",
"name": "acme",
"updated": 1685973675401,
"created": 1685973675401,
"jobType": "NEW",
"packageType": "PARTIAL",
"description": "Acme Business Group",
"jobStatus": "SUCCESS",
"visibility": "TENANT",
"sourceSandBox": "acme-sandbox",
"targetSandbox": "poc",
"createdBy": "{CREATED_BY}"
},
{
"id": "ead59d21405f4184a94dd786a1bf040d",
"name": "acme1",
"updated": 1685986367198,
"created": 1685986367198,
"jobType": "NEW",
"packageType": "PARTIAL",
"description": "Acme Business Group",
"jobStatus": "SUCCESS",
"visibility": "TENANT",
"sourceSandBox": "acme-sandbox",
"targetSandbox": "poc",
"createdBy": "{CREATED_BY}"
},
{
"id": "85ddaa3c2f6c475088167cde7a9d4326",
"name": "acme2",
"updated": 1686147692568,
"created": 1686147692568,
"jobType": "NEW",
"packageType": "PARTIAL",
"description": "Acme Business Group",
"jobStatus": "SUCCESS",
"visibility": "TENANT",
"sourceSandBox": "acme-sandbox",
"targetSandbox": "poc",
"createdBy": "{CREATED_BY}"
},
{
"id": "c49a4fcb31954cbd828ece1da096c8f5",
"name": "acme3",
"updated": 1686148007586,
"created": 1686148007586,
"jobType": "NEW",
"packageType": "PARTIAL",
"description": "Acme Business Group",
"jobStatus": "SUCCESS",
"visibility": "TENANT",
"sourceSandBox": "acme-sandbox",
"targetSandbox": "poc",
"createdBy": "{CREATED_BY}"
},
{
"id": "a3669315baed4cf2af49bf9ce90b8158",
"name": "acme4",
"updated": 1686148651910,
"created": 1686148651910,
"jobType": "NEW",
"packageType": "PARTIAL",
"description": "Acme Business Group",
"jobStatus": "SUCCESS",
"visibility": "TENANT",
"sourceSandBox": "acme-sandbox",
"targetSandbox": "poc",
"createdBy": "{CREATED_BY}"
}
]
}
Share packages across organizations org-linking
The /handshake
endpoint in the sandbox tooling API allows you to partner with other organizations to share packages.
Sending a share request send-request
Send a request to a target partner organization for sharing approval by making a POST request to the /handshake/bulkCreate
endpoint. This is required before you can share private packages.
API format
POST /handshake/bulkCreate
Request
The following request initiates sharing approval between a target partner organization and the source organization.
curl -X POST \
https://platform.adobe.io/data/foundation/exim/handshake/bulkCreate \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/json' \
-H 'Authorization: {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"targetIMSOrgIds":["acme@AdobeOrg"],
"sourceIMSDetails":{
"id":"acme@AdobeOrg",
"name":"acme_org"
}
}'
targetIMSOrgIds
sourceIMSDetails
Response
A successful response returns details regarding your share request.
{
"successfulRequests": {
"acme@AdobeOrg": {
"id": "{ID}",
"version": 0,
"createdDate": 1724938816798,
"modifiedDate": 1724938816798,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"sourceIMSOrgId": "{ORG_ID}",
"targetIMSOrgId": "{TARGET_ID}",
"sourceRegion": "va6",
"sourceIMSOrgName": "{SOURCE_NAME}",
"status": "APPROVAL_PENDING",
"createdByName": "{CREATED_BY}",
"modifiedByName": "{MODIFIED_BY}",
"modifiedByIMSOrgId": "{ORG_ID}",
"statusHistory": "[{\"actionTakenBy\":\"acme@98ff67fa661fdf6549420b.e\",\"actionTakenByName\":\"{NAME}\",\"actionTakenByImsOrgID\":\"{ORG_ID}\",\"action\":\"INITIATED\",\"actionTimeStamp\":1724938816885}]",
"linkingId": "{LINKIND_ID}"
}
},
"failedRequests": {}
}
Approving received share requests approve-requests
Approve share requests from target partner organizations by making a POST request to the /handshake/action
endpoint. After approval, source partner organizations can share private packages.
API format
POST /handshake/action
Requests
The following request approves a share request from a target partner organization.
curl -X POST \
https://platform.adobe.io/data/foundation/exim/handshake/action \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"linkingID":"{LINKING_ID}",
"status":"APPROVED",
"reason":"Done",
"targetIMSOrgDetails":{
"id":"acme@AdobeOrg",
"name":"acme",
"region":"va7"
}
}'
linkingID
status
APPROVED
or REJECTED
.reason
targetIMSOrgDetails
Response
A successful response returns details regarding the approved share request.
{
"id": "{ID}",
"version": 1,
"createdDate": 1726737474000,
"modifiedDate": 1726737541731,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"sourceIMSOrgId": "{ORG_ID}",
"targetIMSOrgId": "{TARGET_ID}",
"sourceRegion": "va7",
"targetRegion": "va7",
"sourceOrgName": "{SOURCE_ORG}",
"targetOrgName": "{TARGET_ORG}",
"status": "APPROVED",
"createdByName": "{CREATED_BY}",
"modifiedByIMSOrgId": "{MODIFIED_BY}",
"statusHistory": "[{\"actionTakenBy\":\"{ACTION_BY}\",\"actionTakenByName\":\"{NAME}\",\"actionTakenByImsOrgID\":\"acme@AdobeOrg\",\"action\":\"INITIATED\",\"actionTimeStamp\":1726737474450,\"reason\":null},{\"actionTakenBy\":null,\"actionTakenByName\":null,\"actionTakenByImsOrgID\":\"745F37C35E4B776E0A49421B@AdobeOrg\",\"action\":\"APPROVED\",\"actionTimeStamp\":1726737541818,\"reason\":\"Done\"}]",
"linkingId": "{LINKING_ID}"
}
List outgoing/incoming share requests outgoing-and-incoming-requests
List outgoing and incoming share requests by making a GET request to the handshake/list?property=status%3D%3DAPPROVED&requestType=INCOMING
endpoint.
API format
GET handshake/list?property=status%3D%3DAPPROVED&requestType=INCOMING
property
APPROVED
, REJECTED
, and IN_PROGRESS
.start
0
.limit
20
.orderBy
requestType
INCOMING
or OUTGOING
.Request
The following request returns a list of all outgoing and incoming share requests.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/handshake/list?property=status%3D%3DAPPROVED&requestType=INCOMING \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id:{ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
Response
A successful response returns a list of outgoing and incoming share requests and their details.
{
"totalElements": 1,
"currentPage": 0,
"totalPages": 1,
"hasPreviousPage": false,
"hasNextPage": false,
"data": [
{
"id": "{ID}",
"version": 1,
"createdDate": 1724929446000,
"modifiedDate": 1724929617000,
"modifiedBy": "{MODIFIED_BY}",
"sourceIMSOrgId": "{ORG_ID}",
"targetIMSOrgId": "{TARGET_ID}",
"sourceRegion": "va7",
"targetRegion": "va6",
"sourceOrgName": "{SOURCE_ORG}",
"targetOrgName": "{TARGET_ORG}",
"status": "APPROVED",
"createdByName": "{CREATED_BY}",
"modifiedByName": "{MODIFIED_BY}",
"modifiedByIMSOrgId": "{MODIFIED_BY}",
"statusHistory": "[{\"actionTakenBy\":\"{ACTION_BY}\",\"actionTakenByName\":\"{NAME}\",\"actionTakenByImsOrgID\":\"{ORG_ID}\",\"action\":\"INITIATED\",\"actionTimeStamp\":1724929442467,\"reason\":null},{\"actionTakenBy\":null,\"actionTakenByName\":\"{NAME}\",\"actionTakenByImsOrgID\":\"{ORG_ID}\",\"action\":\"APPROVED\",\"actionTimeStamp\":1724929617531,\"reason\":\"Done\"}]",
"linkingId": "{LINKING_ID}"
}
],
"nextPage": null,
"pageSize": null
}
Transfer packages
Use the /transfer
endpoint in the sandbox tooling API to fetch and create new package sharing requests.
New share request share-request
Fetch a published source organization’s package and share it with a target organization by making a POST request to the /transfer
endpoint while providing the package ID and target organization’s ID.
API format
POST /transfer
Request
The following request fetches a source organizations package and shares it with a target organization.
curl -X POST \
https://platform.adobe.io/data/foundation/exim/transfer/ \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"packageId": "{PACKAGE_ID}",
"targets": [
{
"imsOrgId": "{TARGET_IMS_ORG}"
}
]
}'
packageId
targets
Response
A successful response returns details of the package requested and its share status.
[
{
"id": "{ID}",
"version": 0,
"createdDate": 1726480559313,
"modifiedDate": 1726480559313,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"sourceIMSOrgId": "{ORG_ID}",
"targetIMSOrgId": "{TARGET_ID}",
"packageId": "{PACKAGE_ID}",
"status": "PENDING",
"initiatedBy": "acme@3ec9197a65a86f34494221.e",
"requestType": "PRIVATE"
}
]
Fetch a share request by ID fetch-transfer-by-id
Fetch the details of a share request by making a GET request to the /transfer/{TRANSFER_ID}
endpoint while providing the transfer ID.
API format
GET /transfer/{TRANSFER_ID}
{TRANSFER_ID}
Request
The following request fetches a transfer with the ID of {TRANSFER_ID}.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/transfer/0c843180a64c445ca1beece339abc04b \
-H 'x-api-key: {API__KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Authorization: Bearer {ACCESS_TOKEN}'
Response
A success response returns details of a share request.
{
"id": "{ID}",
"sourceIMSOrgId": "{ORG_ID}",
"sourceOrgName": "{SOURCE_ORG}",
"targetIMSOrgId": "{TARGET_ID}",
"targetOrgName": "{TARGET_ORG}",
"packageId": "{PACKAGE_ID}",
"packageName": "{PACKAGE_NAME}",
"status": "COMPLETED",
"initiatedBy": "{INITIATED_BY}",
"createdDate": 1724442856000,
"requestType": "PRIVATE"
}
Fetch share list transfers-list
Fetch a list of transfer requests by making a GET request to the /transfer/list?{QUERY_PARAMETERS}
endpoint, changing the query parameters as needed.
API format
GET `/transfer/list?{QUERY_PARAMETERS}`
property
COMPLETED
, PENDING
, IN_PROGRESS
, FAILED
.start
0
.limit
20
.orderBy
createdDate
field.Request
The following request fetches a list of transfer requests from the search parameters provided.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/transfer/list?property=status==COMPLETED&start=0&limit=2&orderBy=-createdDate \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Authorization: Bearer {ACCESS_TOKEN}'
Response
A successful response returns a list of all transfer requests from the search parameters provided.
{
"totalElements": 43,
"currentPage": 0,
"totalPages": 22,
"hasPreviousPage": false,
"hasNextPage": true,
"data": [
{
"id": "{ID}",
"sourceIMSOrgId": "{ORG_ID}",
"sourceOrgName": "{SOURCE_ORG}",
"targetIMSOrgId": "{TARGET_ID}",
"targetOrgName": "{TARGET_ORG}",
"packageId": "{PACKAGE_ID}",
"packageName": "{PACKAGE_NAME}",
"status": "COMPLETED",
"initiatedBy": "{INITIATED_BY}",
"completedTime": 1726129077000,
"createdDate": 1726129062000,
"requestType": "PRIVATE"
},
{
"id": "{ID}",
"sourceIMSOrgId": "{ORG_ID}",
"sourceOrgName": "{SOURCE_ORG}",
"targetIMSOrgId": "{TARGET_ID}",
"targetOrgName": "{TARGET_ORG}",
"packageId": "{PACKAGE_ID}",
"packageName": "{PACKAGE_NAME}",
"status": "COMPLETED",
"initiatedBy": "{INITIATED_BY}",
"completedTime": 1726066046000,
"createdDate": 1726065936000,
"requestType": "PRIVATE"
}
],
"nextPage": null,
"pageSize": null
}
Update package availability from private to public update-availability
Change a package from private to public by making a GET request to the /packages/update
endpoint. By default, a package is created with private availability.
API format
PUT `/packages/update`
Request
The following request changes a packages availability from private to public.
curl -X PUT \
https://platform.adobe.io/data/foundation/exim/packages \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-type: application/json' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-d '{
"id":"{ID}",
"action":"UPDATE",
"packageVisibility":"PUBLIC"
}'
id
action
packageVisbility
Response
A successful response returns details on a package and its visibility.
{
"id": "{ID}",
"version": 7,
"createdDate": 1729624618000,
"modifiedDate": 1729658596340,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"name": "acme",
"imsOrgId": "{ORG_ID}",
"packageType": "PARTIAL",
"expiry": 1737434596325,
"status": "PUBLISH_FAILED",
"packageVisibility": "PUBLIC",
"artifactsList": [
{
"id": "{ID}",
"type": "PROFILE_SEGMENT",
"found": false,
"count": 0,
"title": "Acme Profile Segment"
}
],
"schemaMapping": {},
"sourceSandbox": {
"name": "acme-sandbox",
"imsOrgId": "{ORG_ID}",
"empty": false
}
}
Request to Import a public package pull-public-package
Import a package from a source organization with public availability by making a POST request to the /transfer/pullRequest
endpoint.
API format
POST /transfer/pullRequest
Request
The following request will import a package and sets its availability to public.
curl -X POST \
https://platform.adobe.io/data/foundation/exim/transfer/pullRequest \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"imsOrgId": "{ORG_ID}",
"packageId": "{PACKAGE_ID}"
}'
imsOrgId
packageId
Response
A succcessful response returns details on the imported public package.
{
"id": "{ID}",
"version": 0,
"createdDate": 1729658890425,
"modifiedDate": 1729658890425,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}",
"sourceIMSOrgId": "{ORG_ID}",
"targetIMSOrgId": "{TARGET_ID}",
"packageId": "{PACKAGE_ID}",
"status": "PENDING",
"initiatedBy": "{INITIATED_BY}",
"pipelineMessageId": "{MESSAGE_ID}",
"requestType": "PUBLIC"
}
List public packages list-public-packages
Fetch a list of packages with public visbility by making a GET request to the /transfer/list?{QUERY_PARAMS}
endpoint.
API format
GET /transfer/list?{QUERY_PARAMS}
property
COMPLETED
and FAILED
.start
0
.limit
20
.orderBy
createdDate
field.requestType
PUBLIC
or PRIVATE
.Request
The following request fetches a list of packages with public availability.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/transfer/list?property=status%3D%3DCOMPLETED%2CFAILED&requestType=PUBLIC&orderby=-createdDate \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/json' \
-H 'Authorization: {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
Response
A successful response returns a list of public packages and their details.
code language-json |
---|
|
Copy package payload (#package-payload)
You can copy a public package’s payload by making a GET request to the /packages/payload
endpoint that includes the corresponding ID of the package in the request path.
API format
GET /packages/payload/{PACKAGE_ID}
{PACKAGE_ID}
Request
The following request fetches a package’s payload with the ID of {PACKAGE_ID}.
curl -X GET \
https://platform.adobe.io/data/foundation/exim/packages/payload/{PACKAGE_ID} \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
imsOrdId
packageId
Response
A successful response returns the package’s payload.
{
"imsOrgId": "{ORG_ID}",
"packageId": "{PACKAGE_ID}"
}