---
title: "Return figures of a collection"
method: GET
path: "/_fabric/{fabric}/_api/collection/{collection-name}/figures"
tags: ["Collections"]
---

# Return figures of a collection

`GET /_fabric/{fabric}/_api/collection/{collection-name}/figures`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/collection/:collection-name/figures/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns an object containing statistics about a collection.

**Note**: This always loads the collection into memory.

## Path parameters

- `fabric` string, string, required
- `collection-name` string, string, required

## Response `200`

Returns information about the collection.

- GetApiCollectionFiguresRc200
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `id` string: ID of the the collection.
  - `objectId` string: Object ID of the the collection.
  - `name` string: Name of the collection.
  - `statusString` 'unloaded' | 'loading' | 'loaded' | 'unloading' | 'deleted' | 'unknown': Status of the collection.
  - `collectionModel` number: Type of collection model. - *0*: document model - *1*: key/value model - *2*: dynamo model
  - `isSpot` boolean: *True* if the collection is a spot collection.
  - `isLocal` boolean: *True* if the collection is a local collection.
  - `cacheEnabled` boolean: *True* if the collection has cache enabled.
  - `hasStream` boolean: *True* if the collection has a stream.
  - `waitForSync` boolean: *True* if all data must be synced to storage before operation returns.
  - `keyOptions` FabricCollectionValidateKeyoption: Additional options for key generation. If specified, *keyOptions* should be a JSON array containing the following attributes:
    - `allowUserKeys` boolean: If set to *true*, you can supply a key value in the *_key* attribute of a document. If set to *false*, the key generator creates keys and an error occurs if you add a *_key* value
    - `increment` integer: Increment value for *autoincrement* key generator. Not used for other key generator types.
    - `offset` integer: Initial offset value for *autoincrement* key generator. Not used for other key generator types.
    - `type` string: Specifies the type of the key generator. - *traditional*: generates numerical keys in ascending order. - *autoincrement:* generates numerical keys in ascending order with configurable initial offset and spacing. - *padded:* generates keys of a fixed length (16 bytes) in ascending lexicographical sort order. - *uuid64*: generates universally unique keys.
  - `isSystem` boolean: *True* if collection is a system collection.
  - `globallyUniqueId` string: Collection's global unique ID.
  - `searchEnabled` boolean: *True* if collection is searchable.
  - `figures` CollectionFigures
    - `indexes` CollectionFiguresIndexes
      - `count` integer: The total number of indexes defined for the collection, including the pre-defined indexes (e.g. primary index).
      - `size` integer: The total memory allocated for indexes in bytes.
    - `viewIndexes` CollectionFiguresViewIndexes
      - `count` integer: The total number of views defined for the collection.
      - `size` integer: The total memory allocated for views in bytes.
    - `documentsSize` integer
    - `cacheInUse` boolean
    - `cacheSize` integer
    - `cacheUsage` integer

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `404`: Failed to find specified collection.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
