@sinequa/atomic

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.

POST api/v1/queryResult & ResultPages
query.search(query, audit?, intent?)free: fetchQuery

The declared type is Result; the pagination fields need a cast.

POST api/v1/multiResult[]
query.bulk(queries, mode?, audit?)free: fetchBulkQuery

Positional: result i answers query i.

POST api/v1/queryAggregation
query.aggregate(agg, query, audit?, count?)free: fetchAggregation

action: "aggregate" — the response is an AggregateResult, not a Result.

POST api/v1/queryintentQueryIntentMatch[]
query.intent(query)free: fetchQueryIntent
POST api/v1/search.suggestSuggestion[]
suggest.get(name, text, filter?, kinds?, showSource?)free: fetchSuggest
POST api/v1/suggestfieldSuggestion[]
suggest.field(text, fields, query?)free: fetchSuggestField
POST api/v1/search.dataset/{ws}/{name}Result
dataset.get(ws, name, params?)free: fetchDataset

Throws on a dataset error envelope.

POST api/v1/search.dataset/{ws}DataSet<Result>
dataset.getMany(ws, { datasets?, parameters? })free: fetchDatasets

Does not throw: a failed dataset arrives as a DatasetError entry.

GET api/v1/search.dataset/{ws}DatasetDescription[]
dataset.list(ws)free: fetchDatasetList
POST api/v1/search.queryexportResponse
query.export({ model, appName, query, article? })free: fetchQueryExport

Raw response: the body is a file.

Documents

POST api/v1/previewPreviewData
preview.get(id, query)free: fetchPreview
POST api/v1/doc.textchunks{ chunks: TextChunk[] }
preview.textChunks(id, locations, highlights, query, left, right)free: fetchTextChunks
POST api/v1/similardocumentsArticle[]
query.similarDocuments(id, queryName, signal?)free: fetchSimilarDocuments

Takes an AbortSignal directly.

POST api/v1/query.linksLinkResult[]
query.sponsoredLinks(webservice, query)free: fetchSponsoredLinks
POST api/v1/labelsstring[] | void
labels.get · add · remove · rename · delete · bulkAdd · bulkRemovefree: fetchLabels, labels.*

publicOnly defaults to true on every one of them.

GET api/v1/labels?action=getUserRightsLabelsRights
labels.rights()free: labels.getUserRights

Application configuration

GET api/v1/appCCApp
app.get(appName?)free: fetchApp

Large, and changes rarely: fetch once at start-up.

GET api/v1/app?preLogin=trueCCAppPreLogin
app.preLogin()free: fetchAppPreLogin
GET api/v1/app?preLogin=trueCCAppPreLogin
client.initializeConfig()free: initializeAppConfig

Also derives backendUrl and app, and settles the auth mode.

GET api/v2/versionVersionResponse
version()free: fetchVersion

Identity

GET api/v1/principal?action=getPrincipal
principal.get(options?)free: fetchPrincipal

Accepts RequestOptions — the one typed call that does.

GET api/v1/principal/listPrincipal[]
principal.list({ search?, isuser?, isgroup? })free: fetchPrincipalList
GET api/v1/principal?action=useridPrincipal
principal.userid(id)free: fetchPrincipalUserid
GET api/v1/principal/useridsPrincipal[]
principal.userids(ids)free: fetchPrincipalUserids
POST api/v1/security.principalSecurityPrincipalSearchResponse
principal.search({ offset, limit, search }, signal?)free: searchPrincipals

Paginated and cancellable — the one for a people picker.

POST api/v1/security.principal (userids)SecurityPrincipal[]
principal.byIds(userIds)free: fetchPrincipalsByIds

Resolves `domain|id` identities to names. Empty input skips the request; unknown ids are absent.

User data

GET api/v1/usersettings?action=loadT
userSettings.get()free: fetchUserSettings
POST api/v1/usersettings (save)void
userSettings.save(settings, audit?)free: saveUserSettings

Replaces the whole object. Prefer patch.

POST api/v1/usersettings (patch)T
userSettings.patch(partial, audit?)free: patchUserSettings

Merges, and returns the merged state.

POST api/v1/usersettings (save {})void
userSettings.reset()free: deleteUserSettings
GET api/v2/user-profile/{id}UserProfile
userProfile.get(userId)free: fetchUserProfile
POST api/v2/user-profileUserProfile
userProfile.create(profile)free: createUserProfile
PATCH api/v2/user-profile/{id}/{cat}/{prop}UserProfile
userProfile.patch(profile, category, property)free: patchUserProfile

The URL is built from profile.data.id — it must be present.

DELETE api/v2/user-profile/{id}/{cat}/{prop}boolean
userProfile.deleteProperty(profile, category, property)free: deleteUserProfileProperty
POST 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/containerContainerListResponse
containers.list({ page?, pageSize? })free: listContainers
GET .../container/{id}Container
containers.get(id)free: getContainer
POST .../containerContainer
containers.create(input)free: createContainer
PUT .../container/{id}Container
containers.update(id, patch)free: updateContainer

409 while indexing. Replaces owners and readers wholesale.

DELETE .../containersDeleteContainersResult
containers.delete(ids)free: deleteContainers

Bulk only, and reports per id. Does not throw on partial failure.

GET .../container/{id}/documentsContainerDocumentListResponse
containers.listDocuments(id, { page?, pageSize? })free: listContainerDocuments
POST .../container/{id}/documentsContainerDocument[]
containers.addDocuments(id, documents)free: addContainerDocuments

Attaches existing documents, no file transfer. Provisional contract.

DELETE .../container/{id}/documentsvoid
containers.deleteDocuments(id, fileIds)free: deleteContainerDocuments

409 while indexing.

GET api/v2/document-upload/statusUploadStatusResponse
containers.uploadStatus({ containerId?, initiatedBy?, skip?, take? }, options?)free: fetchUploadStatus

Reports 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 | null
client.auth.login(credentials?)free: requestWebTokenSession

Returns the CSRF token; the JWT goes into an HTTP-only cookie.

GET api/v1/challenge?action=getCsrfTokenstring | null
client.auth.hasSession()free: getCsrfToken

suppressErrors: a 200 with no token means no session.

GET api/v1/principal (the probe)boolean
—free: tryAutoAuthentication

The ambient SSO handshake. Never throws.

POST api/v1/security.oauth · .saml{ redirectUrl }
—free: tryOAuthAuthentication · trySAMLAuthentication

Navigates away in a browser.

GET api/v1/challenge?action=deleteWebTokenCookiestring | undefined
client.auth.logout()free: logout

Returns the server's logoutUrl when it gave one.

POST api/v2/security/password/changeChangePasswordResponse
password.change(next, current?)free: fetchChangePassword

Check success — a resolved promise is not success.

POST api/v2/security/password/ask-reset-emailPasswordResetEmailResponse
password.sendResetEmail(userName)free: fetchSendPasswordResetEmail

Second 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.

What's next

On this page