Collections

Truncate collection

Remove all documents from the collection but leaves the indexes intact.

put/_fabric/{fabric}/_api/collection/{collection-name}/truncate

Request

Path parameters

fabricstring string required

The name of the fabric.

collection-namestring string required

The name of the collection.

Response

Successfully removed all the documents.

codeinteger

HTTP response code.

errorboolean

Flag if there is an error in response. False for this response.

idstring

Id of the collection.

namestring

Name of the collection.

statusnumber

Status of the collection.

  • 1: new born collection
  • 2: unloaded
  • 3: loaded
  • 4: in the process of being unloaded
  • 5: deleted
  • 6: loading
  • Every other status indicates a corrupted collection.
typenumber

Type of the collection.

  • 2: document collection (normal case)
  • 3: edges collection
collectionModelstring

Type of collection model.

  • DOC: document model
  • KV: key/value model
  • DYNAMO: dynamo model
isSpotboolean

True if collection is a spot collection.

isLocalboolean

True if collection is a local collection.

hasStreamboolean

True if collection has a stream.

waitForSyncboolean

True if all data must be synced to storage before operation returns.

isSystemboolean

True if collection is a system collection.

globallyUniqueIdstring

Collection's global unique Id.

searchEnabledboolean

True if collection is searchable.

blobsboolean

True if collection is a blob-only collection.

Example response

{
  "code": 200,
  "id": "89218",
  "name": "colltest0127133421258ogefv",
  "status": 3,
  "type": 2,
  "collectionModel": "DOC",
  "hasStream": true,
  "globallyUniqueId": "h2C627F3DCC8E/89218"
}

Changes

No recorded changes to this operation across all 1 revision of this API.