[GH-ISSUE #2546] [DOCS]: Inconsistent API Response for /v1/workspace/{slug} Endpoint #1649

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

Originally created by @MrSimonC on GitHub (Oct 28, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2546

Description

I've encountered an inconsistency in the API response for the /v1/workspace/{slug} endpoint. According to the example provided in the swagger documentation, the response should be a single workspace object:

{
  "workspace": {
    "id": 79,
    "name": "My workspace",
    "slug": "my-workspace-123",
    "createdAt": "2023-08-17 00:45:03",
    "openAiTemp": null,
    "lastUpdatedAt": "2023-08-17 00:45:03",
    "openAiHistory": 20,
    "openAiPrompt": null,
    "documents": [],
    "threads": []
  }
}

However, in my testing using the API in C# and AI-powered tools to generate client calling code, I've consistently received an array of (one) workspace as the response, regardless of the slug provided.

Reproduction Steps:

  1. Use the /v1/workspace/{slug} endpoint with a valid slug.
  2. Observe the response.

Expected Behavior:
A single workspace object, as documented.

Actual Behavior:
An array of one workspace.

Environment:

  • Docker 1.2.4
  • Desktop v1.6.8

Additional Information:
I've created a pull request with a proposed fix for this issue. If considered, it can be merged to update the documentation and ensure consistency in the API response.

Please let me know if this meets your requirements or if you need any further changes!

Originally created by @MrSimonC on GitHub (Oct 28, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2546 ### Description I've encountered an inconsistency in the API response for the `/v1/workspace/{slug}` endpoint. According to the example provided in the swagger documentation, the response should be a single workspace object: ```json { "workspace": { "id": 79, "name": "My workspace", "slug": "my-workspace-123", "createdAt": "2023-08-17 00:45:03", "openAiTemp": null, "lastUpdatedAt": "2023-08-17 00:45:03", "openAiHistory": 20, "openAiPrompt": null, "documents": [], "threads": [] } } ``` However, in my testing using the API in C# and AI-powered tools to generate client calling code, I've consistently received an array of (one) workspace as the response, regardless of the slug provided. **Reproduction Steps:** 1. Use the `/v1/workspace/{slug}` endpoint with a valid slug. 2. Observe the response. **Expected Behavior:** A single workspace object, as documented. **Actual Behavior:** An array of one workspace. **Environment:** * Docker 1.2.4 * Desktop v1.6.8 **Additional Information:** I've created a pull request with a proposed fix for this issue. If considered, it can be merged to update the documentation and ensure consistency in the API response. Please let me know if this meets your requirements or if you need any further changes!
yindo added the documentation label 2026-02-22 18:25:53 -05:00
yindo closed this issue 2026-02-22 18:25:53 -05:00
yindo changed title from [DOCS]: Inconsistent API Response for /v1/workspace/{slug} Endpoint to [GH-ISSUE #2546] [DOCS]: Inconsistent API Response for /v1/workspace/{slug} Endpoint 2026-06-05 14:41:56 -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#1649