Close
    logoCloudomation Docs

    Accessing and Manipulating Records

    All content that is stored in Cloudomation is stored in the form of records. This includes flow scripts, files, messages, users, executions and anything else you or the system create on the platform. All records can be accessed and manipulated with the same methods.

    This section describes three methods for creating, accessing, manipulating, and deleting records. More detailed information can be found in the REST API documentation, and the Flow-API documentation.

    Creating

    Via the User Interface

    1. Press "+ Create" and select the type of record you like to create.

      The create button

    2. The new record is opened in the main section.

    Via the REST API

    Send a POST request to:

    https://<your-workspace-name>.cloudomation.com/api/latest/<record-type>

    The JSON payload should contain all fields you wish to set.

    Via the Cloudomation Flow-API

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    system.<record-type>('name of the new record').save()
    # for example:
    system.setting('my-new-setting').save()
    # you can set fields of the new record:
    system.setting('my-new-setting').save(value=42, description='some number')

    Listing

    Via the User Interface

    1. Switch to the workspace dashboard by clicking the Cloudomation logo in the menu.
    2. Scroll down to the resource tabs.

    Via the REST API

    Send a GET request to:

    $ curl https://<your-workspace-name>.cloudomation.com/api/latest/<record-type>

    You can use filter expressions:

    $ curl 'https://<your-workspace-name>.cloudomation.com/api/latest/<record-type>?filter={"field":"name","op":"like","value":"my-%"}'

    Via the Cloudomation Flow-API

    Listing via the Flow-API will return all records which exist when the listing starts. This means when records are created during the listing, they will not be included in a currently running listing. Also, when records are deleted during the listing, they are still returned. Make sure to handle the ResourceNotFoundError while iterating over a listing result.

    Use the following method:

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    # for record in system.<record-type>s():
    # # do something with "record"
    # for example:
    this.log(all_webhooks=list(system.webhooks()))
    # you can use filter expressions
    this.log(all_enabled_webhooks=list(system.webhooks(filter_={
    'field': 'is_enabled',
    'op': 'eq',
    'value': 'True',
    })))

    Reading

    Via the User Interface

    1. Enter the name or parts of the name of the record in the quick search bar.
    2. Click on the record in the quick search results.
    3. The record is opened in the main section.

    Via the REST API

    Send a GET request to

    https://<your-workspace-name>.cloudomation.com/api/latest/<record-type>/<record-id>

    You can also access resources by name:

    Send a GET request to:

    https://<your-workspace-name>.cloudomation.com/api/latest/<resource-type>/<resource-name>?by=name

    See the records reference to learn about the different resources and activities

    You can specify the fields you are interested in:

    https://<your-workspace-name>.cloudomation.com/api/latest/<record-type>/<record-id>?fields=id,name,description

    Via the Cloudomation Flow API

    Use the following method:

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    system.<record-type>('name of the record').get('name of field to read')
    # for example:
    description = system.flow('my-flow').get('description')
    # you can read several fields at once:
    created_at, modified_at = system.flow('my-flow').get('created_at', 'modified_at')

    Updating

    Via the User Interface

    1. Open the record you want to modify.
    2. Change any field of the record.
    3. Press the "save" button.

    Via the REST API

    Send a PATCH request to:

    https://<your-workspace-name>.cloudomation.com/api/latest/<record-type>/<record-id>

    The JSON payload should contain all fields you wish to update.

    Via the Cloudomation Flow API

    Use the following method:

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    system.user('<my-user-name>').save(description='This is me')

    Deleting

    Via the User Interface

    1. Open the record you want to delete.
    2. Press the "delete" button.

    Via the REST API

    Send a DELETE request to:

    https://<your-workspace-name>.cloudomation.com/api/latest/<record-type>/<record-id>

    Via the Cloudomation Flow API

    Use the following method:

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    system.file('document.pdf').delete()

    Deleting Execution records is executed asynchronous! Therefore, Execution records may still exist after the delete() method returns.

    Learn more

    Records reference
    Authentication
    Git Integration
    Reference — Previous
    REST API
    Next — Knowledge Base
    Authentication