Macrometa Connections API
The Connections API from Macrometa — 14 operation(s) for connections.
The Connections API from Macrometa — 14 operation(s) for connections.
openapi: 3.0.0
info:
title: Macrometa API Reference Activity Metrics Connections 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: Connections
paths:
/_fabric/{fabric}/_api/connections:
parameters:
- $ref: '#/components/parameters/Fabric'
post:
description: Create a connection using a connector to an external data source.
summary: Create a connection
tags:
- Connections
operationId: createConnection
requestBody:
$ref: '#/components/requestBodies/Connection'
responses:
'200':
description: Successfully created the connection.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionResponse'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
get:
description: 'Get the list of existing connections.
To get complete information about a connection, use [getConnection API]](#/Collections/getConnection) with the connection name.'
summary: List all connections
tags:
- Connections
operationId: getConnections
parameters:
- $ref: '#/components/parameters/ConnectionType'
responses:
'200':
description: Successfully fetched the connections.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionsResponse'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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 the connections.
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'
/_fabric/{fabric}/_api/connections/validate:
post:
description: Validate a connection to an external data source.
summary: Validate a connection
tags:
- Connections
operationId: validateConnection
parameters:
- $ref: '#/components/parameters/Fabric'
requestBody:
$ref: '#/components/requestBodies/Connection'
responses:
'200':
description: Successfully validated the connection.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationResponse'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
/_fabric/{fabric}/_api/connections/{connection-name}:
parameters:
- $ref: '#/components/parameters/Fabric'
- $ref: '#/components/parameters/Connection'
get:
description: Get information about a specific connection to an external data source.
summary: Get connection details
tags:
- Connections
operationId: getConnection
responses:
'200':
description: Successfully fetched the connection.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionResponse'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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 the connection.
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'
delete:
description: Delete a connection to an external data source.
summary: Delete a connection
tags:
- Connections
operationId: deleteConnection
parameters:
- name: isInternal
description: Setting this parameter to `true` allows internal connections to be deleted.
in: query
required: false
schema:
type: boolean
default: false
responses:
'200':
description: Successfully deleted the connection.
content:
application/json:
schema:
$ref: '#/components/schemas/DeletedResponse'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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 the connection.
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'
put:
description: Update a connection. Note that if the connection is already in use, then it will not be updated in the workflows.
summary: Update connection details
tags:
- Connections
operationId: updateConnection
requestBody:
$ref: '#/components/requestBodies/Connection'
responses:
'200':
description: Successfully updated the connection.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionResponse'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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 the connection.
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'
/_api/connections/metrics:
get:
description: Retrieve connections metrics.
summary: Retrieve metrics
tags:
- Connections
operationId: getMetrics
parameters:
- name: start
description: A Unix timestamp. Use this parameter to filter metrics generated after the specified date and time. Must be used together with `end` parameter.
in: query
required: true
schema:
type: string
example: '1689592893735'
- name: end
description: A Unix timestamp. Use this parameter to filter metrics generated before the specified date and time. Must be used together with `start` parameter.
in: query
required: true
schema:
type: string
example: '1689592893735'
- name: step
description: Metric results step duration.
in: query
schema:
type: string
example: 24h
responses:
'200':
description: Successfully fetched the metrics for connections.
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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'
/_api/connectors:
get:
description: Get available connectors.
summary: Get available connectors
tags:
- Connections
operationId: getConnectors
responses:
'200':
description: Successfully fetched the connector list.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorEntitiesResponse'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
/_api/connectors/{connector-name}:
get:
description: 'Obtain comprehensive information about the connector,
including the configuration details necessary for setting up an connection using this connector.'
summary: Get connector details
tags:
- Connections
operationId: getConnector
parameters:
- $ref: '#/components/parameters/Connector'
- name: type
in: query
required: false
description: "Specifies which type of connector to retrieve, \nNo value returns both source and target connectors."
schema:
type: string
enum:
- source
- target
responses:
'200':
description: Succesfully fetched the connector.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorEntityResponse'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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 the connector.
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'
/_api/connectors/{connector-name}/sample:
post:
description: 'Retrieve sample data from the data source by supplying the connector configuration.
The response includes both the schema and sample data.'
summary: Retrieve sample data from the data source
tags:
- Connections
operationId: retrieveSample
requestBody:
description: Connector configuration.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorSampleRequest'
parameters:
- $ref: '#/components/parameters/Connector'
responses:
'200':
description: Successfully retrieved the connnector sample.
content:
application/json:
schema:
title: ConnectorSampleResponse
allOf:
- $ref: '#/components/schemas/ResponseBase'
- properties:
result:
type: array
items:
$ref: '#/components/schemas/ConnectorSample'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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 the connector.
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'
/_api/connectors/{connector-name}/schema:
post:
description: Retrieve schema for the connector by supplying the connector configurations.
summary: Retrieve schema from the data source
tags:
- Connections
operationId: retrieveSchema
requestBody:
description: Connector configuration.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorSampleRequest'
parameters:
- $ref: '#/components/parameters/Connector'
responses:
'200':
description: Successfully retrieved connector schema.
content:
application/json:
schema:
title: ConnectorSchemaResponse
allOf:
- $ref: '#/components/schemas/ResponseBase'
- properties:
result:
type: array
items:
$ref: '#/components/schemas/ConnectorSchema'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
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 the connector.
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'
/_api/transformations/sample:
post:
description: 'Generate a sample transformation query based on the schema of the specific data source.
This API serves as the initial step in creating a data transformation process.
Use this API''s generated sample transformation query to construct your transformation logic.'
summary: Generate a transformation query sample
tags:
- Connections
operationId: getSampleTransformation
requestBody:
description: Schema of the data source.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorSchema'
responses:
'200':
description: Successfully fetched the sample transformation query.
content:
application/json:
schema:
title: SampleTransformationResponse
allOf:
- $ref: '#/components/schemas/ResponseBase'
- properties:
query:
description: Transformation query.
type: string
inputSchema:
$ref: '#/components/schemas/ConnectorSchema'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
/_api/transformations/validate:
post:
description: Validate the provided transformation query and the parameters.
summary: Validate transformation
tags:
- Connections
operationId: validateTransformation
requestBody:
description: Details of transformation to validate.
required: true
content:
application/json:
schema:
type: object
title: TransformationValidationRequest
properties:
collection:
description: Name of the GDN collection.
type: string
type:
description: Connection type (source or target).
type: string
query:
description: Transformation query.
type: string
inputSchema:
description: Schema of the input data to the transformation.
$ref: '#/components/schemas/ConnectorSchema'
responses:
'200':
description: Successfully validated the transformation
content:
application/json:
schema:
$ref: '#/components/schemas/TransformationValidationResponse'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
/_api/transformations/preview:
post:
description: 'Generate a preview of the data after the transformation. The preview is generated based on a sample data set from the data source.
You can use [get connector sample API](#/Connections/retrieveSample) to retrieve a sample dataset from the data source.'
summary: Generate transformed data preview
tags:
- Connections
operationId: previewTransformation
requestBody:
description: Parameters required to generate a transformation preview.
required: true
content:
application/json:
schema:
type: object
title: TransformationPreviewRequest
properties:
query:
description: Transformation query.
type: string
inputSchema:
$ref: '#/components/schemas/ConnectorSchema'
outputSchema:
$ref: '#/components/schemas/ConnectorSchema'
data:
description: Sample dataset from the data source.
type: array
items:
type: object
responses:
'200':
description: Successfully generated the transformation preview.
content:
application/json:
schema:
title: TransformationPreviewResponse
allOf:
- $ref: '#/components/schemas/ResponseBase'
- properties:
result:
$ref: '#/components/schemas/ConnectorSample'
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'
'401':
description: Failed to authenticate the request.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
/api/hss/v1/connections:
get:
tags:
- Connections
summary: Get the list of available connections.
operationId: get_connections_api_hss_v1_connections_get
responses:
'200':
description: Successfully returned connections.
content:
application/json:
schema:
items:
$ref: '#/components/schemas/ConnectionDTO'
type: array
title: Response getConnections
'401':
description: 'Error: Unauthorized.'
content:
application/json:
example:
detail: Unauthorized.
security:
- APIKeyHeader: []
put:
tags:
- Connections
summary: Updates a connection
operationId: update_connection_api_hss_v1_connections_put
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionDTO'
required: true
responses:
'200':
description: Successfully updated connection.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionDTO'
'400':
description: 'Error: Bad request.'
content:
application/json:
example:
detail: Invalid connector name.
'401':
description: 'Error: Unauthorized.'
content:
application/json:
example:
detail: Unauthorized.
'404':
description: 'Error: Not Found.'
content:
application/json:
example:
detail: Connection not found.
'422':
description: 'Error: Unprocessable entity.'
content:
application/json:
example:
detail:
- type: json_invalid
loc:
- body
- 72
msg: JSON decode erro
# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/macrometa/refs/heads/main/openapi/macrometa-connections-api-openapi.yml