APIを使ったキャンペーンの作成
キャンペーンは、データモデル名とキャンペーン設定を指定して作成します。キャンペーン名を含めることができます。名前は^[a-z][a-z\d\-]*$というパターンに一致させる必要があります。
応答にはフィールドidが含まれているので、後でキャンペーンを編集する時に便利です。
この例ではリクエストの送信でTalend API Testerが使われます。
Talend API Testerの詳細は、Talend Cloud API Testerユーザーガイドをご覧ください。
始める前に
手順
タスクの結果
{
"id": "5f4694d651bfb7000154b5b2",
"createdBy": "owner",
"lastUpdatedBy": "owner@account.com",
"creationDate": 1601831320,
"lastUpdateDate": 1601831320,
"name": "my-campaign-resolution-created-via-api",
"label": "Improve product catalog data quality (created via API)",
"description": "Increase the level of data quality for each product catalog.",
"owners": [
"owner@account.com"
],
"ownersDetail": [
{
"firstName": "FIRSTNAME",
"lastName": "LASTNAME",
"username": "owner@account.com",
"enabled": true,
"preferredLanguage": "en",
"email": "owner@account.com",
"id": "6be3b335-05c9-4a3b-92d6-c5821f398bac"
}
],
"status": "STARTED",
"startDate": 1598461142854,
"endDate": null,
"taskType": "RESOLUTION",
"schemaRef": {
"namespace": "org.talend.schema",
"name": "demo_product",
"version": 1,
"displayName": "Demo - Product"
},
"impactAnalysisStatus": null,
"fieldsAccess": null,
"taskResolutionDelay": {
"value": 10,
"unit": "DAYS"
},
"workflow": {
"id": null,
"createdBy": "6be3b335-05c9-4a3b-92d6-c5821f398bac",
"lastUpdatedBy": "6be3b335-05c9-4a3b-92d6-c5821f398bac",
"creationDate": 1598461142855,
"lastUpdateDate": 1598461142855,
"tenantId": null,
"name": "default workflow",
"states": [
{
"name": "New",
"label": "New",
"transitionQuestion": null,
"transitions": [
{
"name": "To validate",
"label": "To validate",
"targetStateName": "To validate",
"allowedRoles": [
"Supervisor"
]
}
],
"allowedRoles": [],
"translations": {}
},
{
"name": "To validate",
"label": "To validate",
"transitionQuestion": null,
"transitions": [
{
"name": "Accept",
"label": "Accept",
"targetStateName": "Resolved",
"allowedRoles": [
"Validator"
]
},
{
"name": "Reject",
"label": "Reject",
"targetStateName": "New",
"allowedRoles": [
"Validator"
]
}
],
"allowedRoles": [],
"translations": {}
},
{
"name": "Resolved",
"label": "Resolved",
"transitionQuestion": null,
"transitions": [],
"allowedRoles": [
"Validator"
],
"translations": {}
}
]
}
}
キャンペーンを編集する場合は、この応答の最初のid値を書き留めておきます。