Получение списка организаций федерации
Возвращает список организаций федерации и статус участия каждой из них. Запрос выполняется от имени организации, указанной в заголовке X-Yandex360-Org-Id.
Требуется одно из разрешений:
directory:read_federations— чтение данных о федерациях;directory:write_federations— управление федерациями.
Отправить запрос может администратор организации или сотрудник с ролью Менеджер федераций.
Request
GET
https://cloud-api.yandex.net/v1/directory/federations/{federation_id}/organizations
Path parameters
|
Name |
Description |
|
federation_id |
Type: string Идентификатор федерации (UUID). Pattern: Example: `` |
Query parameters
|
Name |
Description |
|
limit |
Type: integer Максимальное количество записей в ответе. Значение по умолчанию — Default: Min value: Max value: |
|
offset |
Type: integer Смещение от начала списка. Значение по умолчанию — Default: Min value: |
|
sort |
Type: string Порядок сортировки: по Pattern: Example: `` |
|
status |
Type: string Статусы участия, по которым фильтруется список: Несколько статусов перечисляются через запятую без пробела, например Pattern: Example: `` |
Headers
|
Name |
Description |
|
X-Yandex360-Org-Id |
Type: integer Организация, от имени которой выполняется запрос. Min value: |
Responses
200 OK
Участия получены.
Body
application/json
{
"total": 0,
"offset": 0,
"limit": 0,
"items": [
{
"membership_id": "example",
"federation_id": "example",
"member_organization_id": 0,
"initiator_organization_id": 0,
"status": "requested",
"created_at": "example",
"updated_at": "example"
}
]
}
|
Name |
Description |
|
items |
Type: OrganizationsItems Список записей об участии организаций в федерациях. Example
|
|
limit |
Type: integer Максимальное количество записей в ответе. |
|
offset |
Type: integer Смещение от начала списка. |
|
total |
Type: integer Общее количество записей, подходящих по параметрам запроса. |
FederationMembership
|
Name |
Description |
|
created_at |
Type: string Дата и время создания участия. Example: |
|
federation_id |
Type: string Идентификатор федерации (UUID). Example: |
|
initiator_organization_id |
Type: integer Идентификатор организации-инициатора приглашения. |
|
member_organization_id |
Type: integer Идентификатор организации-участника. |
|
membership_id |
Type: string Идентификатор участия (UUID). Example: |
|
status |
Type: string Статус участия. Возможные значения:
Enum: |
|
updated_at |
Type: string Дата и время последнего изменения участия. Example: |
Example
{
"membership_id": "example",
"federation_id": "example",
"member_organization_id": 0,
"initiator_organization_id": 0,
"status": "requested",
"created_at": "example",
"updated_at": "example"
}
OrganizationsItems
Список записей об участии организаций в федерациях.
Type: FederationMembership[]
Example
[
{
"membership_id": "example",
"federation_id": "example",
"member_organization_id": 0,
"initiator_organization_id": 0,
"status": "requested",
"created_at": "example",
"updated_at": "example"
}
]
400 Bad Request
Некорректный запрос.
Body
application/json
{
"error": "bad_request",
"description": "Bad request",
"message": "Bad request",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
401 Unauthorized
Пользователь не авторизован.
Body
application/json
{
"error": "unauthorized",
"description": "Unauthorized",
"message": "Unauthorized",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
403 Forbidden
Доступ к ресурсу запрещен. У пользователя или приложения недостаточно прав.
Body
application/json
{
"error": "forbidden",
"description": "Forbidden",
"message": "Forbidden",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
404 Not Found
Запрашиваемый ресурс не найден.
Body
application/json
{
"error": "not_found",
"description": "Not found",
"message": "Not found",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
422 Unprocessable Entity
Возможные ошибки:
- Feature unavailable
- Invalid data
Body
application/json
{
"error": "feature_unavailable",
"description": "Feature unavailable",
"message": "Feature unavailable",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|