---
title: "Create GeoFabric"
method: POST
path: "/_fabric/_system/_api/database"
tags: ["GeoFabrics"]
---

# Create GeoFabric

`POST /_fabric/_system/_api/database`

## 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/_system/_api/database/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new GeoFabric.

**Note**: Creating a new GeoFabric is only possible from within the *_system* fabric.

## Request body

- CreateDatabase
  - `name` string, required: Has to contain a valid GeoFabric name.
  - `tenant` string: Name of the tenant to associate with GeoFabric. This option is applicable and optional when system tenant *_mm* invokes the API. Other tenants should not specify this option as the tenant invoking API shall be associated with GeoFabric.
  - `options` CreateDatabaseOptions: Has to be a dictionary of GeoFabric options. If this is not specified or one of the dictionary members are not specified, defaults are used. The members of the *options* dictionary are as follows:
    - `dcList` string: The list of Edge Locations (data centers) as a comma-separated string. The individual elements for this parameter are your Edge Location URL prefixes up to the first *.* character. For instance if one of your Edge Location URLs is *http://myfederation-us-east-1.dev.aws.macrometa.io*, the corresponding value of one the items for this parameter would be *myfederation-us-east-1*. You can use the */datacenter/all* REST API call to get a list of all available Edge Locations and pick and choose from this list. It is a mandatory field, but if not specified (due to user error), it defaults to the local Edge Location.
    - `spotDc` string: The Edge Location (data center) where on-spot operations for the given GeoFabric is performed. By default, a random data center is chosen from those which are capable.
    - `metadata` object: Object with user defined key-value pairs.
  - `users` string[]: Enter an array of user ids that has admin access to the new GeoFabric. If this field is left blank, the default user *root* has admin access.

## Response `201`

Successfully created the GeoFabric.

- CreateGeoFabricExamplesRc201
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `result` boolean: Whether the GeoFabric was created successfully

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `403`: Failed to validate because you do not have access to the server.
- `409`: Failed because GeoFabric already exists.

---

[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)
