Skip to main content
Version: 4.2 (2027 H1)

API

The primedocs Web API lets you query information and trigger document generation. The following interfaces are available:

See Authentication for details on signing in to the API.

Base URL and routing​

All endpoints are versioned and live under the route prefix /api/v3/{datasourceId}/…. In a standard installation the Web API is additionally mounted under the host path /webapi, so the full URL is composed as follows:

https://{instance}/webapi/api/v3/{datasourceId}/…

The {datasourceId} identifies the datasource to address.

Error handling​

Successful calls respond with 2xx. The Web API answers failed calls with a problem document according to RFC 7807 with the media type application/problem+json. This applies to the Admin API, Connect API and Connect Session API, and also to errors that occur before the actual endpoint, for example during authentication or for an unknown datasourceId.

Example for a Connect without an Author element sent to POST …/Connect/Document:

{
"type": "about:blank",
"title": "Bad request",
"status": 400,
"detail": "Invalid connect: No Author is set. Add an Author element with a Profile Id to the connect.",
"instance": "/api/v3/{datasourceId}/Connect/Document",
"code": "Connect.Invalid",
"correlationId": "0HN7ABCDEF:00000001"
}
FieldDescription
typeAlways about:blank.
titleShort summary of the status, e.g. Bad request.
statusHTTP status code of the response.
detailDescription of the error. For input and execution errors it states the reason and, where possible, the correction needed.
instancePath that was called. Omitted if the path could contain confidential values.
codeStable, machine-readable error code, see Error codes.
correlationIdIdentifier of the call. The same value is in the X-Correlation-ID response header and in the server log.
errors (optional)Further messages that detail does not already contain.
helpLink (optional)Link to further documentation, if available.

Further fields are possible, for example unavailableConnectedServiceKeys for Connect.ConnectedServicesNotReady (see Connect Session API).

Status codes​

StatusMeaning
400 Bad RequestInvalid input, e.g. malformed or incomplete Connect XML, a Connect without Author, invalid language codes or parameters that the endpoint explicitly checks (InvalidQuery, InvalidBody). The caller can fix the error. Unreadable query or route values do not lead to 400 everywhere.
401 UnauthorizedNo or invalid access token, see Authentication errors.
403 ForbiddenThe token does not have the required rights (scope/role) for the operation.
404 Not FoundThe resource was not found, e.g. an unknown datasourceId, an unknown user or an expired session.
409 ConflictThe change conflicts with the current state, e.g. because of a concurrent change.
413 Payload Too LargeThe request body exceeds the allowed size.
422 Unprocessable EntityThe request is valid but could not be carried out, e.g. because of invalid form values, faulty content in Data, an unsupported document language, missing MIP access or a Connect policy.
500 Internal Server ErrorUnexpected technical error. The response only contains a generic message and the correlationId.
503 Service UnavailableA required service is not reachable, e.g. the Identity Server while checking the token (AuthenticationUnavailable), or the server is not set up for the request (Admin.ImportExport.NotConfigured). For AuthenticationUnavailable, retry the call later.

Evaluating errors​

  • Evaluate the status and code. code is part of the contract and does not change without notice. Base branches in an integration on it, not on title or detail.
  • detail is always in English and is not translated according to the language of the caller or the user. The text is addressed to the integrating system and its developers. Use it selectively for display to end users or replace it with your own texts.
  • Quote the correlationId to support. The API does not return internal error details such as exception messages or stack traces. They are in the server log under the same identifier.

Error codes​

Generic codes say no more than the status and apply when no specific code fits:

CodeMeaning
BadRequestInvalid request
InvalidBodyThe request body could not be read
InvalidQueryA query or route parameter is missing or invalid
NotFoundResource not found
UnauthorizedNo or invalid access token
AuthenticationUnavailableThe token could not be checked because the Identity Server does not answer
ForbiddenMissing permission
ConcurrentModificationThe change collided with a concurrent change (Admin API only)
TechnicalErrorUnexpected technical error

Connect API and Connect Session API:

