This guide aims to get you up and running and familiar with the API in about 15 minutes. We'll teach you how to setup your first user and how to create your first item.
Download the Meeco CLI and follow the installation instructions in the Meeco CLI section of the documentation.
The first thing to do after setup is to create an
.environment.yaml file that allows you to connect to the sandbox environment.
.environment.yamlvault:url: https://sandbox.meeco.me/vaultsubscription_key: DEV_PORTAL_SUBSCRIPTION_KEYkeystore:url: https://sandbox.meeco.me/keystoresubscription_key: DEV_PORTAL_SUBSCRIPTION_KEY
Create your first user - let's call them "Alice".
$ meeco users:create -p supersecretpassword > .alice.yaml
The command above does a lot, if you want to learn what happens behind the scenes look at the guide about Setting up Access. The end result is captured in a file
.alice.yaml that holds the necessary information about the user that allows us to talk to the API in the next steps.
In the next calls, you'll see an argument added with
Items in the Meeco API require you to specify a template. This template can be seen as a contract with a number of predefined fields (which we call slots). To get all available templates execute the following command
$ meeco templates:list -a .alice.yamlFetching available templates... donekind: Templatesspec:- passport_details- vehicle- bank_card- certificate_diploma- membership_subscription- pet- device- password- important_document- travel- services- medical- custom
Let's create a
vehicle item. To prepare this we can run the create config command
First, let's have a look at what kind of information the template holds.
$ meeco templates:info vehicle -a .alice.yamlFetching template 'vehicle'... donekind: Templatespec:id: 0c385f1d-8825-4932-a6ab-846178b816e4name: vehicledescription: nullordinal: 1visible: trueuser_id: nullupdated_at: 2020-09-10T14:13:12.029Zimage: https://sandbox.meeco.me/vault/images/ff1c25e9-530a-4103-b649-986631bcb448classification_node_ids:- 8670d4c6-8d68-49a4-bd21-0fc8cefa705dslot_ids: label: Vehiclebackground_color: nullslots: 
Then, create the config file:
$ meeco items:create-config vehicle -a .alice.yaml > vehicle.yaml
The next step is to edit the file to contain some data.
vehicle.ymlkind: Itemmetadata:template_name: vehiclespec:label: "DeLorean"slots:- name: purchase_datevalue: "01/01/1981"- name: typevalue: "Sports Car"- name: vinvalue: "123456789"- name: licence_platevalue: "1AAA999"- name: model_makevalue: "DMC DeLorean"- name: powervalue: "132 PS"
Based on this configuration, we can create a new vehicle in Alice's digital vault.
$ meeco items:create -i vehicle.yaml -a .alice.yaml
Congratulations, you have now created your first item in the Vault.
From here you can either keep learning about the Meeco Platform and tools, or jump into the Connections and Sharing tutorial to keep using the CLI to make a connection with another user and share the item you created above.