- Overview
- Plans and Features
- Getting Started
- API Docs template
- Overview
- Account
- Agent Pools
- Agent Tokens
- Applies
- Audit Trails
- Assessment Results
- Comments
- Configuration Versions
- Cost Estimates
- Feature Sets
- Invoices
- IP Ranges
- Notification Configurations
- OAuth Clients
- OAuth Tokens
- Organizations
- Organization Memberships
- Organization Tags
- Organization Tokens
- Plan Exports
- Plans
- Policies
- Policy Checks
- Policy Sets
- Policy Set Parameters
- Runs
- Run Triggers
- SSH Keys
- State Versions
- State Version Outputs
- Subscriptions
- Team Access
- Team Membership
- Team Tokens
- Teams
- User Tokens
- Users
- Variables
- VCS Events
- Workspaces
- Workspace-Specific Variables
- Workspace Resources
- Variable Sets
- Changelog
- Stability Policy
- Migrating to Terraform Cloud
- Overview
- Part 1: Overview of Our Recommended Workflow
- Part 2: Evaluating Your Current Provisioning Practices
- Part 3: How to Evolve Your Provisioning Practices
- Part 3.1: From Manual Changes to Semi-Automation
- Part 3.2: From Semi-Automation to Infrastructure as Code
- Part 3.3: From Infrastructure as Code to Collaborative Infrastructure as Code
- Part 3.4: Advanced Workflow Improvements
- Terraform Cloud Agents
- Intro to Terraform
- Configuration Language
- Terraform CLI
- Terraform Cloud
- Terraform Enterprise
- Provider Use
- Plugin Development
- Registry Publishing
- Integration Program
- Terraform Tools
- CDK for Terraform
- Glossary
Terraform Cloud
Other Docs
A new platform for documentation and tutorials is launching soon.
We are migrating Terraform documentation into HashiCorp Developer, our new developer experience.
»Team Token API
»Generate a new team token
Generates a new team token and overrides existing token if one exists.
Method | Path |
---|---|
POST | /teams/:team_id/authentication-token |
»Parameters
:team_id
(string: <required>
) - specifies the team ID for generating the team token
»Sample Request
curl \ --header "Authorization: Bearer $TOKEN" \ --header "Content-Type: application/vnd.api+json" \ --request POST \ https://app.terraform.io/api/v2/teams/team-BUHBEM97xboT8TVz/authentication-token
curl \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/vnd.api+json" \
--request POST \
https://app.terraform.io/api/v2/teams/team-BUHBEM97xboT8TVz/authentication-token
»Sample Response
{ "data": { "id": "4111797", "type": "authentication-tokens", "attributes": { "created-at": "2017-11-29T19:18:09.976Z", "last-used-at": null, "description": null, "token": "QnbSxjjhVMHJgw.atlasv1.gxZnWIjI5j752DGqdwEUVLOFf0mtyaQ00H9bA1j90qWb254lEkQyOdfqqcq9zZL7Sm0" }, "relationships": { "created-by": { "data": { "id": "user-62goNpx1ThQf689e", "type": "users" } } } } }
{
"data": {
"id": "4111797",
"type": "authentication-tokens",
"attributes": {
"created-at": "2017-11-29T19:18:09.976Z",
"last-used-at": null,
"description": null,
"token": "QnbSxjjhVMHJgw.atlasv1.gxZnWIjI5j752DGqdwEUVLOFf0mtyaQ00H9bA1j90qWb254lEkQyOdfqqcq9zZL7Sm0"
},
"relationships": {
"created-by": {
"data": {
"id": "user-62goNpx1ThQf689e",
"type": "users"
}
}
}
}
}
»Delete the team token
Method | Path |
---|---|
DELETE | /teams/:team_id/authentication-token |
»Parameters
:team_id
(string: <required>
) - specifies the team_id from which to delete the token
»Sample Request
curl \ --header "Authorization: Bearer $TOKEN" \ --header "Content-Type: application/vnd.api+json" \ --request DELETE \ https://app.terraform.io/api/v2/teams/team-BUHBEM97xboT8TVz/authentication-token
curl \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/vnd.api+json" \
--request DELETE \
https://app.terraform.io/api/v2/teams/team-BUHBEM97xboT8TVz/authentication-token