# getSiteAccessTree

Source: <https://telegafirst.com/docs/api-op-getsiteaccesstree>
Locale: ru
releaseGitSha: fc570c76ffc9cb87e2462d45b14f5c1b52fbaf0d
sourceContentDigest: a2eac6588674bd8088e743c14da73d418ca03af6d1115c4df60cd9e4d91d7345
Version: 4

# getSiteAccessTree

`GET /api/v1/tools/site/access-rules/tree`

Show the access rules on the published pages of a host

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["site:read"] |

## Параметры запроса

| Поле | Значение |
| - | - |
| 0.in | "query" |
| 0.name | "host" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-9282e8e166fcf4e4947d4a6d2655e7c2a20b6fab54d39f1de25a5f35a1f27347) |

## Тело запроса

| Поле | Значение |
| - | - |
| Тело запроса | null |

## Ответы

| Поле | Значение |
| - | - |
| 200.content.application/json.schema | [SiteAccessTree](https://telegafirst.com/docs/schema-827b38aabc2f549cc249ff43bae4c5194ccdf136ba31f0ad374375a9c243cfaa) |
| 200.description | "Tenant site control-plane result" |
| 200.headers.X-Bot-Username.description | "Active bot username, when resolved" |
| 200.headers.X-Bot-Username.schema | [200.headers.X-Bot-Username.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-Client-Slug.description | "Active tenant slug, when resolved" |
| 200.headers.X-Client-Slug.schema | [200.headers.X-Client-Slug.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Limit.description | "Effective request budget" |
| 200.headers.X-RateLimit-Limit.schema | [200.headers.X-RateLimit-Limit.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Remaining.description | "Remaining request budget" |
| 200.headers.X-RateLimit-Remaining.schema | [200.headers.X-RateLimit-Remaining.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Reset.description | "Unix window reset in seconds" |
| 200.headers.X-RateLimit-Reset.schema | [200.headers.X-RateLimit-Reset.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 400.description | "host is missing or not a hostname" |
| 400.x-error-codes | \["VALIDATION\_ERROR"] |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 401.description | "Missing, invalid, revoked or conflicting credential; surface JWT is refused" |
| 401.x-error-codes | \["INVALID\_API\_KEY"] |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 403.description | "Missing scope, prohibited publishable credential or absent active bot" |
| 403.x-error-codes | \["INSUFFICIENT\_SCOPE","PUBLISHABLE\_KEY\_NOT\_ALLOWED","NO\_ACTIVE\_BOT"] |
| 404.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 404.description | "The host is not a site address of the business, or the business has no published page on it" |
| 404.x-error-codes | \["NOT\_FOUND"] |
| 413.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 413.description | "Resource policy size or item-count limit exceeded" |
| 413.x-error-codes | \["PAYLOAD\_TOO\_LARGE","ITEM\_COUNT\_EXCEEDED"] |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 429.description | "Resource rate budget exceeded or unavailable" |
| 429.headers.Retry-After.description | "Retry delay in seconds, when supplied by the limiter" |
| 429.headers.Retry-After.schema | [429.headers.Retry-After.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 429.x-error-codes | \["RATE\_LIMIT\_EXCEEDED","RATE\_LIMIT\_UNAVAILABLE"] |
| 500.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 500.description | "Unexpected internal failure" |
| 500.x-error-codes | \["INTERNAL\_ERROR"] |

## Дополнительные условия

| Поле | Значение |
| - | - |
| description | "site:read. For one host of the business (host from GET /tools/site/pages): each published page with the rules whose masks reach it (the most specific mask decides) and its blocks, each block with its rules; unmatched are rules whose mask covers no published page of this host; a rule acts on every host of the business and on any file, so an unmatched rule may still close a page of another host or files that are not pages (video, PDF), and it is not a reason to delete it. Read it before PUT to see what is already closed." |
| operationId | "getSiteAccessTree" |
| summary | "Show the access rules on the published pages of a host" |
| tags | \["site"] |
| x-idempotency.conflictStatus | null |
| x-idempotency.implementation | "none" |
| x-idempotency.replayStatus | null |
| x-idempotency.required | false |
| x-idempotency.scope | \[] |
| x-idempotency.ttlSeconds | null |
| x-pagination.queryParameters | \[] |
| x-pagination.supported | false |
| x-scope-semantics | "ALL" |
