mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 09:15:39 +03:00
docs: Add base path for API endpoints to Swagger
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/access-tokens/accept-terms:
|
||||
* /access-tokens/accept-terms:
|
||||
* post:
|
||||
* summary: Accept terms and conditions
|
||||
* description: Accept terms during the authentication flow. Converts the pending token to an access token.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/access-tokens:
|
||||
* /access-tokens:
|
||||
* post:
|
||||
* summary: User login
|
||||
* description: Authenticates a user using email/username and password. Returns an access token for API authentication.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/access-tokens:
|
||||
* /access-tokens:
|
||||
* delete:
|
||||
* summary: User logout
|
||||
* description: Logs out the current user by deleting the session and access token. Clears HTTP-only cookies if present.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/access-tokens/exchange-with-oidc:
|
||||
* /access-tokens/exchange-with-oidc:
|
||||
* post:
|
||||
* summary: Exchange OIDC code for access token
|
||||
* description: Exchanges an OIDC authorization code for an access token. Creates a user if they do not exist.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/access-tokens/revoke-pending-token:
|
||||
* /access-tokens/revoke-pending-token:
|
||||
* post:
|
||||
* summary: Revoke pending token
|
||||
* description: Revokes a pending authentication token and cancels the authentication flow.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{boardId}/actions:
|
||||
* /boards/{boardId}/actions:
|
||||
* get:
|
||||
* summary: Get board actions
|
||||
* description: Retrieves a list of actions (activity history) for a specific board, with pagination support.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/actions:
|
||||
* /cards/{cardId}/actions:
|
||||
* get:
|
||||
* summary: Get card actions
|
||||
* description: Retrieves a list of actions (activity history) for a specific card, with pagination support.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/attachments:
|
||||
* /cards/{cardId}/attachments:
|
||||
* post:
|
||||
* summary: Create attachment
|
||||
* description: Creates an attachment on a card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/attachments/{id}:
|
||||
* /attachments/{id}:
|
||||
* delete:
|
||||
* summary: Delete attachment
|
||||
* description: Deletes an attachment. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/attachments/{id}:
|
||||
* /attachments/{id}:
|
||||
* patch:
|
||||
* summary: Update attachment
|
||||
* description: Updates an attachment. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects/{projectId}/background-images:
|
||||
* /projects/{projectId}/background-images:
|
||||
* post:
|
||||
* summary: Upload background image
|
||||
* description: Uploads a background image for a project. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/background-images/{id}:
|
||||
* /background-images/{id}:
|
||||
* delete:
|
||||
* summary: Delete background image
|
||||
* description: Deletes a background image. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects/{projectId}/base-custom-field-groups:
|
||||
* /projects/{projectId}/base-custom-field-groups:
|
||||
* post:
|
||||
* summary: Create base custom field group
|
||||
* description: Creates a base custom field group within a project. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/base-custom-field-groups/{id}:
|
||||
* /base-custom-field-groups/{id}:
|
||||
* delete:
|
||||
* summary: Delete base custom field group
|
||||
* description: Deletes a base custom field group. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/base-custom-field-groups/{id}:
|
||||
* /base-custom-field-groups/{id}:
|
||||
* patch:
|
||||
* summary: Update base custom field group
|
||||
* description: Updates a base custom field group. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{boardId}/memberships:
|
||||
* /boards/{boardId}/memberships:
|
||||
* post:
|
||||
* summary: Add user to board
|
||||
* description: Adds a user to a board. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/board-memberships/{id}:
|
||||
* /board-memberships/{id}:
|
||||
* delete:
|
||||
* summary: Remove user from board
|
||||
* description: Removes a user from a board. Users can remove themselves, or project managers can remove any user.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/board-memberships/{id}:
|
||||
* /board-memberships/{id}:
|
||||
* patch:
|
||||
* summary: Update board membership
|
||||
* description: Updates a board membership. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects/{projectId}/boards:
|
||||
* /projects/{projectId}/boards:
|
||||
* post:
|
||||
* summary: Create board
|
||||
* description: Creates a board within a project. Supports importing from Trello. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{id}:
|
||||
* /boards/{id}:
|
||||
* delete:
|
||||
* summary: Delete board
|
||||
* description: Deletes a board and all its contents (lists, cards, etc.). Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{id}:
|
||||
* /boards/{id}:
|
||||
* get:
|
||||
* summary: Get board details
|
||||
* description: Retrieves comprehensive board information, including lists, cards, and other related data.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{id}:
|
||||
* /boards/{id}:
|
||||
* patch:
|
||||
* summary: Update board
|
||||
* description: Updates a board. Project managers can update all fields, board members can only subscribe/unsubscribe.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/labels:
|
||||
* /cards/{cardId}/labels:
|
||||
* post:
|
||||
* summary: Add label to card
|
||||
* description: Adds a label to a card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/labels/{labelId}:
|
||||
* /cards/{cardId}/labels/{labelId}:
|
||||
* delete:
|
||||
* summary: Remove label from card
|
||||
* description: Removes a label from a card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/memberships:
|
||||
* /cards/{cardId}/memberships:
|
||||
* post:
|
||||
* summary: Add user to card
|
||||
* description: Adds a user to a card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/memberships/{userId}:
|
||||
* /cards/{cardId}/memberships/{userId}:
|
||||
* delete:
|
||||
* summary: Remove user from card
|
||||
* description: Removes a user from a card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{listId}/cards:
|
||||
* /lists/{listId}/cards:
|
||||
* post:
|
||||
* summary: Create card
|
||||
* description: Creates a card within a list. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{id}:
|
||||
* /cards/{id}:
|
||||
* delete:
|
||||
* summary: Delete card
|
||||
* description: Deletes a card and all its contents (tasks, attachments, etc.). Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{id}/duplicate:
|
||||
* /cards/{id}/duplicate:
|
||||
* post:
|
||||
* summary: Duplicate card
|
||||
* description: Creates a duplicate of a card with all its contents (tasks, attachments, etc.). Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{listId}/cards:
|
||||
* /lists/{listId}/cards:
|
||||
* get:
|
||||
* summary: Get cards in list
|
||||
* description: Retrieves cards from an endless list with filtering, search, and pagination support.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{id}/read-notifications:
|
||||
* /cards/{id}/read-notifications:
|
||||
* post:
|
||||
* summary: Mark card notifications as read
|
||||
* description: Marks all notifications for a specific card as read for the current user. Requires access to the card.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{id}:
|
||||
* /cards/{id}:
|
||||
* get:
|
||||
* summary: Get card details
|
||||
* description: Retrieves comprehensive card information, including tasks, attachments, and other related data.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{id}:
|
||||
* /cards/{id}:
|
||||
* patch:
|
||||
* summary: Update card
|
||||
* description: Updates a card. Board editors can update all fields, viewers can only subscribe/unsubscribe.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/comments:
|
||||
* /cards/{cardId}/comments:
|
||||
* post:
|
||||
* summary: Create comment
|
||||
* description: Creates a new comment on a card. Requires board editor permissions or comment permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/comments/{id}:
|
||||
* /comments/{id}:
|
||||
* delete:
|
||||
* summary: Delete comment
|
||||
* description: Deletes a comment. Can be deleted by the comment author (with comment permissions) or project manager.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/comments:
|
||||
* /cards/{cardId}/comments:
|
||||
* get:
|
||||
* summary: Get card comments
|
||||
* description: Retrieves comments for a card with pagination support. Requires access to the card.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/comments/{id}:
|
||||
* /comments/{id}:
|
||||
* patch:
|
||||
* summary: Update comment
|
||||
* description: Updates a comment. Only the author of the comment can update it.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/config:
|
||||
* /config:
|
||||
* get:
|
||||
* summary: Get application configuration
|
||||
* description: Retrieves the application configuration.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{boardId}/custom-field-groups:
|
||||
* /boards/{boardId}/custom-field-groups:
|
||||
* post:
|
||||
* summary: Create custom field group in board
|
||||
* description: Creates a custom field group within a board. Either `baseCustomFieldGroupId` or `name` must be provided. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/custom-field-groups:
|
||||
* /cards/{cardId}/custom-field-groups:
|
||||
* post:
|
||||
* summary: Create custom field group in card
|
||||
* description: Creates a custom field group within a card. Either `baseCustomFieldGroupId` or `name` must be provided. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/custom-field-groups/{id}:
|
||||
* /custom-field-groups/{id}:
|
||||
* delete:
|
||||
* summary: Delete custom field group
|
||||
* description: Deletes a custom field group. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/custom-field-groups/{id}:
|
||||
* /custom-field-groups/{id}:
|
||||
* get:
|
||||
* summary: Get custom field group details
|
||||
* description: Retrieves comprehensive custom field group information, including fields and values. Requires access to the board/card.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/custom-field-groups/{id}:
|
||||
* /custom-field-groups/{id}:
|
||||
* patch:
|
||||
* summary: Update custom field group
|
||||
* description: Updates a custom field group. Supports both board-wide and card-specific groups. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/custom-field-values:
|
||||
* /cards/{cardId}/custom-field-values:
|
||||
* post:
|
||||
* summary: Create or update custom field value
|
||||
* description: Creates or updates a custom field value for a card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/custom-field-groups/{customFieldGroupId}/custom-fields/{customFieldId}/value:
|
||||
* /cards/{cardId}/custom-field-groups/{customFieldGroupId}/custom-fields/{customFieldId}/value:
|
||||
* delete:
|
||||
* summary: Delete custom field value
|
||||
* description: Deletes a custom field value for a specific card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/base-custom-field-groups/{baseCustomFieldGroupId}/custom-fields:
|
||||
* /base-custom-field-groups/{baseCustomFieldGroupId}/custom-fields:
|
||||
* post:
|
||||
* summary: Create custom field in base custom field group
|
||||
* description: Creates a custom field within a base custom field group. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/custom-field-groups/{customFieldGroupId}/custom-fields:
|
||||
* /custom-field-groups/{customFieldGroupId}/custom-fields:
|
||||
* post:
|
||||
* summary: Create custom field in custom field group
|
||||
* description: Creates a custom field within a custom field group. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/custom-fields/{id}:
|
||||
* /custom-fields/{id}:
|
||||
* delete:
|
||||
* summary: Delete custom field
|
||||
* description: Deletes a custom field. Can delete the in base custom field group (requires project manager permissions) or the custom field group (requires board editor permissions).
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/custom-fields/{id}:
|
||||
* /custom-fields/{id}:
|
||||
* patch:
|
||||
* summary: Update custom field
|
||||
* description: Updates a custom field. Can update in the base custom field group (requires project manager permissions) or the custom field group (requires board editor permissions).
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/attachments/{id}/download/thumbnails/{fileName}.{fileExtension}:
|
||||
* /attachments/{id}/download/thumbnails/{fileName}.{fileExtension}:
|
||||
* get:
|
||||
* summary: Download file attachment thumbnail
|
||||
* description: Downloads a thumbnail for a file attachment. Only available for image attachments that have thumbnails generated. Requires access to the card.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/attachments/{id}/download:
|
||||
* /attachments/{id}/download:
|
||||
* get:
|
||||
* summary: Download file attachment
|
||||
* description: Downloads a file attachment. Requires access to the card.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{boardId}/labels:
|
||||
* /boards/{boardId}/labels:
|
||||
* post:
|
||||
* summary: Create label
|
||||
* description: Creates a label within a board. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/labels/{id}:
|
||||
* /labels/{id}:
|
||||
* delete:
|
||||
* summary: Delete label
|
||||
* description: Deletes a label. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/labels/{id}:
|
||||
* /labels/{id}:
|
||||
* patch:
|
||||
* summary: Update label
|
||||
* description: Updates a label. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{id}/clear:
|
||||
* /lists/{id}/clear:
|
||||
* post:
|
||||
* summary: Clear list
|
||||
* description: Deletes all cards from a list. Only works with trash-type lists. Requires project manager or board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{boardId}/lists:
|
||||
* /boards/{boardId}/lists:
|
||||
* post:
|
||||
* summary: Create list
|
||||
* description: Creates a list within a board. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{id}:
|
||||
* /lists/{id}:
|
||||
* delete:
|
||||
* summary: Delete list
|
||||
* description: Deletes a list and moves its cards to a trash list. Can only delete finite lists. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{id}/move-cards:
|
||||
* /lists/{id}/move-cards:
|
||||
* post:
|
||||
* summary: Move cards
|
||||
* description: Moves all cards from a closed list to an archive list. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{id}:
|
||||
* /lists/{id}:
|
||||
* get:
|
||||
* summary: Get list details
|
||||
* description: Retrieves comprehensive list information, including cards, attachments, and other related data. Requires access to the board.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{id}/sort:
|
||||
* /lists/{id}/sort:
|
||||
* post:
|
||||
* summary: Sort cards in list
|
||||
* description: Sorts all cards within a list. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/lists/{id}:
|
||||
* /lists/{id}:
|
||||
* patch:
|
||||
* summary: Update list
|
||||
* description: Updates a list. Can move lists between boards. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/boards/{boardId}/notification-services:
|
||||
* /boards/{boardId}/notification-services:
|
||||
* post:
|
||||
* summary: Create notification service for board
|
||||
* description: Creates a new notification service for a board. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{userId}/notification-services:
|
||||
* /users/{userId}/notification-services:
|
||||
* post:
|
||||
* summary: Create notification service for user
|
||||
* description: Creates a new notification service for a user. Users can only create services for themselves.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/notification-services/{id}:
|
||||
* /notification-services/{id}:
|
||||
* delete:
|
||||
* summary: Delete notification service
|
||||
* description: Deletes a notification service. Users can delete their own services, project managers can delete board services.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/notification-services/{id}/test:
|
||||
* /notification-services/{id}/test:
|
||||
* post:
|
||||
* summary: Test notification service
|
||||
* description: Sends a test notification to verify the notification service is working. Users can test their own services, project managers can test board services.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/notification-services/{id}:
|
||||
* /notification-services/{id}:
|
||||
* patch:
|
||||
* summary: Update notification service
|
||||
* description: Updates a notification service. Users can update their own services, project managers can update board services.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/notifications:
|
||||
* /notifications:
|
||||
* get:
|
||||
* summary: Get user notifications
|
||||
* description: Retrieves all unread notifications for the current user, including creator users.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/notifications/read-all:
|
||||
* /notifications/read-all:
|
||||
* post:
|
||||
* summary: Mark all notifications as read
|
||||
* description: Marks all notifications for the current user as read.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/notifications/{id}:
|
||||
* /notifications/{id}:
|
||||
* get:
|
||||
* summary: Get notification details
|
||||
* description: Retrieves notification, including creator users. Users can only access their own notifications.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/notifications/{id}:
|
||||
* /notifications/{id}:
|
||||
* patch:
|
||||
* summary: Update notification
|
||||
* description: Updates a notification. Users can only update their own notifications.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects/{projectId}/managers:
|
||||
* /projects/{projectId}/managers:
|
||||
* post:
|
||||
* summary: Add project manager
|
||||
* description: Adds a user as a project manager. Requires admin privileges for shared projects or existing project manager permissions. The user must be an admin or project owner.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/project-managers/{id}:
|
||||
* /project-managers/{id}:
|
||||
* delete:
|
||||
* summary: Remove project manager
|
||||
* description: Removes a user from project managers. Requires admin privileges for shared projects or existing project manager permissions. Cannot remove the last project manager.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects:
|
||||
* /projects:
|
||||
* post:
|
||||
* summary: Create project
|
||||
* description: Creates a project. The current user automatically becomes a project manager.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects/{id}:
|
||||
* /projects/{id}:
|
||||
* delete:
|
||||
* summary: Delete project
|
||||
* description: Deletes a project. The project must not have any boards. Requires project manager permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects:
|
||||
* /projects:
|
||||
* get:
|
||||
* summary: Get all accessible projects
|
||||
* description: Retrieves all projects the current user has access to, including managed projects, membership projects, and shared projects (for admins).
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects/{id}:
|
||||
* /projects/{id}:
|
||||
* get:
|
||||
* summary: Get project details
|
||||
* description: Retrieves comprehensive project information, including boards, board memberships, and other related data.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/projects/{id}:
|
||||
* /projects/{id}:
|
||||
* patch:
|
||||
* summary: Update project
|
||||
* description: Updates a project. Accessible fields depend on user permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/cards/{cardId}/task-lists:
|
||||
* /cards/{cardId}/task-lists:
|
||||
* post:
|
||||
* summary: Create task list
|
||||
* description: Creates a task list within a card. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/task-lists/{id}:
|
||||
* /task-lists/{id}:
|
||||
* delete:
|
||||
* summary: Delete task list
|
||||
* description: Deletes a task list and all its tasks. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/task-lists/{id}:
|
||||
* /task-lists/{id}:
|
||||
* get:
|
||||
* summary: Get task list details
|
||||
* description: Retrieves task list information, including tasks. Requires access to the card.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/task-lists/{id}:
|
||||
* /task-lists/{id}:
|
||||
* patch:
|
||||
* summary: Update task list
|
||||
* description: Updates a task list. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/task-lists/{taskListId}/tasks:
|
||||
* /task-lists/{taskListId}/tasks:
|
||||
* post:
|
||||
* summary: Create task
|
||||
* description: Creates a task within a task list. Either `linkedCardId` or `name` must be provided. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/tasks/{id}:
|
||||
* /tasks/{id}:
|
||||
* delete:
|
||||
* summary: Delete task
|
||||
* description: Deletes a task. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/tasks/{id}:
|
||||
* /tasks/{id}:
|
||||
* patch:
|
||||
* summary: Update task
|
||||
* description: Updates a task. Linked card tasks have limited update options. Requires board editor permissions.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/terms:
|
||||
* /terms:
|
||||
* get:
|
||||
* summary: Get terms and conditions
|
||||
* description: Retrieves terms and conditions in the specified language.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users:
|
||||
* /users:
|
||||
* post:
|
||||
* summary: Create user
|
||||
* description: Creates a user account. Requires admin privileges.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}:
|
||||
* /users/{id}:
|
||||
* delete:
|
||||
* summary: Delete user
|
||||
* description: Deletes a user account. Cannot delete the default admin user. Requires admin privileges.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users:
|
||||
* /users:
|
||||
* get:
|
||||
* summary: Get all users
|
||||
* description: Retrieves a list of all users. Requires admin or project owner privileges.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}:
|
||||
* /users/{id}:
|
||||
* get:
|
||||
* summary: Get user details
|
||||
* description: Retrieves a user. Use 'me' as ID to get the current user.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}/avatar:
|
||||
* /users/{id}/avatar:
|
||||
* patch:
|
||||
* summary: Update user avatar
|
||||
* description: Updates a user's avatar image. Users can update their own avatar, admins can update any user's avatar.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}/email:
|
||||
* /users/{id}/email:
|
||||
* patch:
|
||||
* summary: Update user email
|
||||
* description: Updates a user's email address. Users must provide current password when updating their own email. Admins can update any user's email without a password.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}/password:
|
||||
* /users/{id}/password:
|
||||
* patch:
|
||||
* summary: Update user password
|
||||
* description: Updates a user's password. Users must provide a current password when updating their own password. Admins can update any user's password without the current password. Returns a new access token when updating own password.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}/username:
|
||||
* /users/{id}/username:
|
||||
* patch:
|
||||
* summary: Update user username
|
||||
* description: Updates a user's username. Users must provide a current password when updating their own username (unless they are SSO users with `oidcIgnoreUsername` enabled). Admins can update any user's username without the current password.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}:
|
||||
* /users/{id}:
|
||||
* patch:
|
||||
* summary: Update user
|
||||
* description: Updates a user. Users can update their own profile, admins can update any user.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/webhooks:
|
||||
* /webhooks:
|
||||
* post:
|
||||
* summary: Create webhook
|
||||
* description: Creates a webhook. Requires admin privileges.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/webhooks/{id}:
|
||||
* /webhooks/{id}:
|
||||
* delete:
|
||||
* summary: Delete webhook
|
||||
* description: Deletes a webhook. Requires admin privileges.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/webhooks:
|
||||
* /webhooks:
|
||||
* get:
|
||||
* summary: Get all webhooks
|
||||
* description: Retrieves a list of all configured webhooks. Requires admin privileges.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/webhooks/{id}:
|
||||
* /webhooks/{id}:
|
||||
* patch:
|
||||
* summary: Update webhook
|
||||
* description: Updates a webhook. Requires admin privileges.
|
||||
|
||||
@@ -18,6 +18,12 @@ module.exports = {
|
||||
url: 'https://github.com/plankanban/planka/blob/master/LICENSE.md',
|
||||
},
|
||||
},
|
||||
servers: [
|
||||
{
|
||||
url: '/api',
|
||||
description: 'Base path for API endpoints',
|
||||
},
|
||||
],
|
||||
},
|
||||
apis: ['./api/controllers/**/*.js', './api/models/*.js', './api/responses/*.js'],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user