Macrometa GeoFabrics API
The GeoFabrics API from Macrometa — 4 operation(s) for geofabrics.
The GeoFabrics API from Macrometa — 4 operation(s) for geofabrics.
openapi: 3.0.0
info:
title: Macrometa API Reference Activity Metrics GeoFabrics API
version: 0.17.17
description: API reference for the Macrometa Global Data Network.
license:
name: Macrometa License, Version 2.0
servers:
- url: https://api-play.paas.macrometa.io
description: GDN API
host: api-play.paas.macrometa.io
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: GeoFabrics
paths:
/_fabric/_system/_api/database:
get:
description: 'Fetch the list of all existing GeoFabrics
**Note**: Requires *administrator* permissions.'
operationId: ListOfGeo-fabrics
responses:
'200':
description: Successfully fetched the list of GeoFabrics.
content:
application/json:
schema:
$ref: '#/components/schemas/get_all_GeoFabrics_examples_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'403':
description: Failed to validate because you do not have access to the server.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_403'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: List of GeoFabrics
tags:
- GeoFabrics
post:
description: 'Create a new GeoFabric.
**Note**: Creating a new GeoFabric is only possible from within the *_system* fabric.'
operationId: CreateGeo-fabric
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/create_database'
required: true
responses:
'201':
description: Successfully created the GeoFabric.
content:
application/json:
schema:
$ref: '#/components/schemas/create_GeoFabric_examples_rc_201'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'403':
description: Failed to validate because you do not have access to the server.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_403'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'409':
description: Failed because GeoFabric already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_409'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Create GeoFabric
tags:
- GeoFabrics
/_fabric/_system/_api/database/user:
get:
description: Fetch a list of all GeoFabrics the current user can access along with the corresponding information for each GeoFabric.
operationId: ListOfAccessibleGeoFabrics
responses:
'200':
description: Successfully fetched list of GeoFabrics.
content:
application/json:
schema:
$ref: '#/components/schemas/get_user_GeoFabrics_examples_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: List of accessible GeoFabrics
tags:
- GeoFabrics
/_fabric/_system/_api/database/{fabric}:
delete:
description: 'Remove the GeoFabric along with all the data stored in it.
**Note**: Requires *administrator* permissions.'
operationId: DropGeo-fabric
parameters:
- description: The name of the GeoFabric.
in: path
name: fabric
required: true
schema:
type: string
format: string
responses:
'200':
description: Successfully removed the GeoFabric.
content:
application/json:
schema:
$ref: '#/components/schemas/dropped_GeoFabrics_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'403':
description: Failed to validate because you do not have access to the server.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_403'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'404':
description: Failed to find specified GeoFabric.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_404'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Remove GeoFabric
tags:
- GeoFabrics
/_fabric/{fabric}/_api/database/metadata:
get:
description: Fetch information about a GeoFabric.
operationId: InformationOfTheGeo-fabric
parameters:
- description: The GeoFabric name for which we want the information.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
responses:
'200':
description: Successfully fetched the information for the GeoFabric.
content:
application/json:
schema:
$ref: '#/components/schemas/get_GeoFabric_info_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'403':
description: Failed to validate because you do not have access to the server.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_403'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'404':
description: Failed to find specified GeoFabric.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_404'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Information of the GeoFabric
tags:
- GeoFabrics
put:
description: Set the GeoFabric Metadata.
operationId: SetMetadataInformationOfTheGeo-fabric
parameters:
- description: The GeoFabric name for which metadata should be set.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/database_metadata'
description: 'A JSON object with user defined key-value pairs.
Fields:
* metadata - json object'
required: true
responses:
'201':
description: Successfully set the GeoFabric metadata.
content:
application/json:
schema:
$ref: '#/components/schemas/set_GeoFabric_example_rc_201'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'403':
description: Failed to validate because you do not have access to the server.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_403'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'404':
description: Failed to find specified GeoFabric.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_404'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Set GeoFabric metadata
tags:
- GeoFabrics
patch:
description: Modfiy the GeoFabric metadata.
operationId: UpdateMetadataInformationOfTheGeo-fabric
parameters:
- description: The GeoFabric name for which metadata should be updated.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/database_metadata'
description: 'A JSON object with user defined key-value pairs.
Fields:
* metadata - JSON object'
required: true
responses:
'201':
description: Successfully updated the GeoFabric metadata.
content:
application/json:
schema:
$ref: '#/components/schemas/patch_GeoFabric_example_rc_201'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'403':
description: Failed to validate because you do not have access to the server.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_403'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'404':
description: Failed to find specified GeoFabric.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_404'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Modify GeoFabric metadata
tags:
- GeoFabrics
components:
schemas:
database_metadata:
properties:
metadata:
description: Object with user defined key-value pairs.
type: object
example:
key: value
patch_GeoFabric_example_rc_201:
type: object
properties:
code:
description: HTTP response code.
type: integer
example: 201
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
result:
description: Whether the GeoFabric metadata was modified successfully
type: boolean
example: true
error_example_rc_403:
properties:
code:
description: HTTP response code.
type: integer
example: 403
error:
description: Flag if there is an error in response. *True* for this response.
type: boolean
example: true
errorMessage:
description: A message created for this error.
type: string
example: Error message
errorNum:
description: Error number returned from the database.
type: integer
example: 581
required:
- error
type: object
error_example_rc_404:
properties:
code:
description: HTTP response code.
type: integer
example: 404
error:
description: Flag if there is an error in response. *True* for this response.
type: boolean
example: true
errorMessage:
description: A message created for this error.
type: string
example: Error message
errorNum:
description: Error number returned from the database.
type: integer
example: 581
required:
- error
type: object
create_database:
properties:
name:
description: Has to contain a valid GeoFabric name.
type: string
example: _system
tenant:
description: 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.
type: string
example: _mm
options:
$ref: '#/components/schemas/create_database_options'
users:
description: 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.
type: array
items:
type: string
example:
- root
required:
- name
type: object
create_database_options:
description: '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:'
properties:
dcList:
description: 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.
type: string
example: datacenter1,datacenter2
spotDc:
description: 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.
type: string
example: datacenter1
metadata:
description: Object with user defined key-value pairs.
type: object
example:
key: value
type: object
get_user_GeoFabrics_options_examples_rc_200:
type: object
properties:
associated_regions:
description: List of data centers added.
type: array
items:
type: string
example:
- datacenter1
- datacenter2
clusters:
description: List of data centers added.
type: array
items:
type: string
example:
- datacenter1
- datacenter2
dcList:
description: List of data centers added.
type: string
example: datacenter1,datacenter2
dynamo_local_tables:
description: Flag indicator for dynamo_local_tables
type: boolean
example: false
metadata:
description: An optional JSON object with user defined key-value pairs
type: object
example:
key: value
name:
description: Name of GeoFabric
type: string
example: _system
realTime:
description: Whether the changes are published in real time streams
type: boolean
spotDc:
description: The Edge Location (Datacenter) where on-spot operations for the GeoFabric is performed
type: string
example: datacenter1
status:
description: Available or not
type: string
example: available
tenant:
description: Tenant name
type: string
example: _mm
get_GeoFabric_info_rc_200:
type: object
properties:
code:
description: HTTP response code.
type: integer
example: 200
error:
description: Flag if there was an error. It is *false* in this response.
type: boolean
example: false
result:
type: object
properties:
name:
type: string
example: _system
options:
$ref: '#/components/schemas/get_user_GeoFabrics_options_examples_rc_200'
isSystem:
description: Whether or not the current GeoFabric is the _system fabric
type: boolean
example: true
create_GeoFabric_examples_rc_201:
type: object
properties:
code:
description: HTTP response code.
type: integer
example: 201
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
result:
description: Whether the GeoFabric was created successfully
type: boolean
example: true
dropped_GeoFabrics_example_rc_200:
type: object
properties:
code:
description: HTTP response code.
type: integer
example: 200
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
result:
description: Whether GeoFabric was successfully removed.
type: boolean
example: true
headers:
x-gdn-region:
description: The federation's region hostname that served the request.
type: string
x-gdn-requestid:
description: A unique request ID for each API request.
type: string
error_example_rc_400:
properties:
code:
description: HTTP response code.
type: integer
example: 400
error:
description: Flag if there is an error in response. *True* for this response.
type: boolean
example: true
errorMessage:
description: A message created for this error.
type: string
example: Error message
errorNum:
description: Error number returned from the database.
type: integer
example: 102020
required:
- error
type: object
get_all_GeoFabrics_examples_rc_200:
properties:
code:
description: HTTP response code.
type: integer
example: 200
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
result:
description: An array of GeoFabric names
type: array
items:
type: string
example:
- _system
- demo._system
error_example_rc_409:
properties:
code:
description: HTTP response code.
type: integer
example: 409
error:
description: Flag if there is an error in response. *True* for this response.
type: boolean
example: true
errorMessage:
description: A message created for this error.
type: string
example: Error message
errorNum:
description: Error number returned from the database.
type: integer
example: 581
required:
- error
type: object
set_GeoFabric_example_rc_201:
type: object
properties:
code:
description: HTTP response code.
type: integer
example: 201
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
result:
description: Whether the GeoFabric metadata was successfully set
type: boolean
example: true
get_user_GeoFabrics_examples_rc_200:
type: object
properties:
code:
description: HTTP response code.
type: integer
example: 200
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
result:
type: array
items:
type: object
properties:
name:
type: string
example: _system
options:
$ref: '#/components/schemas/get_user_GeoFabrics_options_examples_rc_200'
isSystem:
description: Whether or not the current GeoFabric is the _system fabric
type: boolean
example: true
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
description: 'Provide an API Key to the `Authorization` header, prefixed with "apikey".
Example: `Authorization: apikey <key>`'
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'Provide a JSON Web Token (JWT) to the `Authorization` header, prefixed with "bearer".
Example: `Authorization: bearer <jwt>`'