Skip to content

Delete Forecast

DELETE /api/forecast/{id}

Required privilege: Forecast / Edit CSRF header required: X-XSRF-TOKEN

Deletes a forecast and all its line items (cascade delete).


Path Parameters

Parameter Type Required Description
id integer Yes Internal forecast identifier

Errors

Status Code Description
400 ForecastList.NotFound No forecast with this ID
400 ForecastList.StillInUse Forecast referenced by other records
403 User.NotPrivileged Insufficient privilege

CSRF=$(grep csrf_access_token cookies.txt | awk '{print $NF}')
curl -b cookies.txt -X DELETE https://acme.knosc.com/api/forecast/77 \
  -H "X-XSRF-TOKEN: $CSRF"