静的リスト
静的リスト REST APIを使用して、静的リストをクエリ、作成、更新、削除します。
リスト メンバーに対するリード データベース操作については、 リスト メンバーシップ を参照してください。
クエリ
ID 別
IDによるクエリ は、1つの静的リスト id パス パラメーターを受け取り、一致するレコードを返します。
GET /rest/asset/v1/staticList/{id}.json
{
"success": true,
"errors": [],
"requestId": "843c#1641f969e96",
"result": [
{
"id": 1021,
"name": "Foundation Seed List",
"createdAt": "2017-07-27T01:38:33Z+0000",
"updatedAt": "2017-07-27T01:39:26Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1021A1"
}
]
}
名前別
名前によるクエリ は、静的リスト name パラメーターを使用します。 エンドポイントは、静的リスト名に対して完全一致を実行し、一致するレコードを返します。
GET /rest/asset/v1/staticList/byName.json?name=Foundation Seed List
{
"success": true,
"errors": [],
"requestId": "28ab#1641fa246b9",
"result": [
{
"id": 1021,
"name": "Foundation Seed List",
"createdAt": "2017-07-27T01:38:33Z+0000",
"updatedAt": "2017-07-27T01:39:26Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1021A1"
}
]
}
参照
参照エンドポイントを使用して、一括で静的リストを取得。 オプションのfolder パラメーターは、クエリを親フォルダーにスコープします。 フォルダーをidとtypeを含むJSON オブジェクトとして渡します。
ページネーションにoffsetとmaxReturnを使用します。 earliestUpdatedAtとlatestUpdatedAtを低い日時と高い日時の境界として使用します。 これらのパラメーターは、範囲内で作成または更新されたリストを返します。 ミリ秒なしでISO-8601値を使用します。
GET /rest/asset/v1/staticLists.json?folder={"id":13,"type":"Folder"}
{
"success": true,
"errors": [],
"requestId": "2dc0#1641f846633",
"result": [
{
"id": 1021,
"name": "Foundation Seed List",
"createdAt": "2017-07-27T01:38:33Z+0000",
"updatedAt": "2017-07-27T01:39:26Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1021A1"
},
{
"id": 1022,
"name": "Blacklist Seed List",
"createdAt": "2017-07-27T23:19:33Z+0000",
"updatedAt": "2017-07-27T23:21:29Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1022A1"
},
{
"id": 1023,
"name": "Possible Duplicates Seed List",
"createdAt": "2017-07-28T00:10:02Z+0000",
"updatedAt": "2017-07-28T00:11:22Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1023A1"
}
]
}
作成と更新
application/x-www-form-urlencoded POST リクエストを静的リストの作成に送信します。 folderおよびname パラメーターが必要です。
folderをidとtypeを含むJSON オブジェクトとして渡します。 nameは一意である必要があります。 オプションのdescription パラメーターは、リストを記述します。
POST /rest/asset/v1/staticLists.json
Content-Type: application/x-www-form-urlencoded
folder={"id":1034,"type":"Program"}&name=My Static List
{
"success": true,
"errors": [],
"requestId": "1269d#164209d6e1e",
"result": [
{
"id": 1027,
"name": "My Static List",
"createdAt": "2018-06-21T04:32:25Z+0000",
"updatedAt": "2018-06-21T04:32:25Z+0000",
"folder": {
"id": 1034,
"type": "Program"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1027A1"
}
]
}
更新エンドポイントを使用して静的リストを変更します。 オプションのdescription パラメーターによって説明が変更されます。 オプションのname パラメーターは名前を変更し、一意である必要があります。
POST /rest/asset/v1/staticList/{id}.json
Content-Type: application/x-www-form-urlencoded
description=This is a static list used for testing
{
"success": true,
"errors": [],
"requestId": "f84f#16420b4c746",
"result": [
{
"id": 1027,
"name": "My Static List",
"description": "This is a static list used for testing",
"createdAt": "2018-06-21T04:32:26Z+0000",
"updatedAt": "2018-06-21T04:57:55Z+0000",
"folder": {
"id": 1034,
"type": "Program"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1027A1"
}
]
}
削除
静的リスト 🔗を削除するには、そのidをパスパラメーターとして渡します。 読み込み、書き出し、または別のアセットで使用されているリストは削除できません。
POST /rest/asset/v1/staticList/{id}/delete.json
{
"success": true,
"errors": [],
"requestId": "2c79#16420ded0e9",
"result": [
{
"id": 1027
}
]
}