Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: CloudTruth Management Import API
version: v1
description: CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
contact:
name: CloudTruth Support
email: support@cloudtruth.com
tags:
- name: Import
paths:
/api/v1/import/:
post:
operationId: import_create
description: Import parameters from the provided data.
parameters:
- in: query
name: mask_secrets
schema:
type: boolean
default: false
description: Mask secrets in the response
- in: query
name: preview
schema:
type: boolean
default: false
description: Do not create any objects
tags:
- Import
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ImportCreateRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ImportCreateRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/ImportCreateRequest'
required: true
security:
- JWTAuth: []
- ApiKeyAuth: []
- tokenAuth: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ImportCreateResponse'
description: ''
summary: Import create
x-summary-source: derived
components:
schemas:
ImportCreateResponse:
type: object
properties:
parameter:
type: array
items:
$ref: '#/components/schemas/ImportParameter'
description: Project parameter values after import
required:
- parameter
ImportCreateRequest:
type: object
properties:
project:
type: string
description: Project name or identifier
environment:
type:
- string
- 'null'
description: Environment name or identifier
body:
type: string
description: Text to turn into variables
secrets:
type: array
items:
type: string
description: Parameter names that should be secrets
ignore:
type: array
items:
type: string
description: Parameter names to be ignored
add_project:
type: boolean
default: true
description: Create the project (if it does not exist)
add_environment:
type: boolean
default: true
description: Create the environment (if it does not exist)
add_parameters:
type: boolean
default: true
description: Create the parameters (if they do not exist)
add_overrides:
type: boolean
default: true
description: Create the environment value override (if they do not exist)
inherit_on_same:
type: boolean
default: true
description: Skip adding a parameter override if it is the same
required:
- body
- ignore
- project
- secrets
ImportParameter:
type: object
description: Describes an imported parameter.
properties:
project_name:
type: string
description: Project name
project_id:
type:
- string
- 'null'
description: Project identifier
environment_name:
type: string
description: Environment where parameter is defined
environment_id:
type:
- string
- 'null'
description: Environment identifier where value is set
parameter_name:
type: string
description: Parameter name
parameter_id:
type:
- string
- 'null'
description: Parameter identifier
secret:
type: boolean
default: false
description: Whether to treat the parameter as a secret
value:
type: string
description: Parameter value in the specified environment
value_id:
type:
- string
- 'null'
description: Parameter value identifier in the environment
created_at:
type:
- string
- 'null'
format: date-time
description: Date and time the parameter value was created
modified_at:
type:
- string
- 'null'
format: date-time
description: Date and time the parameter value was updated
action:
type: string
description: Action taken on environment value for parameter
required:
- action
- created_at
- environment_name
- modified_at
- parameter_name
- project_name
- value
securitySchemes:
ApiKeyAuth:
in: header
name: Authorization
type: apiKey
description: "\nUse your CloudTruth API Key to authenticate to the API. You can get\nan API Key by creating a Service Account. During setup of the Service\nAccount you will generate a long-lived API key intended for use by automation\nand API clients. Access through the service account will be audited separately\nfrom any other user.\n\nIf you are just trying to use the API in a normal workflow, this is likely the\nauthentication mechanism you want to use.\n\nTo use the API Key, place your API Key in the Authorization header as 'Api-Key APIKEY', where\nAPIKEY is your CloudTruth API Key. For example:\n\n Authorization: Api-Key fskur.ghlsiudhrg84so938r5u\n "
JWTAuth:
in: header
name: Authorization
type: apiKey
description: "\nUse your JWT to authenticate to the API. This is how the CloudTruth\nWeb UI authenticates to the backend. It requires a user to have already logged in\nand gotten a JWT from the login process. This is usually done by an Auth0 authentication\nflow from one of the Auth0 javascript libraries. Alternatively, you can pull the\nJWT from your browser if you have a logged in session with the CloudTruth UI.\n\nThis authentication mechanism is intended for deeper integrations into the CloudTruth\nsystem, where you want to handle the user logins directly in your application. For\nnormal API use, you likely want the Api-Key authentication header and not this one.\n\nTo use the JWT, place your JWT in the Authorization header as 'Bearer JWT', where\nJWT is your JWT. For example:\n\n Authorization: Bearer eyJhbGciOiJIkuydfy.eyJzdWIiOiIxMjM....\n "
tokenAuth:
type: http
scheme: bearer
externalDocs:
url: https://docs.cloudtruth.com/