open-consul/website/content/docs/nia/api/index.mdx

30 lines
1.1 KiB
Plaintext

---
layout: docs
page_title: Consul-Terraform-Sync API
description: >-
Consul-Terraform-Sync provides an API interface that lets you query CTS instance health, check CTS instance status, and run CTS tasks.
---
# Consul-Terraform-Sync API Overview
Consul-Terraform-Sync (CTS) provides an HTTP API interface for querying CTS instances and running and managing tasks.
## Port
The API is served at the default port `8558` or a different port if set with [`port` configuration](/consul/docs/nia/configuration#port)
## Version prefix
All API routes are prefixed with `/v1/`. This documentation is for v1 of the API, which is the only version currently.
Example: `localhost:8558/v1/status`
## Request ID
Each call to a CTS API endpoint returns a `request_id` field. The field is a string generated by the API. Example:
`"request_id": "e1bc2236-3d0e-5f5e-dc51-164a1cf6da88"`
## Error messages
The API sends a response code in the 200 range if the call is successful. If the call is unsuccessful, the API sends an error message that includes additional information when possible. Refer to [Error Messages](/consul/docs/nia/usage/errors-ref) for additional information.