Pinter
ENID
Announcements
Lihat sebagai Markdown

Update Announcement

PATCH/api/content/announcements/{announcement_id}

Overview

Endpoint for update announcement.

Requirements

  • Header: API-Version: 1
  • Authentication: Authorization: Bearer <token> (if protected)

Parameter

Path

announcement_idstringwajib
Unique identifier of the platform announcement notice.

Body permintaan

application/json

titlestring | null
contentstring | null
severityenum | null
starts_atstring (date-time) | null
ends_atstring (date-time) | null
{
  "title": "string",
  "content": "string",
  "severity": "info",
  "starts_at": "2026-01-01T00:00:00Z",
  "ends_at": "2026-01-01T00:00:00Z"
}

Respons

200 Successful Response

idstringwajib
titlestringwajib
contentstringwajib
severityenumwajib
infowarningcritical
statusenumwajib
draftpublished
starts_atstring (date-time) | nullwajib
ends_atstring (date-time) | nullwajib
published_atstring (date-time) | nullwajib
created_bystringwajib
created_by_namestring | nullwajib
updated_bystring | nullwajib
updated_by_namestring | nullwajib
created_atstring (date-time)wajib
updated_atstring (date-time) | nullwajib
{
  "id": "string",
  "title": "string",
  "content": "string",
  "severity": "info",
  "status": "draft",
  "starts_at": "2026-01-01T00:00:00Z",
  "ends_at": "2026-01-01T00:00:00Z",
  "published_at": "2026-01-01T00:00:00Z",
  "created_by": "string",
  "created_by_name": "string",
  "updated_by": "string",
  "updated_by_name": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z"
}

400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

401 Unauthorized - Missing, invalid, or expired JWT Bearer token.

403 Forbidden - Insufficient role permissions or resource access denied by RBAC policy.

404 Not Found - The requested resource ID was not found.

422 Validation Error

detailobject[]
detail[].locstring | integer[]wajib
detail[].msgstringwajib
detail[].typestringwajib
detail[].inputobject
detail[].ctxobject
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Contoh

curl -X PATCH "$PINTER_URL/api/content/announcements/ann_maint_2026_vector_db" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"string","content":"string","severity":"info","starts_at":"2026-01-01T00:00:00Z","ends_at":"2026-01-01T00:00:00Z"}'