2017-03-21 22:24:29 +01:00
|
|
|
---
|
2017-04-03 19:53:38 +02:00
|
|
|
layout: "enterprise"
|
2017-04-07 05:59:58 +02:00
|
|
|
page_title: "Users - API - Terraform Enterprise"
|
2017-03-21 22:50:17 +01:00
|
|
|
sidebar_current: "docs-enterprise-api-users"
|
|
|
|
description: |-
|
|
|
|
Users are both users and organizations in Terraform Enterprise. They are the parent resource of all resources.
|
2017-03-21 22:24:29 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# Users API
|
|
|
|
|
2017-03-21 22:50:17 +01:00
|
|
|
Users are both users and organizations in Terraform Enterprise. They are the
|
2017-03-21 22:24:29 +01:00
|
|
|
parent resource of all resources.
|
|
|
|
|
2017-03-23 19:03:36 +01:00
|
|
|
Currently, only the retrieval of users is available on the API. Additionally,
|
2017-04-07 05:59:58 +02:00
|
|
|
only Vagrant box resources will be listed. Boxes will be returned based on
|
|
|
|
permissions over the organization, or user.
|
2017-03-21 22:24:29 +01:00
|
|
|
|
2017-04-07 05:59:58 +02:00
|
|
|
## Read User
|
2017-03-21 22:24:29 +01:00
|
|
|
|
2017-04-07 05:59:58 +02:00
|
|
|
This endpoint retrieves information about a single user.
|
2017-03-21 22:24:29 +01:00
|
|
|
|
2017-04-07 05:59:58 +02:00
|
|
|
| Method | Path |
|
|
|
|
| :----- | :------------- |
|
|
|
|
| `GET` | `/user/:username` |
|
2017-03-21 22:24:29 +01:00
|
|
|
|
2017-04-07 05:59:58 +02:00
|
|
|
### Parameters
|
2017-03-21 22:24:29 +01:00
|
|
|
|
2017-04-07 05:59:58 +02:00
|
|
|
- `:username` `(string: <required>)` - Specifies the username to search. This is
|
|
|
|
specified as part of the URL.
|
2017-03-21 22:24:29 +01:00
|
|
|
|
2017-04-07 05:59:58 +02:00
|
|
|
### Sample Request
|
|
|
|
|
|
|
|
```text
|
|
|
|
$ curl \
|
|
|
|
--header "X-Atlas-Token: ..." \
|
|
|
|
https://atlas.hashicorp.com/api/v1/user/my-user
|
|
|
|
```
|
|
|
|
|
|
|
|
### Sample Response
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"username": "sally-seashell",
|
|
|
|
"avatar_url": "https://www.gravatar.com/avatar/...",
|
|
|
|
"profile_html": "Sally is...",
|
|
|
|
"profile_markdown": "Sally is...",
|
|
|
|
"boxes": []
|
|
|
|
}
|
|
|
|
```
|