# Immuta V2 API

## Policy as code benefits

* **Reduces complexity**: The data source API has been simplified to only require the connection information in most instances and one endpoint for all database technologies.
* **Maintains less state**: Whether updating or creating, the same endpoint is used, and the same data is passed. No ids are required, so no additional state is required.
* **Requires fewer steps**: Only an API key is required; no additional authentication step is required before using the API.
* **Integrates with Git**: Define data sources and policies in files that can be tracked in Git and easily pushed to Immuta. Both JSON and YAML are supported for more flexibility. (For example, use YAML to add comments in files.)

## Endpoints and details

All of the API endpoints described below take either JSON or YAML, and the endpoint and payload are the same for both creating and updating data sources, policies, projects, and purposes.

* [`/api/v2/data`](/latest/developer-guides/api-intro/immuta-v2-api/data-source.md): Create data sources
* `/api/v2/policy`: Create policies
  * [Data policies](/latest/developer-guides/api-intro/immuta-v2-api/policies.md)
  * [Subscription policies](/latest/developer-guides/api-intro/immuta-v2-api/subscription-policy.md)
* [`/api/v2/project`](/latest/developer-guides/api-intro/immuta-v2-api/projects.md): Create projects
* [`/api/v2/purpose`](/latest/developer-guides/api-intro/immuta-v2-api/purposes.md): Create purposes


---

# 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://documentation.immuta.com/latest/developer-guides/api-intro/immuta-v2-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.
