Document

A Document has metadata and content. The Document is always application/json, while the content has a specific contentType.

There are Document methods, like GET Docs/ or POST Docs/ which use the full document in the request and response.

GET {{host}}/docs?id={{id}}
Accept: application/json
Authorization: Basic {{basicToken}}
{
  "id": "guid",
  
  "key": "string",
  "context": "string",
  "index": "string",
  "rank": 0 (int),
  
  "contentType": "application/json",
  "content": "{\"Header\":{\"Firstname\":\"Anna\",\"InvoiceNo\":\"Inv002\",\"Lastname\":\"Meyer\"}}",
  
  "lastUpdateUtc"    : "2024-01-15T09:44:04.298Z",
  "createdDateUtc"   : "2024-01-15T08:43:41.992Z",
  "expirationDateUtc": "2024-01-16T08:43:41.992Z",
  "recordVersion"    : 1705308221992 (long)
}

On the other hand there are Content methods, like GET /Docs/Content or POST Docs/Content, which use the document's content in the request and response.

Document Key

Basically, documents is a key-value store. However, the document "Key" consists of four properties: key, context, index and rank. These four properties together are unique (per Account) and refer to a single document. Alternatively the id is a unqiue reference to a document. The Id can be client-provided when creating a new document or it is returned (created by the service) (see POST).

Document Content

The document content can be any data-set, like a JSON or an XML document, a string or a binary stream. Provide an appropriate contentType when creating the document.

Document life-time

All documents do have a life-time which is, by default, one hour!

This means, documents are deleted after one hour.

Each document has a expirationDateUtc which tells you exactly when the life-time expires. You can set or update that property at any time to adjust a dcoument's life-time according to your needs.

Last updated