API-of-Me
Search…
Quickstart
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.

Get the Meeco CLI

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.yaml
1
vault:
2
url: https://sandbox.meeco.me/vault
3
subscription_key: DEV_PORTAL_SUBSCRIPTION_KEY
4
keystore:
5
url: https://sandbox.meeco.me/keystore
6
subscription_key: DEV_PORTAL_SUBSCRIPTION_KEY
Copied!

Create a User

Create your first user - let's call them "Alice".
1
meeco users:create -p supersecretpassword > .alice.yaml
Copied!
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 -a .alice.yaml

Login as a User

You can use the following command to login as the user you just created or if you are returning to a session. This command will re-create the tokens if they are expired. It outputs an Authorization config file for use with future commands.
1
meeco users:login -a .alice.yaml
Copied!

Get info about a User

You can also get the information about a user by using the following command. This command will return the user's id and other user info like their dek.
1
meeco users:get -a .alice.yaml
Copied!

Creating an Item

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
1
meeco templates:list -a .alice.yaml
2
Fetching available templates... done
3
kind: Templates
4
spec:
5
- passport_details
6
- vehicle
7
- bank_card
8
- certificate_diploma
9
- membership_subscription
10
- pet
11
- device
12
- password
13
- important_document
14
- travel
15
- services
16
- medical
17
- custom
Copied!
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.
1
meeco templates:info vehicle -a .alice.yaml
2
Fetching template 'vehicle'... done
3
kind: Template
4
spec:
5
id: 0c385f1d-8825-4932-a6ab-846178b816e4
6
name: vehicle
7
description: null
8
ordinal: 1
9
visible: true
10
user_id: null
11
updated_at: 2020-09-10T14:13:12.029Z
12
image: https://sandbox.meeco.me/vault/images/ff1c25e9-530a-4103-b649-986631bcb448
13
classification_node_ids:
14
- 8670d4c6-8d68-49a4-bd21-0fc8cefa705d
15
slot_ids: []
16
label: Vehicle
17
background_color: null
18
slots: []
Copied!
Then, create the config file:
1
meeco items:create-config vehicle -a .alice.yaml > .item-config.yaml
Copied!
The next step is to edit the file to contain some data.
vehicle.yml
1
kind: Item
2
metadata:
3
template_name: vehicle
4
spec:
5
label: "DeLorean"
6
slots:
7
- name: purchase_date
8
value: "01/01/1981"
9
- name: type
10
value: "Sports Car"
11
- name: vin
12
value: "123456789"
13
- name: licence_plate
14
value: "1AAA999"
15
- name: model_make
16
value: "DMC DeLorean"
17
- name: power
18
value: "132 PS"
Copied!
Based on this configuration, we can create a new vehicle in Alice's digital vault.
1
meeco items:create -i .item-config.yaml -a .alice.yaml > .item.yaml
Copied!
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.
Last modified 5mo ago