Collections

Create collection

Create collection.

post/_fabric/{fabric}/_api/collection

Request

Path parameters

fabricstring string required

The name of the fabric.

Request body

isLocalboolean

If true, create a local collection. For a local collection data is not replicated across regions.

namestring required

The name of the collection.

cacheEnabledboolean

True if collection has cache enabled

waitForSyncboolean

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

enableShardsboolean

If true, enable sharding for the collection.

typeinteger

The type of the collection to create.

  • 2: document collection
  • 3: edge collection.
streamboolean

If true, create a local stream for collection.

Example request

{
  "keyOptions": {
    "increment": 1,
    "offset": 1,
    "type": "autoincrement"
  },
  "name": "Test"
}

Response

Successfully created collection.

idstring

Id of the the collection.

namestring

Name of the collection.

statusnumber

Status of the collection.

typenumber

Type of the collection.

  • 2: document collection
  • 3: edge 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, False if collection is a global 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.

Example response

{
  "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.