Documents

Document Solution Data Source Remove

DELETE
/documents/solution/{documentSolutionId}/datasource/{dataSourceId}/remove

Detaches an existing data source from a document solution. Both already exist — this only changes the link between them, and detaching leaves the data source itself untouched.

Unlike supplying ids when creating a solution, which skips anything it cannot find, this operation is strict: if either the solution or the data source does not exist on this subscription, the request fails with a 404 and nothing changes. That 404 carries no body, so it does not distinguish a missing solution from a missing data source — check both ids.

Authorization

AuthorizationBearer <token>

JWT token to authenticate the request.

In: header

X-Api-Key<token>

API key, sent as a request header.

In: header

Path Parameters

documentSolutionId*string

Id of the document solution, as returned by documents-solution-create in result.data.documentSolution.id.

Formatuuid
dataSourceId*string

Id of the data source, as returned by documents-data-source-create.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/documents/solution/d290f1ee-6c54-4b01-90e6-d701748f0851/datasource/3f2504e0-4f89-41d3-9a0c-0305e82c3301/remove"
{  "result": {    "statusCode": 200,    "message": "OK",    "data": {      "documentSolutionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",      "dataSourceId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",      "message": "DATA_SOURCE_REMOVED_FROM_SOLUTION"    }  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/datasource/{dataSourceId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}
{  "error": {    "statusCode": 401,    "message": "The request could not be authenticated.",    "innerErrors": [      {        "code": "UNAUTHORIZED",        "message": "The request could not be authenticated.",        "userMessage": "Your session has expired or is invalid. Please sign in again."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/datasource/{dataSourceId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}
{  "error": {    "statusCode": 403,    "message": "The caller is not authorized to perform this operation.",    "innerErrors": [      {        "code": "AUTHORIZATION_ERROR",        "message": "The caller is not authorized to perform this operation.",        "userMessage": "You do not have permission to do this. Contact your administrator."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/datasource/{dataSourceId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}
Empty
{  "error": {    "statusCode": 500,    "message": "The link could not be changed.",    "innerErrors": [      {        "code": "REMOVE_DATA_SOURCE_FROM_SOLUTION_ERROR",        "message": "The link could not be changed.",        "userMessage": "Something went wrong. Please try again or contact support."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/datasource/{dataSourceId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}