2021-02-25 22:48:24 +00:00
---
layout: docs
page_title: Consul-Terraform-Sync API
description: >-
2022-09-06 23:00:09 +00:00
Consul-Terraform-Sync provides an API interface that lets you query CTS instance health, check CTS instance status, and run CTS tasks.
2021-02-25 22:48:24 +00:00
---
2022-09-06 23:00:09 +00:00
# Consul-Terraform-Sync API Overview
2021-02-25 22:48:24 +00:00
2022-09-06 23:00:09 +00:00
Consul-Terraform-Sync (CTS) provides an HTTP API interface for querying CTS instances and running and managing tasks.
2021-02-25 22:48:24 +00:00
2022-09-06 23:00:09 +00:00
## Port
2021-02-25 22:48:24 +00:00
The API is served at the default port `8558` or a different port if set with [`port` configuration](/docs/nia/configuration#port)
2022-09-06 23:00:09 +00:00
## Version prefix
2021-02-25 22:48:24 +00:00
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`
2022-09-06 23:00:09 +00:00
## Request ID
2021-02-25 22:48:24 +00:00
2022-09-06 23:00:09 +00:00
Each call to a CTS API endpoint returns a `request_id` field. The field is a string generated by the API. Example:
2021-02-25 22:48:24 +00:00
2022-09-06 23:00:09 +00:00
`"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](/docs/nia/usage/errors-ref) for additional information.