Skip to content

Pronouns Management API

M♢NTΛSIM edited this page Aug 17, 2024 · 1 revision

Pronouns Management API Documentation

Create Pronouns

  • POST /
    • Summary: Creates a new set of pronouns, accessible only to users with admin permissions.
    • Security: Bearer Authentication
    • Request Body:
      • Content-Type: application/json
      • Schema:
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the pronouns set."
            }
          }
        }
    • Responses:
      • 201 Created: Pronouns created successfully.
      • 400 Bad Request: Bad request, e.g., missing name or pronouns already exist.
    • Tags:
      • Pronouns Management

Retrieve All Pronouns

  • GET /
    • Summary: Retrieves a list of all pronouns, results can be cached.
    • Responses:
      • 200 OK: A list of pronouns.
    • Tags:
      • Pronouns Management

Delete Multiple Pronouns

  • DELETE /
    • Summary: Deletes a list of pronouns based on their IDs, accessible only to admin users.
    • Security: Bearer Authentication
    • Request Body:
      • Content-Type: application/json
      • Schema:
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of pronouns IDs to delete."
        }
    • Responses:
      • 200 OK: Pronouns deleted successfully.
      • 400 Bad Request: Bad request, e.g., some IDs do not exist.
    • Tags:
      • Pronouns Management

Retrieve Pronouns by ID

  • GET /{id}
    • Summary: Retrieves a single set of pronouns by ID, results can be cached.
    • Parameters:
      • Path Parameter:
        • Name: id
        • Description: The ID of the pronouns to retrieve.
        • Schema:
          {
            "type": "string"
          }
    • Responses:
      • 200 OK: Pronouns retrieved successfully.
      • 404 Not Found: Pronouns not found.
    • Tags:
      • Pronouns Management

Update Pronouns by ID

  • PUT /{id}
    • Summary: Updates an existing set of pronouns by ID, accessible only to admin users.
    • Security: Bearer Authentication
    • Parameters:
      • Path Parameter:
        • Name: id
        • Description: The ID of the pronouns to update.
        • Schema:
          {
            "type": "string"
          }
    • Request Body:
      • Content-Type: application/json
      • Schema:
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The new name for the pronouns set."
            }
          }
        }
    • Responses:
      • 200 OK: Pronouns updated successfully.
      • 404 Not Found: Pronouns not found.
      • 400 Bad Request: Bad request, e.g., duplicate name.
    • Tags:
      • Pronouns Management

Delete Pronouns by ID

  • DELETE /{id}
    • Summary: Deletes a single set of pronouns by ID, accessible only to admin users.
    • Security: Bearer Authentication
    • Parameters:
      • Path Parameter:
        • Name: id
        • Description: The ID of the pronouns to delete.
        • Schema:
          {
            "type": "string"
          }
    • Responses:
      • 200 OK: Pronouns deleted successfully.
      • 404 Not Found: Pronouns not found.
    • Tags:
      • Pronouns Management

Handles Unsupported Methods

  • All Other Methods on / and /{id}
    • Summary: Handles unsupported methods for the respective endpoints.
    • Responses:
      • 405 Method Not Allowed: HTTP method not supported.
    • Tags:
      • Pronouns Management
Clone this wiki locally