{
  "openapi" : "3.0.1",
  "info" : {
    "title" : "HeadlessUserNotification",
    "description" : "Headless User Notification REST API. A Java client JAR is available for use with the group ID 'com.liferay', artifact ID 'com.liferay.headless.user.notification.client', and version '1.0.22'.",
    "license" : {
      "name" : "Apache 2.0",
      "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version" : "v1.0"
  },
  "servers" : [ {
    "url" : "https://liferay.dev/o/headless-user-notification/"
  } ],
  "paths" : {
    "/v1.0/openapi.{type}" : {
      "get" : {
        "operationId" : "getOpenAPI",
        "parameters" : [ {
          "name" : "type",
          "in" : "path",
          "required" : true,
          "schema" : {
            "pattern" : "json|yaml",
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : { },
              "application/yaml" : { }
            }
          }
        }
      }
    },
    "/v1.0/my-user-notifications" : {
      "get" : {
        "tags" : [ "UserNotification" ],
        "description" : "Retrieves the current user's notifications. Results can be paginated, filtered, searched and sorted.",
        "operationId" : "getMyUserNotificationsPage",
        "parameters" : [ {
          "name" : "fields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "filter",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "x-filterable" : [ "dateCreated", "id", "read" ]
          }
        }, {
          "name" : "page",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "pageSize",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "restrictFields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "search",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sort",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PageUserNotification"
                }
              },
              "application/xml" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PageUserNotification"
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/user-accounts/{userAccountId}/user-notifications" : {
      "get" : {
        "tags" : [ "UserNotification" ],
        "description" : "Retrieves the user account's notifications. Results can be paginated, filtered, searched and sorted.",
        "operationId" : "getUserAccountUserNotificationsPage",
        "parameters" : [ {
          "name" : "userAccountId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "fields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "filter",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "x-filterable" : [ "dateCreated", "id", "read" ]
          }
        }, {
          "name" : "page",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "pageSize",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "restrictFields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "search",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sort",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PageUserNotification"
                }
              },
              "application/xml" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PageUserNotification"
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/user-notifications/{userNotificationId}" : {
      "get" : {
        "tags" : [ "UserNotification" ],
        "description" : "Retrieves the user notification.",
        "operationId" : "getUserNotification",
        "parameters" : [ {
          "name" : "userNotificationId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "fields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "restrictFields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UserNotification"
                }
              },
              "application/xml" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UserNotification"
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/user-notifications/{userNotificationId}/read" : {
      "put" : {
        "tags" : [ "UserNotification" ],
        "description" : "Mark the user notification as read.",
        "operationId" : "putUserNotificationRead",
        "parameters" : [ {
          "name" : "userNotificationId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "fields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "restrictFields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : { },
              "application/xml" : { }
            }
          }
        }
      }
    },
    "/v1.0/user-notifications/{userNotificationId}/unread" : {
      "put" : {
        "tags" : [ "UserNotification" ],
        "description" : "Mark the user notification as unread.",
        "operationId" : "putUserNotificationUnread",
        "parameters" : [ {
          "name" : "userNotificationId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "fields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "restrictFields",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : { },
              "application/xml" : { }
            }
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "Facet" : {
        "type" : "object",
        "properties" : {
          "facetCriteria" : {
            "type" : "string"
          },
          "facetValues" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/FacetValue"
            }
          }
        },
        "x-filterable" : [ ]
      },
      "FacetValue" : {
        "type" : "object",
        "properties" : {
          "numberOfOccurrences" : {
            "type" : "integer",
            "format" : "int32"
          },
          "term" : {
            "type" : "string"
          }
        },
        "x-filterable" : [ ]
      },
      "PageUserNotification" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/UserNotification"
            }
          },
          "totalCount" : {
            "type" : "integer",
            "format" : "int64"
          },
          "lastPage" : {
            "type" : "integer",
            "format" : "int64"
          },
          "facets" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Facet"
            }
          },
          "page" : {
            "type" : "integer",
            "format" : "int64"
          },
          "pageSize" : {
            "type" : "integer",
            "format" : "int64"
          },
          "actions" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "string"
              }
            }
          }
        },
        "x-filterable" : [ ]
      },
      "UserNotification" : {
        "type" : "object",
        "properties" : {
          "actions" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "string",
                "description" : "Block of actions allowed by the user making the request."
              },
              "description" : "Block of actions allowed by the user making the request."
            },
            "description" : "Block of actions allowed by the user making the request.",
            "readOnly" : true
          },
          "dateCreated" : {
            "type" : "string",
            "description" : "The user notification's creation date.",
            "format" : "date-time",
            "readOnly" : true
          },
          "id" : {
            "type" : "integer",
            "description" : "The user notification's identifier.",
            "format" : "int64",
            "readOnly" : true
          },
          "message" : {
            "type" : "string",
            "description" : "The user notification's message."
          },
          "read" : {
            "type" : "boolean",
            "description" : "A flag that indicates whether this user notification has been read.",
            "readOnly" : true
          },
          "type" : {
            "type" : "integer",
            "description" : "User notification's type.",
            "format" : "int32",
            "readOnly" : true
          },
          "x-class-name" : {
            "type" : "string",
            "readOnly" : true,
            "default" : "com.liferay.headless.user.notification.dto.v1_0.UserNotification"
          }
        },
        "xml" : {
          "name" : "UserNotification"
        },
        "x-filterable" : [ "dateCreated", "id", "read" ]
      }
    }
  }
}