# Introduction to REST API

## Overview

Our REST API can be used to interact with our services programmatically. For instance, DT Studio, our easy-to-use device management web app, is itself entirely built upon the REST API. Therefore, everything you can do in DT Studio, from moving devices between projects and managing Service Accounts, can also be done via our REST API.

## First Steps

The only thing you need to get started using our REST API is a Service Account with sufficient permissions for the task you want to do. While subsequent Service Accounts can be managed through the REST API itself, the initial account must be set up using DT Studio as an entry point.

Read our guide on [Creating a Service Account](/service-accounts/creating-a-service-account.md) to get started.

## Start Using our REST API

Once in possession of a Service Account, a comprehensive list of every endpoint available can be found in our [REST API Reference](https://developer.disruptive-technologies.com/api) documentation.

### Shorthand Base URL

All our REST API calls are extensions of a base URL used in either long- or short-form.

* `https://api.d21s.com/v2`
* `https://api.disruptive-technologies.com/v2`

This is also true for our [Sensor Emulator](/sensor-emulator.md) API, an extension for the main REST API under a separate URL.

* `https://emulator.d21s.com/v2`
* `https://emulator.disruptive-technologies.com/v2`

### Authentication

Our REST API supports two methods of authentication, both using a Service Account for access control.

* **Basic Auth:** A simple username- and password-style authentication, handy for quick prototyping.
* **OAuth2 Flow:** A robust exchange of credentials for an access token used to authenticate.

We recommend using the OAuth2 authentication flow when integrating with our REST API. Once implemented, OAuth2 makes sending HTTP Requests both simple and secure.

Head over to our [REST API Authentication](/authentication.md) section to get started.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.developer.disruptive-technologies.com/introduction-to-rest-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
