Skip to main content

Plan

Definition

Plan Type
plan.json
{
"id": 0,
"planTypeID": 0,
"userID": 0,
"bucketID": 0,
"planName": "",
"planDescription": "",
"status": 0,
"planUserID": 0,
"trackUserID": 0,
"startAt": "",
"endAt": "",
"createdAt": "",
"updatedAt": "",
}

Get Plans

curl -X GET "https://${baseUrl}/plan/?\$filter=&\$orderBy=&\$page=1&\$pageSize=10" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Plan

curl -X GET "https://${baseUrl}/plan/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Plan.ID

curl -X POST "https://${baseUrl}/apply/plan/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Plan

curl -X POST "https://${baseUrl}/plan/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @plan.json
info
plan.json
{
"planTypeID": 0,
"userID": 0,
"bucketID": 0,
"planName": "",
"planDescription": "",
"status": 0,
"planUserID": 0,
"trackUserID": 0,
"startAt": "",
"endAt": "",
}
tip

success status: 201

Update Plan

curl -X PUT "https://${baseUrl}/plan/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @plan.json
info
plan.json
{
"planTypeID": 0,
"userID": 0,
"bucketID": 0,
"planName": "",
"planDescription": "",
"status": 0,
"planUserID": 0,
"trackUserID": 0,
"startAt": "",
"endAt": "",
}

Update Plan Partial

curl -X PATCH "https://${baseUrl}/plan/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: planTypeID,userID,bucketID,planName,planDescription,status,planUserID,trackUserID,startAt,endAt" \
-d @plan.json
info
plan.json
{
"planTypeID": 0,
"userID": 0,
"bucketID": 0,
"planName": "",
"planDescription": "",
"status": 0,
"planUserID": 0,
"trackUserID": 0,
"startAt": "",
"endAt": "",
}

Update Plan Status

curl -X PATCH "https://${baseUrl}/plan/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @plan.json
info
plan.json
{
"status": 0
}

Destroy Plan

curl -X DELETE "https://${baseUrl}/plan/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"