Macrometa Secrets API
The Secrets API from Macrometa — 2 operation(s) for secrets.
The Secrets API from Macrometa — 2 operation(s) for secrets.
openapi: 3.0.0
info:
title: Macrometa API Reference Activity Metrics Secrets 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: Secrets
paths:
/_fabric/{fabric}/_api/kms/secret:
get:
tags:
- Secrets
summary: List of secrets.
description: Fetch secrets with filter and pagination.
operationId: ListOfSecrets
parameters:
- name: fabric
in: path
required: true
description: The name of the fabric.
schema:
type: string
default: _system
- name: name
description: The name of the secret.
in: query
required: false
schema:
type: string
- name: keyName
description: Name of the secret's key.
in: query
required: false
schema:
type: string
- name: keyId
description: ID of the secret's key.
in: query
required: false
schema:
type: string
- name: offset
in: query
required: false
description: 'Number of secrets to skip before displaying results. Default: 0'
schema:
type: integer
- name: count
in: query
required: false
description: 'The number of secrets to return. Default: 50'
schema:
type: integer
- name: sortBy
description: Sort by field name.
in: query
required: false
schema:
type: string
- name: order
in: query
required: false
description: Order the results ascending (ASC) or descending (DESC). Use with sortBy.
schema:
type: string
enum:
- ASC
- DESC
responses:
'200':
description: Successfully fetched the list of secrets.
content:
application/json:
schema:
$ref: '#/components/schemas/get_all_secrets_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'
'401':
description: Failed because you do not have administrator permissions.
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'
'403':
description: Failed due to credentials restrictions.
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'
'412':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_412'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
post:
tags:
- Secrets
summary: Create secret.
description: It encodes sensitive data and assigns a name.
operationId: CreateSecret
parameters:
- description: The name of the fabric.
in: path
name: fabric
required: true
schema:
type: string
default: _system
requestBody:
$ref: '#/components/requestBodies/create_secret_request'
responses:
'200':
description: Successfully created the secret.
content:
application/json:
schema:
$ref: '#/components/schemas/create_secret_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'
'401':
description: Failed because you do not have administrator permissions.
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'
'403':
description: Failed due to credentials restrictions.
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 a secret with this name 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'
'412':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_412'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
delete:
tags:
- Secrets
summary: Delete all secrets.
description: Delete all secrets.
operationId: DeleteAllSecrets
parameters:
- in: path
name: fabric
required: true
description: The name of the fabric.
schema:
type: string
default: _system
- name: all
in: query
required: true
description: Confirm deleting all secrets.
schema:
type: boolean
responses:
'200':
description: Successfully deleted all secrets.
content:
application/json:
schema:
$ref: '#/components/schemas/delete_all_secret_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'
'401':
description: Failed because you do not have administrator permissions.
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'
'403':
description: Failed due to credentials restrictions.
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'
/_fabric/{fabric}/_api/kms/secret/{name}:
get:
tags:
- Secrets
summary: Fetch secret.
description: Fetch secret by name.
operationId: FetchSecret
parameters:
- name: fabric
in: path
required: true
description: The name of the fabric.
schema:
type: string
default: _system
- name: name
in: path
required: true
description: The name of the secret.
schema:
type: string
responses:
'200':
description: Successfully deleted the secret.
content:
application/json:
schema:
$ref: '#/components/schemas/get_secret_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'
'401':
description: Failed because you do not have administrator permissions.
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'
'403':
description: Failed due to credentials restrictions.
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 secret.
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'
'412':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_412'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
put:
tags:
- Secrets
summary: Update secret.
description: Update secret.
operationId: UpdateSecret
parameters:
- description: The name of the fabric.
in: path
name: fabric
required: true
schema:
type: string
default: _system
- name: name
in: path
required: true
description: The name of the secret.
schema:
type: string
requestBody:
$ref: '#/components/requestBodies/update_secret_request'
responses:
'200':
description: Successfully updated the secret.
content:
application/json:
schema:
$ref: '#/components/schemas/create_secret_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'
'401':
description: Failed because you do not have administrator permissions.
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'
'403':
description: Failed due to credentials restrictions.
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'
'412':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_412'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
delete:
tags:
- Secrets
summary: Delete secret.
description: Delete secret by name
operationId: DeleteSecret
parameters:
- name: fabric
in: path
required: true
description: The name of the fabric.
schema:
type: string
default: _system
- name: name
in: path
required: true
description: The name of the secret.
schema:
type: string
responses:
'200':
description: Successfully fetched the secret.
content:
application/json:
schema:
$ref: '#/components/schemas/get_secret_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'
'401':
description: Failed because you do not have administrator permissions.
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'
'403':
description: Failed due to credentials restrictions.
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 secret.
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'
'412':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_412'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
components:
requestBodies:
create_secret_request:
content:
application/json:
schema:
$ref: '#/components/schemas/create_secret_request'
description: JSON for a new secret.
required: true
update_secret_request:
content:
application/json:
schema:
$ref: '#/components/schemas/update_secret_request'
description: JSON for updating a secret.
required: true
schemas:
update_secret_request:
type: object
properties:
value:
type: string
example: my updated value
fileName:
type: string
example: null
keyName:
type: string
example: null
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
get_secret_examples_rc_200:
properties:
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
code:
description: The generated response code.
type: integer
example: 200
result:
type: object
properties:
name:
type: string
example: secret_name_1
value:
type: string
example: my value
fileName:
type: string
example: null
tenant:
type: string
example: _mm
fabric:
type: string
example: _system
keyName:
type: string
example: managed_key_1
keyId:
type: string
example: I1tcRHpOqEtvOxw9z90WjQ.EmcLClY
createdAt:
type: number
example: 1689020889736
updatedAt:
type: number
example: 1689020889736
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_secret_request:
type: object
properties:
name:
type: string
example: secret_name_1
value:
type: string
example: my value
fileName:
type: string
example: null
keyName:
type: string
example: null
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
delete_all_secret_example_rc_200:
properties:
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
code:
description: The generated response code. `value` property always returns as `null`.
type: integer
example: 200
result:
type: array
items:
type: string
error_example_rc_412:
properties:
code:
description: HTTP response code.
type: integer
example: 412
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_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
error_example_rc_401:
properties:
code:
description: HTTP response code.
type: integer
example: 401
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
create_secret_example_rc_200:
properties:
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
code:
description: The generated response code. `value` property always returns as `null`.
type: integer
example: 200
result:
type: object
properties:
name:
type: string
example: secret_name_1
value:
type: string
example: null
fileName:
type: string
example: null
tenant:
type: string
example: _mm
fabric:
type: string
example: _system
keyName:
type: string
example: managed_key_1
keyId:
type: string
example: I1tcRHpOqEtvOxw9z90WjQ.EmcLClY
createdAt:
type: number
example: 1689020889736
updatedAt:
type: number
example: 1689020889736
get_all_secrets_examples_rc_200:
properties:
error:
description: Flag if there is an error in response. *False* for this response.
type: boolean
example: false
code:
description: The generated response code. `value` property always returns as `null`.
type: integer
example: 200
result:
type: object
properties:
total:
description: Total secrets found.
type: integer
example: 100
offset:
description: Fetch secrets from offset.
type: integer
example: 0
count:
description: Count secrets to return.
type: integer
example: 50
items:
description: An array of secrets.
type: array
items:
type: object
properties:
name:
type: string
example: secret_name_1
value:
type: string
example: null
fileName:
type: string
example: null
tenant:
type: string
example: _mm
fabric:
type: string
example: _system
createdAt:
type: number
example: 1689020889736
updatedAt:
type: number
example: 1689020889736
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>`'