**Source URL:** https://general.veevavault.dev/mdl/documentation/getting-started.md

# MDL Quickstart

You can use Vault API to modify metadata and manage configurations for Vault.

This tutorial walks through the process of using MDL to modify configuration in Vault. You'll use MDL to do the following:

* Create a basic *Picklist* component.

* Create a *vMDL Hello World* Vault object that uses the *Picklist*.

* Simultaneously alter the object and *Picklist*.

* Drop both the object and *Picklist* from the Vault.

To use and test out MDL, we recommend downloading our Postman collection and using a sandbox Vault, which is a copy of your production Vault. Learn more about [Vault Sandboxes in Vault Help](https://platform.veevavault.help/en/gr/48988).

This collection allows you to execute the basic commands laid out in the steps below and verify the results in your Vault. Click the button below to import the collection into Postman.

  

[Run in Postman](https://god.gw.postman.com/run-collection/25881067-751d9171-bee8-40ff-82f2-c47cab21893c?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D25881067-751d9171-bee8-40ff-82f2-c47cab21893c%26entityType%3Dcollection%26workspaceId%3Db6acb714-2d38-4ade-b8f4-d64991a8bb3a)

## Execute MDL Commands {#Execute_MDL_Commands}

To execute a MDL command, send a `POST` request to the [Execute MDL Script](/vault-api/api-reference/26.1/metadata-definition-language-mdl/execute-mdl-script#Execute_MDL) endpoint.

```
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/json" \
--data-binary @"mdl.txt" \
https://myvault.veevavault.com/api/mdl/execute

```

You can execute MDL commands one at a time or in a script. When executed as a script, MDL executes each command sequentially.

<Aside>Even when executing MDL commands in a script, MDL does not support transactionality.</Aside>

## Step 1: Create a Picklist {#Create_Picklist}

You'll first need to create a *Picklist* for your Vault. The following example creates a single `Picklistentry` in the `Picklist` component. Learn more about the MDL Picklist component.

<Steps>
1. To create a picklist named `vMDL Options`, enter the following `RECREATE` command:

```
RECREATE Picklist vmdl_options__c (
  label('vMDL Options'),
  active(true),
  Picklistentry hello_world__c(
    value('hello world'),
    order(0),
    active(true)
  )
);

```

2. Navigate to **Business Admin > Picklists** to confirm that the *vMDL Options* picklist exists in your Vault.

</Steps>

## Step 2: Create an Object {#MDL_Get_Started_Create_Object}

Now that you've created a *Picklist*, you're ready to create a Vault Object that uses the picklist. Learn more about the MDL Object component.

<Steps>
1. Enter the following `RECREATE` command:

```
RECREATE Object vmdl_hello_world__c (
   label('vMDL Hello World'),
   label_plural('vMDL Hello World'),
   active(true),
   description("This is sample object created for the MDL 'Getting Started' guide."),
   help_content(),
   in_menu(true),
   allow_attachments(false),
   enable_esignatures(false),
   audit(false),
   order(0),
   dynamic_security(false),
   system_managed(false),
   available_lifecycles(),
   object_class('base'),
   allow_types(false),
   user_role_setup_object(),
   Field option__c(
      label('Option'),
      type('Picklist'),
      active(true),
      required(false),
      unique(false),
      list_column(false),
      order(14),
      multi_value(false),
      picklist('Picklist.vmdl_options__c'))
);

```

2. Log in to your Vault.

3. Navigate to **Business Admin > Objects** to confirm that the *vMDL Hello World* object exists in your Vault.

<ThemeImage srcLight="/images/mdl/vMDLHelloWorldObject.png" srcDark="/images/mdl/vMDLHelloWorldObject.png" alt="vMDL Hello World Object"></ThemeImage>

</Steps>

## Step 3: Create an Object Record {#MDL_Get_Started_Create_Object_Record}

Now that you've created the necessary components, you'll want to create a *vMDL Hello World* object record in your Vault.

You can do this with the Postman collection or manually in the Admin UI.

<Steps>
1. Log into your Vault.

2. Navigate to **Business Admin > Objects > vMDL Hello World**.

3. Click **Create**.

4. Enter a **Name** for the object record.

5. Select **hello world** from the **Option** picklist.

6. Click **Save**.

<ThemeImage srcLight="/images/mdl/vMDLHelloWorldRecord.png" srcDark="/images/mdl/vMDLHelloWorldRecord.png" alt="vMDL Hello World Record"></ThemeImage>

</Steps>

## Step 4: Alter the Object and Picklist {#MDL_Get_Started_Alter_Object_Picklist}

Next, you'll use a single statement to modify both the *Object* and *Picklist* simultaneously.

<Steps>
1. Enter an `ALTER` command to add a second picklist entry and modify the initial entry. You should manually enter a value before running the MDL command for the new picklist entry's value.

```
ALTER Picklist vmdl_options__c (
  label('vMDL Options'),
  MODIFY Picklistentry hello_world__c(
    value('Hello World.'),
    order(0)
  ),
  ADD Picklistentry hello_worldv2__c(
    value('ENTER ANY VALUE'),
    order(1),
    active(true)
  )
);

```

<ThemeImage srcLight="/images/mdl/vMDLHelloWorldAlter_Picklist.png" srcDark="/images/mdl/vMDLHelloWorldAlter_Picklist.png" alt="vMDL Hello World Alter Picklist"></ThemeImage>

2. Use the `ALTER` command to add four new object fields.

```
ALTER Object vmdl_hello_world__c (
  ADD Field hello1__c(
    label('Hello 1'),
    type('String'),
    active(true),
    required(false),
    list_column(false),
    unique(false),
    order(0)),
  ADD Field hello2__c(
    label('Hello 2'),
    type('String'),
    active(true),
    required(false),
    list_column(false),
    unique(false),
    order(0)),
  ADD Field hello3__c(
    label('Hello 3'),
    type('String'),
    active(true),
    required(false),
    list_column(false),
    unique(false),
    order(0)),
  ADD Field hello4__c(
    label('Hello 4'),
    type('String'),
    active(true),
    required(false),
    list_column(false),
    unique(false),
    order(0))
);

```

</Steps>

## Step 5: Create an Object Record with New Fields {#MDL_Get_Started_Create_Object_Record_New_File}

Return to your Vault to create a new *vMDL Hello World* record. You will see the new picklist entry options as well as the four new fields on the object record.

You can do this with the Postman collection or manually in the Admin UI.

<Steps>
1. Log into your Vault.

2. Navigate to **Business Admin > Objects > vMDL Hello World**.

3. Click **Create**.

4. Fill in the record information: **Name**, **Hello 1 - 4**, and **Options** fields.

5. Click **Save**.

<ThemeImage srcLight="/images/mdl/vMDLHelloWorldObject_Fields.png" srcDark="/images/mdl/vMDLHelloWorldObject_Fields.png" alt="vMDL Hello World Object Fields"></ThemeImage>

</Steps>

## Step 6: Delete the Object Records {#MDL_Get_Started_Delete_Object_Record}

Now that you have created *vMDL Hello World* records with the original and altered fields, you can delete the object records.

<Steps>
1. Log in to your Vault.

2. Navigate to **Business Admin > Objects > vMDL Hello World**.

3. From the **Actions** menu, click **Delete**.

</Steps>

## Step 7: Drop Picklist and Object Components {#MDL_Get_Started_Drop_Picklist_Object_Components}

To delete both the object and picklist components, use the `DROP` command. Note that you must delete the object records to delete the components.

```
DROP Object vmdl_hello_world__c;
DROP Picklist vmdl_options__c;

```


---

**Previous:** [Overview](/mdl/documentation/overview)  
**Next:** [Explanations](/mdl/documentation/explanations)