RWTH Aachen University UserNotificationOptOut API

Endpoints for the user notification opt outs.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

rwth-aachen-university-usernotificationoptout-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Coscine Web Admin UserNotificationOptOut API
  description: Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project.
  termsOfService: https://about.coscine.de/en/termsofuse/
  contact:
    name: Coscine Team
    email: servicedesk@rwth-aachen.de
  version: '2.0'
servers:
- url: https://coscine.rwth-aachen.de/coscine
security:
- Bearer: []
tags:
- name: UserNotificationOptOut
  description: Endpoints for the user notification opt outs.
paths:
  /api/v2/user-notifications/{notificationId}:
    get:
      tags:
      - UserNotificationOptOut
      summary: Retrieves a user notification opt out for a specified notification.
      operationId: GetUserNotification
      parameters:
      - name: notificationId
        in: path
        description: The Id of the notification.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns the user notification opt out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserNotificationOptOutDtoResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/UserNotificationOptOutDtoResponse'
        '404':
          description: User notification does not exist.
  /api/v2/user-notifications:
    get:
      tags:
      - UserNotificationOptOut
      summary: Retrieves all user notification opt outs of the current user.
      operationId: GetUserNotifications
      parameters:
      - name: PageNumber
        in: query
        description: Gets or sets the desired page number. Should be greater than or equal to 1. Default is 1.
        schema:
          type: integer
          format: int32
      - name: PageSize
        in: query
        description: Gets or sets the desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10.
        schema:
          type: integer
          format: int32
      - name: OrderBy
        in: query
        description: "Gets or sets the field name used for ordering the results.\r\nThe order is constructed by an order string.\r\nUse the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc.\r\nCan be used like this: \"propertyA asc, propertyB desc\"."
        schema:
          type: string
      responses:
        '200':
          description: Returns the user notification opt outs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserNotificationOptOutDtoPagedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/UserNotificationOptOutDtoPagedResponse'
        '403':
          description: User is missing authorization requirements.
    post:
      tags:
      - UserNotificationOptOut
      summary: Creates a user notification opt out for a specified user.
      operationId: CreateUserNotification
      requestBody:
        description: The user notification opt out data for creation.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserNotificationForCreationDto'
          text/json:
            schema:
              $ref: '#/components/schemas/UserNotificationForCreationDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UserNotificationForCreationDto'
      responses:
        '201':
          description: User notification opt out created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserNotificationOptOutDtoResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/UserNotificationOptOutDtoResponse'
        '400':
          description: Provided input has a bad format.
        '404':
          description: Provided input refers to entries that do not exist or have been deleted.
    options:
      tags:
      - UserNotificationOptOut
      summary: Responds with the HTTP methods allowed for the endpoint.
      responses:
        '200':
          description: OK
  /api/v2/user-notifications/{id}:
    delete:
      tags:
      - UserNotificationOptOut
      summary: Deletes a user notification opt out for a specified user.
      operationId: DeleteUserNotification
      parameters:
      - name: id
        in: path
        description: The Id of the user notification opt out.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: User notification opt out deleted.
        '403':
          description: User is missing authorization requirements.
        '404':
          description: Provided input refers to entries that do not exist or have been deleted.
components:
  schemas:
    UserNotificationOptOutDtoPagedResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/UserNotificationOptOutDto'
          nullable: true
        isSuccess:
          type: boolean
          readOnly: true
        statusCode:
          type: integer
          format: int32
          nullable: true
        traceId:
          type: string
          nullable: true
        pagination:
          $ref: '#/components/schemas/Pagination'
      additionalProperties: false
    UserNotificationForCreationDto:
      required:
      - notificationId
      type: object
      properties:
        notificationId:
          type: string
          description: The id of the notification.
          format: uuid
      additionalProperties: false
      description: Data transfer object (DTO) representing the creation of a user notification.
    Pagination:
      type: object
      properties:
        currentPage:
          type: integer
          description: Gets or sets the current page number.
          format: int32
        totalPages:
          type: integer
          description: Gets or sets the total number of pages.
          format: int32
        pageSize:
          type: integer
          description: Gets or sets the number of items per page.
          format: int32
        totalCount:
          type: integer
          description: Gets or sets the total count of items across all pages.
          format: int64
        hasPrevious:
          type: boolean
          description: Gets a value indicating whether there is a previous page.
          readOnly: true
        hasNext:
          type: boolean
          description: Gets a value indicating whether there is a next page.
          readOnly: true
      additionalProperties: false
      description: Represents pagination information for a collection of items.
    UserNotificationOptOutDto:
      required:
      - id
      - notificationId
      - userId
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the user notification.
          format: uuid
        userId:
          type: string
          description: Unique identifier of the user.
          format: uuid
        notificationId:
          type: string
          description: Unique identifier of the notification.
          format: uuid
      additionalProperties: false
      description: Represents a minimal data transfer object (DTO) for a user notification.
    UserNotificationOptOutDtoResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UserNotificationOptOutDto'
        isSuccess:
          type: boolean
          readOnly: true
        statusCode:
          type: integer
          format: int32
          nullable: true
        traceId:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: JWT Authorization header using the Bearer scheme.
      name: Authorization
      in: header