您可以透過向以下網址發出GET請求來查詢特定決策: Offer Library 包含其中一種決定的API @id
或請求路徑中決定的名稱。
API格式
GET /{ENDPOINT_PATH}/{CONTAINER_ID}/queries/core/search?schema={SCHEMA_ACTIVITIES}&{QUERY_PARAMS}
參數 | 說明 | 範例 |
---|---|---|
{ENDPOINT_PATH} |
存放庫API的端點路徑。 | https://platform.adobe.io/data/core/xcore/ |
{CONTAINER_ID} |
決策所在的容器。 | e0bd8463-0913-4ca1-bd84-6309134ca1f6 |
{SCHEMA_ACTIVITIES} |
定義與決定相關聯的結構描述。 | https://ns.adobe.com/experience/offer-management/offer-activity;version=0.5 |
id |
用於比對 @id 個實體的屬性。 字串完全相符。 引數 id 和 name 不能一起使用。 |
xcore:offer-activity:124527ab00b2ebbc |
name |
用於比對實體的xdm:name屬性的字串。 字串以大寫完全相符,但可使用萬用字元。 引數"id"和"name"不能一起使用 | LBAR |
要求
curl -X GET \
'https://platform.adobe.io/data/core/xcore/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances?schema=https://ns.adobe.com/experience/offer-management/offer-activity;version=0.5&id=xcore:offer-activity:124527ab00b2ebbc' \
-H 'Accept: *,application/vnd.adobe.platform.xcore.hal+json; schema="https://ns.adobe.com/experience/xcore/hal/results"' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
回應
成功的回應會傳回位置的詳細資料,包括容器ID、例項ID和唯一決定的相關資訊 @id
.
{
"containerId": "e0bd8463-0913-4ca1-bd84-6309134ca1f6",
"schemaNs": "https://ns.adobe.com/experience/offer-management/offer-activity;version=0.5",
"requestTime": "2020-10-19T19:50:08.047489Z",
"_embedded": {
"results": [
{
"instanceId": "4e0206d0-0e6a-11eb-884a-c1a1104e3d7d",
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-activity;version=0.5"
],
"productContexts": [
"acp"
],
"repo:etag": 1,
"repo:createdDate": "2020-10-14T22:12:10.300775Z",
"repo:lastModifiedDate": "2020-10-14T22:12:10.300775Z",
"repo:createdBy": "{CREATED_BY}",
"repo:lastModifiedBy": "{MODIFIED_BY}",
"repo:createdByClientId": "{CREATED_CLIENT_ID}",
"repo:lastModifiedByClientId": "{MODIFIED_CLIENT_ID}",
"_score": 0,
"_instance": {
"xdm:fallback": "xcore:fallback-offer:1233160780eaa2ef",
"xdm:name": "LBAR",
"xdm:endDate": "2021-02-28T08:00:00.000Z",
"xdm:startDate": "2020-10-14T07:00:00.000Z",
"xdm:status": "live",
"xdm:criteria": [
{
"xdm:placements": [
"xcore:offer-placement:122204529514a2c0"
],
"xdm:optionSelection": {
"xdm:filter": "xcore:offer-filter:122a120f234dac7f"
}
}
],
"@id": "xcore:offer-activity:124527ab00b2ebbc"
},
"_links": {
"self": {
"name": "https://ns.adobe.com/experience/offer-management/offer-activity;version=0.5#4e0206d0-0e6a-11eb-884a-c1a1104e3d7d",
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances/4e0206d0-0e6a-11eb-884a-c1a1104e3d7d",
"@type": "https://ns.adobe.com/experience/offer-management/offer-activity;version=0.5"
}
},
"sandboxName": "ode-prod-va7-edge-testing"
}
],
"total": 1,
"count": 1
},
"_links": {
"self": {
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances?schema=https://ns.adobe.com/experience/offer-management/offer-activity;version=0.5&id=xcore:offer-activity:124527ab00b2ebbc",
"@type": "https://ns.adobe.com/experience/xcore/hal/results"
}
}
}