﻿---
title: API conventions
description: The Java API Client uses a very consistent code structure, using modern code patterns that make complex requests easier to write and complex responses...
url: https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions
products:
  - Elasticsearch
  - Elasticsearch Client
---

# API conventions
The Java API Client uses a very consistent code structure, using modern code patterns that make complex requests easier to write and complex responses easier to process. The sections below explain these in details.
- [Package structure and namespace clients](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/package-structure)
- [Method naming conventions](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/method-naming)
- [Blocking and asynchronous clients](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/blocking-async)
- [Building API objects](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/building-objects)
- [Lists and maps](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/lists-maps)
- [Variant types](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/variant-types)
- [Object life cycles and thread safety](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/object-lifecycles)
- [Creating API objects from JSON data](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/loading-json)
- [Exceptions](https://docs-v3-preview.elastic.dev/elastic/elasticsearch-java/pull/1224/reference/api-conventions/exception-conventions)