لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/pages/resolve.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Find a page by path
GET /v1/pages/resolve
Finds a page by its path within the given site and returns its ID. The found page is additionally read with the permissions of the user the key was issued for.
Requires the landing scope. A read-only key works.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParametersiteId (query) |
Typenumber | Requiredyes | DescriptionSite ID. List: GET /v1/sites |
Parameterpath (query) |
Typestring | Requiredyes | DescriptionPage path within the site, for example /about/ |
Parameterscope (query) |
Typestring | Requiredno | DescriptionSite type: KNOWLEDGE — knowledge base, GROUP — workgroup site, MAINPAGE — main page. Omit the parameter for pages of other sites |
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/pages/resolve?siteId=3&path=%2Fabout%2F" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/pages/resolve?siteId=3&path=%2Fabout%2F" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const response = await fetch("https://vibecode.bitrix24.com/v1/pages/resolve?siteId=3&path=%2Fabout%2F", {
headers: {"X-Api-Key": "YOUR_API_KEY"},
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)
console.log(result.data)
JavaScript — OAuth application
const response = await fetch("https://vibecode.bitrix24.com/v1/pages/resolve?siteId=3&path=%2Fabout%2F", {
headers: {"X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN"},
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)
console.log(result.data)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionSearch result |
Fielddata.pageId |
Typenumber | DescriptionID of the found page |
Response example
{
"success": true,
"data": {
"pageId": 59
}
}
Error response example
404 — the site has no page at this path:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Page not found at this path."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionSite not found. — site siteId does not exist |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionPage not found at this path. — the site has no page at this path |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionPage not found. — a page was found at the path, but the key's user cannot read it, or it belongs to another site |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionPage or folder not found. — Bitrix24 did not find the page during the search |
| HTTP400 | CodeMISSING_REQUIRED_FIELDS |
DescriptionsiteId and path are required; siteId must be a positive safe integer. — siteId or path is missing, or siteId is not a positive integer |
| HTTP400 | CodeINVALID_SCOPE |
Descriptionscope must be KNOWLEDGE, GROUP or MAINPAGE, or omitted. — scope is not KNOWLEDGE, GROUP or MAINPAGE |
| HTTP422 | CodeBITRIX_NO_EFFECT |
DescriptionBitrix24 returned an invalid resolved page id. — Bitrix24 returned an invalid page ID |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the request. The error text comes from Bitrix24 |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the landing scope |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe Bitrix24 user the key was issued for has no permission to read the site |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe key in X-Api-Key is not found or has been revoked |
| HTTP409 | CodeLANDING_MODULE_NOT_ENABLED |
DescriptionThe Sites module is not available on the Bitrix24 account |
| HTTP409 | CodePORTAL_ADDRESS_CHANGED |
DescriptionThe on-premise Bitrix24 moved to a new address, but the key's webhook was issued for the old one. Reissue the key's webhook |
| HTTP429 | CodeRATE_LIMITED |
DescriptionThe Bitrix24 request limit is exceeded. Retry the request in 1-2 seconds |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 did not respond or returned a server error |
| HTTP503 | CodeBITRIX_TIMEOUT |
DescriptionBitrix24 did not respond in time |
Full list of general API errors — Errors.