К содержанию
TelegaFirst

Для AI-агентов: markdown этой страницы — /docs/api-op-getentitlements.mdиндекс документации — /llms.txt

getEntitlements

Обновлено

GET /api/v1/entitlements

getEntitlements

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

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["entitlements"]

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

ПолеЗначение
0.in"query"
0.name"user_id"
0.requiredtrue
0.schema0.schema

Тело запроса

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

Ответы

ПолеЗначение
200.content.application/json.schemaEntitlementResponse
200.description"Current entitlement snapshot for a user"
200.headers.X-Bot-Username.description"Active tenant public bot username, when available"
200.headers.X-Bot-Username.schema200.headers.X-Bot-Username.schema
200.headers.X-Client-Slug.description"Active tenant public slug, when available"
200.headers.X-Client-Slug.schema200.headers.X-Client-Slug.schema
200.headers.X-RateLimit-Limit.description"Computed request budget"
200.headers.X-RateLimit-Limit.schema200.headers.X-RateLimit-Limit.schema
200.headers.X-RateLimit-Remaining.description"Remaining budget or unknown"
200.headers.X-RateLimit-Remaining.schema200.headers.X-RateLimit-Remaining.schema
200.headers.X-RateLimit-Reset.description"Budget reset Unix timestamp"
200.headers.X-RateLimit-Reset.schema200.headers.X-RateLimit-Reset.schema

Ошибки

ПолеЗначение
400.content.application/problem+json.schemaProblemDetails
400.description"INVALID_REQUEST: user_id query parameter is required"
401.content.application/problem+json.schemaProblemDetails
401.description"Missing, invalid, expired or revoked authentication"
403.content.application/problem+json.schemaProblemDetails
403.description"Required scope, plan or resource policy refused the caller"
404.content.application/problem+json.schemaProblemDetails
404.description"RESOURCE_NOT_FOUND: external app mapping is absent/unconfirmed or resolved user does not belong to this tenant"
413.content.application/problem+json.schemaProblemDetails
413.description"PAYLOAD_TOO_LARGE or ITEM_COUNT_EXCEEDED: resource policy cap exceeded"
429.content.application/problem+json.schemaProblemDetails
429.description"RATE_LIMIT_EXCEEDED or RATE_LIMIT_UNAVAILABLE: resource limiter refuses or fails closed"
429.headers.Retry-After.description"Seconds supplied by resource guard when available"
429.headers.Retry-After.schema429.headers.Retry-After.schema
500.content.application/problem+json.schemaProblemDetails
500.description"INTERNAL_ERROR: unexpected storage or service failure"

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

ПолеЗначение
operationId"getEntitlements"
tags["entitlements"]
x-idempotency"none"