Your variables should now look something like this:
:::image type="content" source="media/how-to-use-apis/variables-token-control.png" alt-text="Screenshot of the control plane variables, including a token." lightbox="media/how-to-use-apis/variables-token-control.png":::
---
## Add requests
Now that your `.http` file is set up, you can add requests to the Azure Digital Twin APIs.
Start by opening the [Azure Digital Twins REST API reference](/rest/api/azure-digitaltwins/). This documentation contains details of all the operations covered by the APIs. Navigate to the reference page of the request you want to run.
This article uses the [DigitalTwins Update API](/rest/api/digital-twins/dataplane/twins/digital-twins-update) from the data plane as an example.
1. **Add request template**: Copy the HTTP request shown in the reference documentation.
:::image type="content" source="media/how-to-use-apis/copy-request.png" alt-text="Screenshot of the HTTP request in the Digital Twins API documentation." lightbox="media/how-to-use-apis/copy-request.png":::
In Visual Studio, paste the request in a new line below the variables in your `.http` file.
1. **Add parameters**: Look at the **URI Parameters** section of the reference documentation to see which parameter values are needed by the request. You can replace some with the [variables](#add-variables) you created earlier, and fill in other parameter values as appropriate. To reference a variable, put the variable name in double curly braces, like `{{variable}}`. For more information, see [Variables](/aspnet/core/test/http-files#variables).
>[!NOTE]
>For data plane requests, `digitaltwins-hostname` is also a parameter. Replace this parameter value with `{{hostName}}` to use the value of your host name variable.
Here's how this step looks in an example request:
:::image type="content" source="media/how-to-use-apis/add-parameters.png" alt-text="Screenshot of the request with parameters in Visual Studio." lightbox="media/how-to-use-apis/add-parameters.png":::
1. **Add authorization**: To specify authentication with your bearer token variable, add the following line (exactly as written) directly underneath the request.