File Library Example
Knowledge Library Example
Next Steps
Export Agentforce Session Tracing Data
After the data library is ready, you can perform other operations. For more information, see the ADL Resource Reference in the Connect REST API Developer Guide.
1curl -s "$ORG_URL/services/data/v66.0/einstein/data-libraries" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" | jq '.'1curl -s "$ORG_URL/services/data/v66.0/einstein/data-libraries?sourceType=SFDRIVE" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" | jq '.'1curl -s "$ORG_URL/services/data/v66.0/einstein/data-libraries/$LIBRARY_ID" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" | jq '.'1curl -s "$ORG_URL/services/data/v66.0/einstein/data-libraries/$LIBRARY_ID/files" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" | jq '.'To paginate through the list of files, use the pageSize (default 50, max 200) and offset (default 0) query parameters.
1curl -s "$ORG_URL/services/data/v66.0/einstein/data-libraries/$LIBRARY_ID/files?pageSize=2&offset=1" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" | jq '.'You can also filter by file processing status.
1curl -s "$ORG_URL/services/data/v66.0/einstein/data-libraries/$LIBRARY_ID/files?status=INDEXING" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" | jq '.'1curl -s -X PATCH "$ORG_URL/services/data/v66.0/einstein/data-libraries/$LIBRARY_ID" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "masterLabel": "Updated Library Name",
6 "description": "Updated description"
7 }' | jq '.'1curl -s -X DELETE "$ORG_URL/services/data/v66.0/einstein/data-libraries/$LIBRARY_ID" \
2 -H "Authorization: Bearer $ACCESS_TOKEN" \
3 -w "\nHTTP Status: %{http_code}\n"