Endpoints
Every Sinequa endpoint the library covers, the client method that reaches it, and the free function behind it.
Each entry is one call, three ways. The REST endpoint and its return type on the first line; below them the client method, which is the form this documentation teaches, and the free function — the same call running on the default client. See The client for when each is appropriate.
Search
POST api/v1/queryResult & ResultPagesquery.search(query, audit?, intent?)free: fetchQueryThe declared type is Result; the pagination fields need a cast.
POST api/v1/multiResult[]query.bulk(queries, mode?, audit?)free: fetchBulkQueryPositional: result i answers query i.
POST api/v1/queryAggregationquery.aggregate(agg, query, audit?, count?)free: fetchAggregationaction: "aggregate" — the response is an AggregateResult, not a Result.
POST api/v1/queryintentQueryIntentMatch[]query.intent(query)free: fetchQueryIntentPOST api/v1/search.suggestSuggestion[]suggest.get(name, text, filter?, kinds?, showSource?)free: fetchSuggestPOST api/v1/suggestfieldSuggestion[]suggest.field(text, fields, query?)free: fetchSuggestFieldPOST api/v1/search.dataset/{ws}/{name}Resultdataset.get(ws, name, params?)free: fetchDatasetThrows on a dataset error envelope.
POST api/v1/search.dataset/{ws}DataSet<Result>dataset.getMany(ws, { datasets?, parameters? })free: fetchDatasetsDoes not throw: a failed dataset arrives as a DatasetError entry.
GET api/v1/search.dataset/{ws}DatasetDescription[]dataset.list(ws)free: fetchDatasetListPOST api/v1/search.queryexportResponsequery.export({ model, appName, query, article? })free: fetchQueryExportRaw response: the body is a file.
Documents
POST api/v1/previewPreviewDatapreview.get(id, query)free: fetchPreviewPOST api/v1/doc.textchunks{ chunks: TextChunk[] }preview.textChunks(id, locations, highlights, query, left, right)free: fetchTextChunksPOST api/v1/similardocumentsArticle[]query.similarDocuments(id, queryName, signal?)free: fetchSimilarDocumentsTakes an AbortSignal directly.
POST api/v1/query.linksLinkResult[]query.sponsoredLinks(webservice, query)free: fetchSponsoredLinksPOST api/v1/labelsstring[] | voidlabels.get · add · remove · rename · delete · bulkAdd · bulkRemovefree: fetchLabels, labels.*publicOnly defaults to true on every one of them.
GET api/v1/labels?action=getUserRightsLabelsRightslabels.rights()free: labels.getUserRightsApplication configuration
GET api/v1/appCCAppapp.get(appName?)free: fetchAppLarge, and changes rarely: fetch once at start-up.
GET api/v1/app?preLogin=trueCCAppPreLoginapp.preLogin()free: fetchAppPreLoginGET api/v1/app?preLogin=trueCCAppPreLoginclient.initializeConfig()free: initializeAppConfigAlso derives backendUrl and app, and settles the auth mode.
GET api/v2/versionVersionResponseversion()free: fetchVersionIdentity
GET api/v1/principal?action=getPrincipalprincipal.get(options?)free: fetchPrincipalAccepts RequestOptions — the one typed call that does.
GET api/v1/principal/listPrincipal[]principal.list({ search?, isuser?, isgroup? })free: fetchPrincipalListGET api/v1/principal?action=useridPrincipalprincipal.userid(id)free: fetchPrincipalUseridGET api/v1/principal/useridsPrincipal[]principal.userids(ids)free: fetchPrincipalUseridsPOST api/v1/security.principalSecurityPrincipalSearchResponseprincipal.search({ offset, limit, search }, signal?)free: searchPrincipalsPaginated and cancellable — the one for a people picker.
POST api/v1/security.principal (userids)SecurityPrincipal[]principal.byIds(userIds)free: fetchPrincipalsByIdsResolves `domain|id` identities to names. Empty input skips the request; unknown ids are absent.
User data
GET api/v1/usersettings?action=loadTuserSettings.get()free: fetchUserSettingsPOST api/v1/usersettings (save)voiduserSettings.save(settings, audit?)free: saveUserSettingsReplaces the whole object. Prefer patch.
POST api/v1/usersettings (patch)TuserSettings.patch(partial, audit?)free: patchUserSettingsMerges, and returns the merged state.
POST api/v1/usersettings (save {})voiduserSettings.reset()free: deleteUserSettingsGET api/v2/user-profile/{id}UserProfileuserProfile.get(userId)free: fetchUserProfilePOST api/v2/user-profileUserProfileuserProfile.create(profile)free: createUserProfilePATCH api/v2/user-profile/{id}/{cat}/{prop}UserProfileuserProfile.patch(profile, category, property)free: patchUserProfileThe URL is built from profile.data.id — it must be present.
DELETE api/v2/user-profile/{id}/{cat}/{prop}booleanuserProfile.deleteProperty(profile, category, property)free: deleteUserProfilePropertyPOST api/v1/audit.notifyAuditEvents—free: Audit.notify(events, addUrl?)Carries noRecovery: a 401 here is never a session to repair.
Document upload
GET api/v2/document-upload/containerContainerListResponsecontainers.list({ page?, pageSize? })free: listContainersGET .../container/{id}Containercontainers.get(id)free: getContainerPOST .../containerContainercontainers.create(input)free: createContainerPUT .../container/{id}Containercontainers.update(id, patch)free: updateContainer409 while indexing. Replaces owners and readers wholesale.
DELETE .../containersDeleteContainersResultcontainers.delete(ids)free: deleteContainersBulk only, and reports per id. Does not throw on partial failure.
GET .../container/{id}/documentsContainerDocumentListResponsecontainers.listDocuments(id, { page?, pageSize? })free: listContainerDocumentsPOST .../container/{id}/documentsContainerDocument[]containers.addDocuments(id, documents)free: addContainerDocumentsAttaches existing documents, no file transfer. Provisional contract.
DELETE .../container/{id}/documentsvoidcontainers.deleteDocuments(id, fileIds)free: deleteContainerDocuments409 while indexing.
GET api/v2/document-upload/statusUploadStatusResponsecontainers.uploadStatus({ containerId?, initiatedBy?, skip?, take? }, options?)free: fetchUploadStatusReports jobs, never documents. Pass `options.signal` to abandon a poll.
Authentication
These are called for you by login() and logout(). Listed because their behaviour explains the modes.
POST api/v1/security.webtokenstring | nullclient.auth.login(credentials?)free: requestWebTokenSessionReturns the CSRF token; the JWT goes into an HTTP-only cookie.
GET api/v1/challenge?action=getCsrfTokenstring | nullclient.auth.hasSession()free: getCsrfTokensuppressErrors: a 200 with no token means no session.
GET api/v1/principal (the probe)boolean—free: tryAutoAuthenticationThe ambient SSO handshake. Never throws.
POST api/v1/security.oauth · .saml{ redirectUrl }—free: tryOAuthAuthentication · trySAMLAuthenticationNavigates away in a browser.
GET api/v1/challenge?action=deleteWebTokenCookiestring | undefinedclient.auth.logout()free: logoutReturns the server's logoutUrl when it gave one.
POST api/v2/security/password/changeChangePasswordResponsepassword.change(next, current?)free: fetchChangePasswordCheck success — a resolved promise is not success.
POST api/v2/security/password/ask-reset-emailPasswordResetEmailResponsepassword.sendResetEmail(userName)free: fetchSendPasswordResetEmailSecond argument is the redirect URL; required outside a browser.
Anything not listed
Use the HTTP layer: client.http.get, .post, .put, .patch, .del. An
endpoint starting with plugin gets the api/v1/ prefix automatically, and API_ENDPOINTS autocompletes the
known paths while accepting any string.