terraform/website/source/docs/enterprise/api/index.html.md

60 lines
1.7 KiB
Markdown
Raw Normal View History

---
2017-04-03 19:53:38 +02:00
layout: "enterprise"
2017-04-07 05:59:58 +02:00
page_title: "API - Terraform Enterprise"
2017-03-21 22:50:17 +01:00
sidebar_current: "docs-enterprise-api"
description: |-
Terraform Enterprise provides an API for a **subset of features**.
---
2017-03-21 22:50:17 +01:00
# Terraform Enterprise API Documentation
2017-04-07 05:59:58 +02:00
Terraform Enterprise provides an API for a **subset of features** available. For
questions or requests for new API features please email
[support@hashicorp.com](mailto:support@hashicorp.com).
2017-04-07 05:59:58 +02:00
The list of available endpoints are on the navigation.
## Authentication
2017-04-07 05:59:58 +02:00
All requests must be authenticated with an `X-Atlas-Token` HTTP header. This
token can be generated or revoked on the account tokens page. Your token will
have access to all resources your account has access to.
For organization level resources, we recommend creating a separate user account
that can be added to the organization with the specific privilege level
required.
## Response Codes
2017-04-07 05:59:58 +02:00
Standard HTTP response codes are returned. `404 Not Found` codes are returned
for all resources that a user does not have access to, as well as for resources
that don't exist. This is done to avoid a potential attacker discovering the
existence of a resource.
## Errors
Errors are returned in JSON format:
2017-04-07 05:59:58 +02:00
```json
{
"errors": {
"name": [
"has already been taken"
]
}
}
```
## Versioning
2017-04-07 05:59:58 +02:00
The API currently resides under the `/v1` prefix. Future APIs will increment
this version leaving the `/v1` API intact, though in the future certain features
may be deprecated. In that case, ample notice to migrate to the new API will be
provided.
## Content Type
2017-04-07 05:59:58 +02:00
The API accepts namespaced attributes in either JSON or
`application/x-www-form-urlencoded`. We recommend using JSON, but for simplicity
form style requests are supported.