vault/website/content/api-docs/secret/identity/lookup.mdx
Anton Averchenkov f4f0412b6a
[docs] Convert titles to sentense case (#21426)
* Convert documentation titles to sentense case

* Docker, Google, Foundry, Cloud proper case
2023-06-30 19:22:07 -04:00

132 lines
2.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: api
page_title: 'Identity Secret Backend: Lookup - HTTP API'
description: |-
This is the API documentation for entity and group lookups from identity
store.
---
## Lookup an entity
This endpoint looks up an entity based on the given criteria. The criteria can
be `name`, `id`, `alias_id`, or a combination of `alias_name` and
`alias_mount_accessor`.
| Method | Path |
| :----- | :------------------------ |
| `POST` | `/identity/lookup/entity` |
### Parameters
- `name` `(string: "")` Name of the entity.
- `id` `(string: "")` - ID of the entity.
- `alias_id` `(string: "")` - ID of the alias.
- `alias_name` `(string: "")` - Name of the alias. This should be supplied in
conjunction with `alias_mount_accessor`.
- `alias_mount_accessor` `(string: "")` - Accessor of the mount to which the
alias belongs to. This should be supplied in conjunction with `alias_name`.
### Sample payload
```json
{
"id": "043fedec-967d-b2c9-d3af-0c467b04e1fd"
}
```
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
--data @payload.json \
http://127.0.0.1:8200/v1/identity/lookup/entity
```
### Sample response
```json
{
"data": {
"aliases": [],
"creation_time": "2017-11-13T21:01:33.543497Z",
"direct_group_ids": [],
"group_ids": [],
"id": "043fedec-967d-b2c9-d3af-0c467b04e1fd",
"inherited_group_ids": [],
"last_update_time": "2017-11-13T21:01:33.543497Z",
"merged_entity_ids": null,
"metadata": null,
"name": "entity_43cc451b",
"policies": null
}
}
```
## Lookup a group
This endpoint looks up a group based on the given criteria. The criteria can
be `name`, `id`, `alias_id`, or a combination of `alias_name` and
`alias_mount_accessor`.
| Method | Path |
| :----- | :----------------------- |
| `POST` | `/identity/lookup/group` |
### Parameters
- `name` `(string: "")` Name of the group.
- `id` `(string: "")` - ID of the group.
- `alias_id` `(string: "")` - ID of the alias.
- `alias_name` `(string: "")` - Name of the alias. This should be supplied in
conjunction with `alias_mount_accessor`.
- `alias_mount_accessor` `(string: "")` - Accessor of the mount to which the
alias belongs to. This should be supplied in conjunction with `alias_name`.
### Sample payload
```json
{
"id": "70a4bdef-9da3-4460-b524-bb08542eef25"
}
```
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
--data @payload.json \
http://127.0.0.1:8200/v1/identity/lookup/group
```
### Sample response
```json
{
"data": {
"alias": {},
"creation_time": "2017-11-13T21:06:44.475587Z",
"id": "70a4bdef-9da3-4460-b524-bb08542eef25",
"last_update_time": "2017-11-13T21:06:44.475587Z",
"member_entity_ids": [],
"member_group_ids": null,
"metadata": null,
"modify_index": 1,
"name": "group_eaf2aab1",
"policies": null,
"type": "internal"
}
}
```