包端点
沙盒工具允许您选择不同的工件(也称为对象)并将它们导出到包中。 资源包可以包含单个对象或多个对象(如数据集或架构)。 包中包含的任何工件都必须来自同一沙盒。
沙盒工具API中的/packages
端点允许您以编程方式管理组织中的包,包括发布包并将包导入沙盒。
创建资源包 create
您可以创建多工件包,方法是在提供包名称和包类型的值的同时,向/packages
端点发出POST请求。
API格式
POST /packages/
请求
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
packageType
为FULL
时,artifacts
值应为 null 或 empty。响应
成功的响应将返回您新创建的包。 响应包括相应的程序包ID,以及有关其状态、到期和工件列表的信息。
{
"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
您可以通过向/packages
端点发出PUT请求来更新包。
将工件添加到资源包 add-artifacts
要将项目添加到包,您必须提供id
并包括action
的 ADD。
API格式
PUT /packages/
请求
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
当前支持以下工件类型。
JOURNEY
ID_NAMESPACE
REGISTRY_DATATYPE
REGISTRY_CLASS
REGISTRY_MIXIN
REGISTRY_SCHEMA
CATALOG_DATASET
DULE_CONSENT_POLICY
PROFILE_SEGMENT
FLOW
响应
成功的响应将返回您更新的包。 响应包括相应的程序包ID,以及有关其状态、到期和工件列表的信息。
{
"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
若要从包中删除项目,必须提供id
并包含action
的 DELETE。
API格式
PUT /packages/
请求
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
响应
成功的响应将返回您更新的包。 响应包括相应的程序包ID,以及有关其状态、到期和工件列表的信息。
{
"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
要更新包中的元数据字段,必须为action
提供id
并包括 UPDATE。
API格式
PUT /packages/
请求
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
响应
成功的响应将返回您更新的包。 响应包括相应的程序包ID,以及有关其描述、状态、到期和工件列表的信息。
{
"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
要删除包,请向/packages
端点发出DELETE请求,并指定要删除的包的ID。
API格式
DELETE /packages/{PACKAGE_ID}
{PACKAGE_ID}
请求
以下请求删除ID为{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}' \
响应
成功的响应会返回一个原因,其中显示已删除的包ID。
{
"reason": "Package d30e0424a37b46ada6a5cf37f47a86ff deleted"
}
Publish包 publish
为了能够将包导入沙盒,您必须发布它。 在指定要发布的包的ID时,向/packages
端点发出GET请求。
API格式
GET /packages/{PACKAGE_ID}/export
{PACKAGE_ID}
请求
以下请求发布了ID为{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}' \
expiryPeriod
如果未指定值,则默认值将从发布日期算起90(天)。
响应
成功的响应将返回已发布的包。
{
"name": "acme",
"description": "Acme Business Group",
"visibility": "TENANT",
"sourceSandbox":
{
"name": "acme-sandbox",
"imsOrgId": "5C1328435BF324E90A49402A@AdobeOrg"
},
"type": "PARTIAL",
"correlationId": "48effe5e-1bef-4250-9c71-23b93ef5d285"
}
查找包 look-up-package
通过向/packages
端点发出GET请求,您可以查找单个包,该请求路径中包含包的相应ID。
API格式
GET /packages/{PACKAGE_ID}
{PACKAGE_ID}
请求
以下请求检索{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}' \
响应
成功的响应会返回查询的包ID的详细信息。 响应包括包的名称、描述、发布日期和到期日期、源沙盒以及工件列表。
{
"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
您可以通过向/packages
端点发出GET请求来列出组织中的所有包。
API格式
GET /packages/?{QUERY_PARAMS}
{QUERY_PARAMS}
请求
以下请求根据{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}' \
响应
成功的响应将返回属于您组织的包列表,包括名称、状态、到期和工件列表等详细信息。
{
"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
此端点用于获取指定目标沙盒中的冲突对象。 冲突对象表示目标沙盒中已存在的类似对象。
API格式
GET /packages/{PACKAGE_ID}/import?targetSandbox=targetSandboxName
{PACKAGE_ID}
请求
以下请求导入{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}' \
响应
响应中返回冲突。 响应将原始包加上alternatives
片段显示为按排名排序的数组。
code language-json |
---|
|
提交导入 submit-import
查看冲突并通过向/packages
端点发出POST请求提供替换后,您可以提交包的导入。 结果作为有效负载提供,有效负载将启动在有效负载中指定的目标沙盒的导入作业。
有效负载还接受用户指定的导入作业的作业名称和描述。 如果用户指定的名称和说明不可用,则包名称和说明将用于作业名称和说明。
API格式
POST /packages/import
请求
以下请求会检索要导入的包。 有效负载是一个替代映射,如果存在条目,则键是包提供的artifactId
,而替代项是值。 如果映射或有效负载为 empty,则不会执行替换。
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
表示源沙盒项目到现有目标沙盒项目的映射。 由于它们已经存在,导入作业会避免在Target沙盒中创建这些工件。响应
{
"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"
}
列出所有依赖对象 dependent-objects
通过在指定包的ID时向/packages
端点发出POST请求,列出包中导出对象的所有依赖对象。
API格式
POST /packages/{PACKAGE_ID}/children
{PACKAGE_ID}
请求
以下请求列出了{PACKAGE_ID}的所有依赖对象。
curl -X POST \
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}' \
-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"
}
]'
响应
成功的响应将返回对象的子项列表。
[
{
"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": []
}
]
检查基于角色的权限以导入所有包对象 role-based-permissions
您可以检查您是否有权导入包工件,方法是在指定包的ID和目标沙盒名称时,向/packages
端点发出GET请求。
API格式
GET /packages/preflight/{packageId}?targetSandbox=<sandbox_name
{PACKAGE_ID}
请求
以下请求检查您对{PACKAGE_ID}和沙盒的权限。
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}' \
响应
成功的响应会返回目标沙盒的资源权限,包括所需的权限列表、缺少的权限、工件的类型以及是否允许创建的决定。
code language-json |
---|
|
列出导出/导入作业 list-jobs
您可以通过向/packages
端点发出GET请求来列出当前的导出/导入作业。
API格式
GET /packages/jobs?{QUERY_PARAMS}
{QUERY_PARAMS}
请求
以下请求列出了所有成功的导入作业。
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}' \
响应
成功的响应将返回所有成功的导入作业。
{
"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}"
}
]
}
跨组织共享包 org-linking
沙盒工具API中的/handshake
端点允许您与其他组织合作以共享包。
发送共享请求 send-request
通过向/handshake/bulkCreate
端点发送POST请求,向目标合作伙伴组织发送共享批准请求。 在共享专用包之前,必须填写此字段。
API格式
POST /handshake/bulkCreate
请求
以下请求将启动目标伙伴组织与来源组织之间的共享审批。
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
响应
成功的响应将返回有关共享请求的详细信息。
{
"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": {}
}
批准已接收的共享请求 approve-requests
通过向/handshake/action
端点发出POST请求,批准来自目标伙伴组织的共享请求。 批准后,源合作伙伴组织可以共享私有包。
API格式
POST /handshake/action
请求
以下请求批准来自目标合作伙伴组织的共享请求。
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
reason
targetIMSOrgDetails
响应
成功的响应将返回有关批准的共享请求的详细信息。
{
"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}"
}
列出传出/传入的共享请求 outgoing-and-incoming-requests
通过向handshake/list?property=status%3D%3DAPPROVED&requestType=INCOMING
端点发出GET请求,列出传出和传入的共享请求。
API格式
POST handshake/list?property=status%3D%3DAPPROVED&requestType=INCOMING
property
APPROVED
、REJECTED
和IN_PROGRESS
。start
0
。limit
20
。orderBy
requestType
INCOMING
或OUTGOING
。请求
以下请求返回所有传出和传入的共享请求的列表。
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' \
响应
成功的响应将返回传出和传入共享请求的列表及其详细信息。
{
"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
}
传输包
使用沙盒工具API中的/transfer
端点获取和创建新的包共享请求。
新建共享请求 share-request
获取已发布的源组织的包,并通过在提供包ID和目标组织的ID的同时向/transfer
端点发出POST请求将其与目标组织共享。
API格式
POST /transfer
请求
以下请求会获取一个源组织包并将其与目标组织共享。
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
响应
成功的响应会返回所请求资源包及其共享状态的详细信息。
[
{
"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",
"transferDetails": {
"messages": [
"Fetched Package",
"Fetched Manifest"
],
"additionalMetadata": null
},
"requestType": "PRIVATE"
}
]
按ID获取共享请求 fetch-transfer-by-id
在提供传输ID的同时,通过向/transfer/{TRANSFER_ID}
端点发出GET请求来获取共享请求的详细信息。
API格式
GET /transfer/{TRANSFER_ID}
{TRANSFER_ID}
请求
以下请求获取ID为{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}'
响应
成功响应会返回共享请求的详细信息。
{
"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,
"transferDetails": {
"messages": [
"Fetched Package",
"Fetched Manifest",
"Tenant Identified",
"Fetched Sandbox Id",
"Fetched Blob Files",
"Message Published to Kafka",
"Completed Transfer"
],
"additionalMetadata": null
},
"requestType": "PRIVATE"
}
获取共享列表 transfers-list
通过向/transfer/list?{QUERY_PARAMETERS}
端点发出GET请求并根据需要更改查询参数,获取传输请求的列表。
API格式
GET `/transfer/list?{QUERY_PARAMETERS}`
property
COMPLETED
、PENDING
、IN_PROGRESS
、FAILED
。start
0
。limit
20
。orderBy
createdDate
字段。请求
以下请求从提供的搜索参数中获取传输请求的列表。
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}'
响应
成功的响应会从提供的搜索参数返回所有传输请求的列表。
{
"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,
"transferDetails": {
"messages": [
"Fetched Package",
"Fetched Manifest",
"Tenant Identified",
"Fetched Sandbox Id",
"Fetched Blob Files",
"Message Published to Kafka",
"Completed Transfer",
"Finished with status: COMPLETED"
],
"additionalMetadata": null
},
"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,
"transferDetails": {
"messages": [
"Fetched Package",
"Fetched Manifest",
"Tenant Identified",
"Fetched Sandbox Id",
"Fetched Blob Files",
"Message Published to Kafka",
"Completed Transfer",
"Finished with status: COMPLETED"
],
"additionalMetadata": null
},
"requestType": "PRIVATE"
}
],
"nextPage": null,
"pageSize": null
}
将程序包可用性从专用更新为公用 update-availability
通过向/packages/update
端点发出GET请求,将包从专用更改为公用。 默认情况下,将使用专用可用性创建包。
API格式
GET `/packages/update`
请求
以下请求将包的可用性从专用更改为公用。
curl -X GET \
http://platform.adobe.io/data/foundation/exim/packages/update \
-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
响应
成功的响应将返回有关包及其可见性的详细信息。
{
"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
}
}
请求导入公共资源包 pull-public-package
通过向/transfer/pullRequest
端点发出POST请求,从具有公开可用性的源组织导入包。
API格式
POST /transfer/pullRequest
请求
以下请求将导入资源包,并将它设置为对公众可用。
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
响应
成功响应将返回有关导入的公共包的详细信息。
{
"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
通过向/transfer/list?{QUERY_PARAMS}
端点发出GET请求获取具有公开可见性的包列表。
API格式
GET /transfer/list?{QUERY_PARAMS}
property
COMPLETED
和FAILED
。start
0
。limit
20
。orderBy
createdDate
字段。requestType
PUBLIC
或PRIVATE
。请求
以下请求会获取具有公共可用性的包的列表。
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' \
响应
成功的响应将返回公共包及其详细信息的列表。
code language-json |
---|
|
复制包有效负载(#package-payload)
您可以通过向/packages/payload
端点发出GET请求来复制公共包的有效负载,该端点在请求路径中包含包的相应ID。
API格式
GET /packages/payload/{PACKAGE_ID}
{PACKAGE_ID}
请求
以下请求提取ID为{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' \
-d '{
"imsOrgId": "{ORG_ID}",
"packageId": "{PACKAGE_ID}"
}'
imsOrdId
packageId
响应
成功的响应将返回包的有效负载。
{
"imsOrgId": "{ORG_ID}",
"packageId": "{PACKAGE_ID}"
}