Skip to main content

Decide a category suggestion

POST/api/category-suggestions/{suggestionId}/decision
Administrator

Read more: CategoriesSource: CategoryApiController#decide(opens in new tab)

Path parameters​

NameTypeRequiredNotes
suggestionIdstring (uuid)Required

Request body​

application/json

FieldTypeRequiredNotes
decisionenum CategorySuggestionStatusRequiredPENDING_REVIEWAPPROVEDMAPPEDREJECTED
categoryIdstring (uuid)Optional

Response​

Success: 200

FieldTypeRequiredNotes
idstring (uuid)Optional
projectIdstring (uuid)Optional
changeIdstring (uuid)Optional
proposedCodestringOptional
proposedNamestringOptional
proposedGroupenum CategoryGroupOptionalFEATUREFIXPERFORMANCEDOCUMENTATIONMAINTENANCEOTHER
rationalestringOptional
statusenum CategorySuggestionStatusOptionalPENDING_REVIEWAPPROVEDMAPPEDREJECTED
resolvedCodestringOptional
deciderNamestringOptional
createdAtstring (date-time)Optional
decidedAtstring (date-time)Optional

Errors​

StatusCodeApplies to
400validation_faileda field is missing or out of rangeAny endpoint
400malformed_requestthe body cannot be readAny endpoint
400invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUIDAny endpoint
401authentication_requiredno sessionAny endpoint
403access_deniedan administrator endpoint, or a missing or stale CSRF tokenAny endpoint
404not_foundno such addressAny endpoint
405method_not_allowedthe address does not take that methodAny endpoint
415unsupported_media_typethe address does not read a body of that typeAny endpoint
500internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind itAny endpoint
400invalid_change_filterChanges area
400invalid_change_reviewChanges area
400invalid_sensitive_pathsChanges area
404change_not_foundChanges area
404duplicate_candidate_not_foundChanges area
409change_processingChanges area
409change_not_eligible_for_aiChanges area
409duplicate_candidate_decidedChanges area
409change_excludedChanges area
409change_in_releaseChanges area
502ai_classification_failedChanges area
503ai_classification_unavailableChanges area
404category_not_foundCategories area
404category_suggestion_not_foundCategories area
409category_code_takenCategories area
409category_systemCategories area
409category_suggestion_decidedCategories area

Request

bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X POST "http://localhost:8080/api/category-suggestions/$SUGGESTION_ID/decision" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"decision": "PENDING_REVIEW",
"categoryId": "<uuid>"
}'

The request body is an example built from the schema; replace every placeholder.

Response

200

Example

{
  "id": "<uuid>",
  "projectId": "<uuid>",
  "changeId": "<uuid>",
  "proposedCode": "<string>",
  "proposedName": "<string>",
  "proposedGroup": "FEATURE",
  "rationale": "<string>",
  "status": "PENDING_REVIEW",
  "resolvedCode": "<string>",
  "deciderName": "<string>",
  "createdAt": "<date-time>",
  "decidedAt": "<date-time>"
}