DocumentationAPI reference

Rust · 0.1.0

Update User Notification

PATCH /api/v1/users/{user}/notifications/{notification}

UserService · UserService_UpdateUserNotification

Protocol-derived reference. Authorization and instance policy still apply. Schema descriptions are inherited from the MIT-licensed application contract; examples here are not executed against a live server.

Access

Owner-only: the user named in the path must be the authenticated caller. Instance administrator status does not allow acting on another account here.

Only status can be changed

Use updateMask=status and status UNREAD or ARCHIVED. Other fields are not writable through this operation. The notification's subject must still be readable; use DeleteUserNotification to remove an owned stale entry instead.

Request

UpdateUserNotification updates a notification.

PATCH/api/v1/users/{user}/notifications/{notification}

Parameters

Name / locationType / requirementDescription
user
path
string
Required
The user id.
notification
path
string
Required
The notification id.
updateMask
query
string (field-mask)
Not marked required in OpenAPI

Request body

Required

application/json · UserNotification

Responses

200 · OK

application/json · UserNotification

default · Default error response

application/json · Status

Complete operation definition

All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.

Open JSON definition
{
  "tags": [
    "UserService"
  ],
  "description": "UpdateUserNotification updates a notification.",
  "operationId": "UserService_UpdateUserNotification",
  "parameters": [
    {
      "name": "user",
      "in": "path",
      "description": "The user id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "notification",
      "in": "path",
      "description": "The notification id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "updateMask",
      "in": "query",
      "schema": {
        "type": "string",
        "format": "field-mask"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/UserNotification"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/UserNotification"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}