Newer Version Available
Get, Update, or Delete a Library
Resource
1/einstein/data-libraries/libraryIdThe libraryId is the 18 character library ID that has a prefix of 1JD.
HTTP Methods
GET, PATCH, DELETE
GET
Returns full details for one library: source type, dataspace scope, and groundingSource with type-specific details.
- Request body
-
None.
- Response body
-
HTTP 200 — LibraryOutputRepresentation
HTTP 404—Library not found.
PATCH
Updates an existing AI Grounding Library with PATCH semantics.
You can update SFDRIVE libraries only with this endpoint. Attempting to update a KNOWLEDGE or RETRIEVER library returns 400.
- masterLabel / description: update library metadata (no re-provisioning).
Returns updated library details with the same response shape as GET.
- Request body
-
Required. UpdateLibraryInputRepresentation
Property Type Description Available Version masterLabel string Updated master label (max 80). 66.0 description string Updated description (max 255). 66.0 groundingSource object GroundingSourceInputRepresentation. 66.0 - Response body
-
HTTP 200 — LibraryOutputRepresentation
HTTP 400—Invalid request.
HTTP 404—Library not found.
DELETE
Deletes the library and associated entities (cascade): FileRefs, KnowledgeConfig, LibSrcRel, SourceStages, GroundingSource, Retriever, SearchIndex.
You can’t delete if the library is in use by an agent (400).
- Request body
-
None.
- Response body
-
HTTP 204—Library deleted; no content body.
HTTP 400—Library can’t be deleted because it is in use by agents.
HTTP 404—Library not found.