You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/terraform-docs-common/docs/cloud-docs/integrations/service-now/service-catalog-terraform/index.mdx
2.Onyourorganization'sVCSprovidersettingspage(**Settings** > **VCS Providers**), find the OAuth Token ID for the VCS provider(s) that you intend to use with the ServiceNow integration. HCP Terraform uses the OAuth token ID to identify and authorize the VCS provider. **Save the OAuth token ID for later.**
@@ -224,8 +219,7 @@ update request items.
224
219
### Team Tokens
225
220
226
221
Team-scoped tokens can help you manage a team's access to things in HCP Terraform, but team tokens are limited within the ServiceNow context. We recommend only using one API team token, regardless of the number of teams accessing ServiceNow.
227
-
228
-
You can assign teams and their associated tokens permission levels on specific projects. To learn more about the different permissions necessary to provision resources, refer to [Permissions](/terraform/cloud-docs/users-teams-organizations/permissions#project-permissions). To learn more about API tokens, refer to [Team tokens](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/api-tokens#team-api-tokens).
222
+
To learn more about API tokens, refer to [Team tokens](/terraform/cloud-docs/users-teams-organizations/api-tokens#team-api-tokens).
Copy file name to clipboardExpand all lines: content/terraform-enterprise/v202505-1/docs/enterprise/api-docs/index.mdx
+44-10Lines changed: 44 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,27 +38,52 @@ source: terraform-docs-common
38
38
39
39
[JSON API error object]: https://jsonapi.org/format/#error-objects
40
40
41
-
# HCP Terraform API documentation
41
+
# API Documentation
42
+
43
+
## HCP Terraform API
42
44
43
45
HCP Terraform provides an API for a subset of its features. If you need assistance or want to submit a feature request, visit the [HashiCorp support center](https://support.hashicorp.com/hc/en-us) and open a ticket.
44
46
45
47
-> **Note:** Before planning an API integration, consider whether [the `tfe` Terraform provider](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs) meets your needs. It can't create or approve runs in response to arbitrary events, but it's a useful tool for managing your organizations, teams, and workspaces as code.
46
48
47
49
HashiCorp provides a [stability policy](/terraform/enterprise/api-docs/stability-policy) for the HCP Terraform API, ensuring backwards compatibility for stable endpoints. The [changelog](/terraform/enterprise/api-docs/changelog) tracks changes to the API for HCP Terraform and Terraform Enterprise.
48
50
51
+
## API Types
52
+
53
+
HCP Terraform provides two types of API endpoints:
54
+
55
+
-**Application Endpoints** - These are the primary endpoints used for interacting with HCP Terraform resources such as workspaces, runs, and variables. Unless otherwise specified, all documentation on this site refers to application endpoints.
56
+
-**System Endpoints** - These endpoints are used for system-level operations, such as health checks and usage reporting. System endpoints have different authentication and rate limiting requirements than application endpoints.
57
+
58
+
### System Endpoints Overview
59
+
60
+
The following table lists the available system API endpoints in Terraform Enterprise:
61
+
62
+
| Endpoint | Description | Path | Documentation |
63
+
|---------|-------------|------|---------------|
64
+
| Ping | Health check endpoint to verify system operation |`/api/v1/ping`|[System Ping API](/terraform/enterprise/api-docs/ping)|
65
+
| Usage/Bundle | Retrieves usage data bundle |`/api/v1/usage/bundle`|[System Usage/Bundle API](/terraform/enterprise/api-docs/usage-bundle)|
66
+
67
+
-> **Terraform Enterprise Only:** The System API is exclusive to Terraform Enterprise. It enables access to deployment configuration and data.
68
+
49
69
## Authentication
50
70
51
-
All requests must be authenticated with a bearer token. Use the HTTP header `Authorization` with the value `Bearer <token>`. If the token is absent or invalid, HCP Terraform responds with [HTTP status 401][401] and a [JSON API error object][]. The 401 status code is reserved for problems with the authentication token; forbidden requests with a valid token result in a 404.
71
+
### Application Endpoints
72
+
73
+
For application endpoints, all requests must be authenticated with a bearer token. Use the HTTP header `Authorization` with the value `Bearer <token>`. If the token is absent or invalid, HCP Terraform responds with [HTTP status 401][401] and a [JSON API error object][]. The 401 status code is reserved for problems with the authentication token; forbidden requests with a valid token result in a 404.
52
74
53
75
You can use the following types of tokens to authenticate:
54
76
55
-
-[User tokens](/terraform/enterprise/users-teams-organizations/users#api-tokens) —each HCP Terraform user can have any number of API tokens, which can make requests on their behalf.
56
-
-[Team tokens](/terraform/enterprise/users-teams-organizations/api-tokens#team-api-tokens) —each team can have one API token at a time. This is intended for performing plans and applies via a CI/CD pipeline.
57
-
-[Organization tokens](/terraform/enterprise/users-teams-organizations/api-tokens#organization-api-tokens) —each organization can have one API token at a time. This is intended for automating the management of teams, team membership, and workspaces. The organization token cannot perform plans and applies.
77
+
-[User tokens](/terraform/enterprise/users-teams-organizations/users#api-tokens) —each HCP Terraform user can have any number of API tokens, which can make requests on their behalf.
78
+
-[Team tokens](/terraform/enterprise/users-teams-organizations/api-tokens#team-api-tokens) —each team can have one API token at a time. This is intended for performing plans and applies via a CI/CD pipeline.
79
+
-[Organization tokens](/terraform/enterprise/users-teams-organizations/api-tokens#organization-api-tokens) —each organization can have one API token at a time. This is intended for automating the management of teams, team membership, and workspaces. The organization token cannot perform plans and applies.
page_title: System Ping API reference for Terraform Enterprise
3
+
description: >-
4
+
Use the Ping endpoint to check the health of the System API of your Terraform Enterprise system.
5
+
---
6
+
7
+
# `/ping` endpoint reference
8
+
9
+
This endpoint provides a simple health check to verify that the Terraform Enterprise system is operational. Authentication is required to use this endpoint.
page_title: System Usage/Bundle API reference for Terraform Enterprise
3
+
description: >-
4
+
Use the Usage/Bundle endpoint to download a usage bundle.
5
+
---
6
+
7
+
# `/usage/bundle` endpoint reference
8
+
9
+
This endpoint provides a usage bundle. For more information about the product usage data structure and the specific metrics that Terraform Enterprise collects, refer to the [Terraform Enterprise usage data reference](/terraform/enterprise/deploy/reference/product-data).
|[200][]| JSON usage bundle | Successfully retrieved usage data |
27
+
|[403][]|[JSON API error object][]| Not authorized to access this endpoint |
28
+
|[429][]|[JSON API error object][]| Too many requests |
29
+
|[500][]|[JSON API error object][]| Internal server error |
30
+
31
+
@include "api-code-blocks/system-api.mdx"
32
+
33
+
## Related Resources
34
+
35
+
*[Enable automated product usage reports](/terraform/enterprise/deploy/manage/product-report) - Instructions for configuring Terraform Enterprise to automatically send product usage data to HashiCorp
36
+
*[Generate product usage report using the CLI](/terraform/enterprise/deploy/reference/cli#generate-product-usage-report) - Instructions for generating product usage reports manually
Copy file name to clipboardExpand all lines: content/terraform-enterprise/v202505-1/docs/enterprise/deploy/reference/cli.mdx
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,6 +164,42 @@ Each specific run of the admin `usage-report` command generates the product usag
164
164
165
165
To send product usage reports to HashiCorp, visit the [**Licensing utilization reporting** page](https://portal.cloud.hashicorp.com/license-utilization/reports/create) and use the upload form.
166
166
167
+
## Manage admin API tokens
168
+
169
+
Terraform Enterprise provides commands to manage authentication tokens for the Admin API, which allows programmatic access to administrative functions.
170
+
171
+
### Generate an admin API token
172
+
173
+
To create a new admin API token, use the `admin api-token generate` command with a required description that helps identify the token's purpose or owner:
To list all existing admin API tokens along with their metadata (excluding the actual token value), use:
188
+
189
+
```shell-session
190
+
$ tfectl admin api-token list
191
+
```
192
+
193
+
This command displays the token ID, creation date, expiration date, last used date, and description for each token. The output is ordered by creation date.
194
+
195
+
### Revoke an admin API token
196
+
197
+
To revoke an admin API token, use the `admin api-token revoke` command with the token ID (obtained from the `list` command):
198
+
199
+
```shell-session
200
+
$ tfectl admin api-token revoke --id "1"
201
+
```
202
+
167
203
## List all Terraform Enterprise installation nodes
168
204
169
205
To get a list of valid node values, use the following command:
System API requests must be authenticated with a bearer token generated specifically for this API using the `tfectl admin api-token generate` command. For more information on the token creation, and management, refer to the [tfectl documentation](/terraform/enterprise/deploy/reference/cli).
2
+
Use the HTTP Header `Authorization` with the value `Bearer <token>`.
[JSON API error object]: https://jsonapi.org/format/#error-objects
9
+
10
+
## System API Overview
11
+
12
+
-> **Terraform Enterprise Only:** The System API is exclusive to Terraform Enterprise. It enables access to deployment configuration and data.
13
+
14
+
This API is distinct from the regular Admin API and the Backup and Restore API, with its own authentication mechanism.
15
+
16
+
## Authentication
17
+
@include "api-code-blocks/authentication.mdx"
18
+
19
+
## Rate Limiting
20
+
@include "api-code-blocks/rate-limit.mdx"
21
+
22
+
## Port Configuration
23
+
24
+
By default, the System API is accessible on HTTPS port `8443`. This port can be configured through the `TFE_ADMIN_HTTPS_PORT` environment variable in your deployment configuration.
25
+
26
+
Refer to [Network settings](/terraform/enterprise/deploy/reference/configuration#network-settings) in the configuration reference for more information about network configuration.
27
+
28
+
## Versioning
29
+
30
+
The System API is versioned under the `/api/v1` prefix and is separate from the main Terraform Enterprise API.
31
+
32
+
For example, if the API endpoint documentation defines the path `/ping` then the full path is `/api/v1/ping`.
0 commit comments