CodeMeaning
Connect.EmptyNo Connect in the request
Connect.InvalidThe Connect is invalid, for example not well-formed or without Author
Connect.NotSupportedThe Connect requires something the endpoint does not support, e.g. local file paths or desktop commands
Connect.MultipartDocumentMissingFor /Update, the document part is missing from the multipart request
Connect.InvalidConversionInvalid value for conversion
Connect.UserNotResolvedThe user query matches no user or several users
Connect.ExecutionFailedThe Connect could not be executed. detail and errors give the reasons
Connect.SessionNotFoundThe session does not exist or has expired
Connect.SessionResultNotFoundNo result is stored for the execution
Connect.InvalidSessionTemplateThe Connect Session Template is invalid or not specified
Connect.ConnectedServicesNotReadyThe user first has to sign in to connected services

Admin API:

CodeMeaning
Admin.RequiresRoleThe caller lacks the required administration role
Admin.RequiresAdminApiClientThe endpoint is only open to Admin API clients and administrators signed in to the Web Admin, not to Connect or MCP tokens
Admin.SecretsRequireInteractiveUserThe operation reveals or replaces secrets and is only open to an administrator signed in to the Web Admin
Admin.InvalidRowVersionrowVersion is missing or is not a value issued by the server
Admin.Role.UnknownThe route names none of the fixed administration roles
Admin.Role.UnsupportedPrincipalTypeRoles can only be assigned to users, directory groups and app user groups
Admin.Role.PrincipalNotFoundThe account does not exist in this datasource
Admin.Role.NotMaterializedThe role definition does not exist in this datasource
Admin.Role.DefinitionConflictSeveral definitions exist for the role
Admin.Role.MembershipConflictThe role membership was changed concurrently
Admin.DynamicGroup.ConfigurationMissingThe dynamic group has no saved configuration
Admin.DynamicGroup.EvaluationFailedThe saved configuration of the dynamic group cannot be evaluated
Admin.OrganizationUnit.InvalidThemeThe theme of the organisational unit is invalid, e.g. malformed XML
Admin.OrganizationUnit.ThemeRequiresDedicatedEndpointTheme fields are written through the theme endpoint, not through the update of the organisational unit
Admin.ImportExport.NotConfiguredNo export and import path is configured on the server
Admin.ImportExport.InvalidSelectionThe selected objects, dependencies or catalogue nodes are unknown or empty
Admin.ImportExport.MissingPackageFileThe package file is missing
Admin.ImportExport.UnsupportedPackageFormatThe package format is not supported
Admin.ImportExport.PackageTooLargeThe package is too large
Admin.ImportExport.LegacyFileThe export was created with the former DataSourceAdminApp, the file is available there
Admin.ImportExport.ExportNotFinishedThe export has not finished yet
Admin.ImportExport.FileNoLongerAvailableThe package file has been removed, a new export is needed
Admin.ImportExport.InvalidDownloadLinkThe download link is invalid or has expired
Admin.ImportExport.InvalidChunkContent-Range, uploadId or the length of the chunk are invalid
Admin.ImportExport.UploadNotFoundThe upload does not exist
Admin.ImportExport.UploadInProgressThe upload is still running
Admin.ImportExport.UploadAlreadyCompletedThe upload has already completed
Admin.ImportExport.UploadTotalChangedThe total size of the upload has changed
Admin.ImportExport.UploadChunkOutOfOrderThe chunk does not fit the previous order
Admin.ImportExport.ImportBusyAnother request is currently processing the import. Retry the call later
Admin.ImportExport.InvalidImportStateThe import does not allow the requested step in its current state

Without a specific code, 400, 401, 403 and 404 carry the generic code, all 5xx carry TechnicalError and the remaining status codes carry the form Http<Status>, for example Http409 or Http413.

Compatibility​

  • v2 endpoints keep their previous status codes, except that a server-side cancellation now results in 500 instead of an empty 200. Errors from the shared error handling are also answered with application/problem+json, and InternalMessage is removed from their execution reports. Integrations that previously evaluated message and isError or an empty response body should switch to status, code and detail.
  • SCIM endpoints continue to use the error responses of the SCIM standard.
  • …/Admin/Fields and …/Admin/Search answer binding errors (invalid JSON body, invalid query value) with the ASP.NET default format ValidationProblemDetails, without code and correlationId.