Jobs
ジョブのステータス値: scheduled、running、completed、failed、cancelled。
すべてのジョブの一覧
Section titled すべてのジョブの一覧完了済みおよびキャンセル済みのものを含め、プロジェクトのすべてのジョブを取得します。ページネーションに対応しています。
GET
/public/:projectKey/jobs
クエリパラメーター
Section titled クエリパラメーター| 名前 | 型 | 説明 |
|---|---|---|
| limit | integer | ページサイズ、1〜200(デフォルト: 50)。範囲外の値は 50 になります。 |
| page | integer | ページ番号、1 から開始(デフォルト: 1)。1 未満の値は 1 になります。 |
リクエストヘッダー
Section titled リクエストヘッダーAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
リクエスト例
Section titled リクエスト例curl -X GET \
'{BASE_URL}/public/3sWXSsqHgSKnE87YkNJK/jobs?limit=50&page=1' \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}'
レスポンス例
Section titled レスポンス例{
"data": [
{
"jobId": 3451,
"description": "Delete user sessions of userId = shekar@example.com",
"status": "scheduled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "shekar@example.com",
"createdAt": 1623912955277,
"updatedAt": null,
"startAt": 1623954600000,
"errors": null
},
{
"jobId": 3452,
"description": "Delete user sessions of userId = mehdi@example.com",
"status": "cancelled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "mehdi@example.com",
"createdAt": 1623912962910,
"updatedAt": 1623913015276,
"startAt": 1623954600000,
"errors": null
}
]
}
ジョブの詳細の取得
Section titled ジョブの詳細の取得ジョブのステータスとメタデータを返します。
GET
/public/:projectKey/jobs/:jobId
パラメーター
Section titled パラメーター| 名前 | 型 | 説明 |
|---|---|---|
| jobId | integer | ジョブ ID(必須) |
リクエストヘッダー
Section titled リクエストヘッダーAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
ステータスコード
Section titled ステータスコード200: レスポンスは JSON としてボディで送信されます
400: 無効な jobId(整数ではありません)
404: ジョブが見つかりません
リクエスト例
Section titled リクエスト例curl -X GET \
{BASE_URL}/public/3sWXSsqHgSKnE87YkNJK/jobs/3451 \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}'
レスポンス例
Section titled レスポンス例{
"data": {
"jobId": 3451,
"description": "Delete user sessions of userId = shekar@example.com",
"status": "scheduled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "shekar@example.com",
"createdAt": 1623912955277,
"updatedAt": null,
"startAt": 1623954600000,
"errors": null
}
}
ジョブのキャンセル
Section titled ジョブのキャンセル開始されていない、またはまだ実行中のジョブをキャンセルします。
DELETE
/public/:projectKey/jobs/:jobId
パラメーター
Section titled パラメーター| 名前 | 型 | 説明 |
|---|---|---|
| jobId | integer | ジョブ ID(必須) |
リクエストヘッダー
Section titled リクエストヘッダーAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
ステータスコード
Section titled ステータスコード200: ジョブがキャンセルされました
400: ジョブが現在の状態ではキャンセルできない、または無効な jobId
404: ジョブが見つかりません
リクエスト例
Section titled リクエスト例curl -X DELETE \
{BASE_URL}/public/3sWXSsqHgSKnE87YkNJK/jobs/3452 \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}'
レスポンス例
Section titled レスポンス例{
"data": {
"jobId": 3452,
"description": "Delete user sessions of userId = mehdi@example.com",
"status": "cancelled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "mehdi@example.com",
"createdAt": 1623912962910,
"updatedAt": 1623913015276,
"startAt": 1623954600000,
"errors": null
}
}