Close
    logoCloudomation Docs

    Import / Export

    Cloudomation records can be exported to YAML. Exported YAML files can be imported to Cloudomation.

    Use Cases

    You can use import / exports to

    • make backups of individual Cloudomation records
    • transfer Cloudomation resources between workspaces
    • create any kind of Cloudomation resource using the git integration

    Concept

    All Cloudomation resources can be exported to a YAML document. Cloudomation YAML exports can contain nested resources and multiple documents.

    YAML exports can be imported to Cloudomation to create all resources contained within the export.

    YAML exports contain additional informational fields which are not used when importing the file. (e.g. the modified_at timestamp)

    Exporting records

    The Cloudomation User Interface provides an "export" button in all record views:

    The additional actions popover with the "export" button.

    You can also export records using the REST API:

    Example

    Exporting a webhook

    $ curl https://<your-workspace-name>.cloudomation.com/api/latest/webhook/my-webhook\?by=name\&download=export
    webhook:
    name: my-webhook
    ...

    Importing records

    Only resources can be imported to Cloudomation. Please see Records for a list of resources and activities.

    Please refer to Git Integration for instructions on how to import exported YAML files to Cloudomation.

    You can also import using the REST API:

    Example

    Importing a YAML

    $ curl https://<your-workspace-name>.cloudomation.com/api/latest/import -d @export.yaml

    Export file format

    Cloudomation exports are YAML files. The general structure is

    <resource type>:
    <field name>: <field value>
    ...

    It is possible to specify multiple documents in one file using the YAML document separator ---.

    Foreign key references

    It is possible to load nested resources and references. Let's assume we want to load the export of a webhook:

    webhook:
    name: my-webhook
    key: secret
    is_enabled: false
    project_id_project:
    name: my-project

    In addition to the fields name, key, and is_enabled this export contains a reference to a project named "my-project". On import the field project_id of the webhook will be set to the ID of the project with the name "my-project".

    If a referenced record does not exist, Cloudomation will create it with the fields specified.

    Foreign key referenced by

    In the example above the webhook specifies the reference to the project. This is also possible the other way around:

    project:
    name: my-project
    webhook_plain_list_project_id:
    - name: my-webhook

    On import Cloudomation will first create the project, then search for a webhook named "my-webhook" and set the field project_id in the webhook

    Learn more

    Git Integration
    Knowledge Base — Previous
    Identities
    Next — Knowledge Base
    Messages and Forms