[PR #1449] [MERGED] Add API endpoint for updating pin status #3683

Closed
opened 2026-02-22 18:34:17 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/1449
Author: @yond1994
Created: 5/18/2024
Status: Merged
Merged: 5/19/2024
Merged by: @timothycarambat

Base: masterHead: master


📝 Commits (1)

  • b5016ee Add API endpoint for updating pin status

📊 Changes

2 files changed (+134 additions, -0 deletions)

View changed files

📝 server/endpoints/api/workspace/index.js (+67 -0)
📝 server/swagger/openapi.json (+67 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #1051

What is in this change?

This pull request introduces a new API endpoint to update the pin status of a document within a workspace.

Key Changes:

  1. New Endpoint:

    • Path: /workspace/:slug/update-pin
    • Method: POST
    • Description: Allows users to add or remove the pin status of a specified document in a workspace.
  2. Endpoint Details:

    • Parameters:
      • slug: Unique identifier of the workspace (in path).
      • Authorization: Token (in header).
    • Request Body:
      {
        "docPath": "custom-documents/my-pdf.pdf-hash.json",
        "pinStatus": true
      }
      
    • Responses:
      • 200 OK: Pin status updated successfully.
      • 404 Not Found: Document not found.
      • 500 Internal Server Error: Internal server error.
  3. Documentation:

    • Added the new endpoint to openapi.json for easy reference in Swagger UI at http://localhost:3001/api-docs.

    These changes enhance document management by allowing users to efficiently update pin statuses via the API.


Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/1449 **Author:** [@yond1994](https://github.com/yond1994) **Created:** 5/18/2024 **Status:** ✅ Merged **Merged:** 5/19/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`b5016ee`](https://github.com/Mintplex-Labs/anything-llm/commit/b5016ee06d4d8cb5024365642711c93716403496) Add API endpoint for updating pin status ### 📊 Changes **2 files changed** (+134 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/endpoints/api/workspace/index.js` (+67 -0) 📝 `server/swagger/openapi.json` (+67 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues resolves #1051 ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> <!-- Add any other context about the Pull Request here that was not captured above. --> This pull request introduces a new API endpoint to update the pin status of a document within a workspace. #### Key Changes: 1. **New Endpoint**: - **Path**: `/workspace/:slug/update-pin` - **Method**: `POST` - **Description**: Allows users to add or remove the pin status of a specified document in a workspace. 2. **Endpoint Details**: - **Parameters**: - `slug`: Unique identifier of the workspace (in path). - `Authorization`: Token (in header). - **Request Body**: ```json { "docPath": "custom-documents/my-pdf.pdf-hash.json", "pinStatus": true } ``` - **Responses**: - `200 OK`: Pin status updated successfully. - `404 Not Found`: Document not found. - `500 Internal Server Error`: Internal server error. 3. **Documentation**: - Added the new endpoint to `openapi.json` for easy reference in Swagger UI at `http://localhost:3001/api-docs`. These changes enhance document management by allowing users to efficiently update pin statuses via the API. --- ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:17 -05:00
yindo closed this issue 2026-02-22 18:34:17 -05:00
yindo changed title from [PR #1449] Add API endpoint for updating pin status to [PR #1449] [MERGED] Add API endpoint for updating pin status 2026-06-05 15:14:41 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3683