ArticleIntermediate12 minUpdated 2026-10-09

Connecting a 1C base through OData

Publishing the base on a web server, turning on OData, a separate user with read rights, entering the address in Gleyk, what the connector reads and how to handle typical errors.

Gleyk reads a 1C base through the standard OData interface, which is part of the 1C:Enterprise 8.3 platform. To connect, you need a base published on a web server, OData turned on, a separate user and the publication address. A step-by-step version with branches is in the wizard Connect 1C to Gleyk.

Step 1. Publishing the base on a web server

The base is published on IIS (Windows) or Apache from the Designer ("Administration", "Publish on web server") or with the webinst utility from the bin directory of the installed platform. In a Russian-language client these are the Конфигуратор and the items "Администрирование", "Публикация на веб-сервере". The publication directory then contains a default.vrd file with the ib attribute (the connection string) and web.config with the web server extension handler for the right platform version.

Requirements for the publication:

  • the bitness of the web server extension module matches the IIS application pool;
  • one pool runs one extension module of one platform version;
  • for a file base, the IIS_IUSRS group needs read access to the bin directory and modify access to the base directory;
  • the publication is available over HTTPS with a valid certificate if Gleyk reaches it from outside the local network.

Publications break after a platform update, because web.config keeps pointing at the module of the old version. This is the first thing to check on a 500 error.

If the base runs in 1C:Fresh, you do not need a web server: the provider has already published the base, OData is turned on in the application settings, and the service gives you the publication address.

Step 2. Turning on OData

default.vrd must contain the element <standardOdata enable="true" .../>. Then, in the base itself, you set the composition of the standard OData interface: which objects are published. In configurations built on the Standard Subsystems Library (БСП), this is done in "Administration", "Data synchronization", "Standard OData interface settings" (in the Russian client: "Администрирование", "Синхронизация данных", "Настройки стандартного интерфейса OData"), or in code with the method УстановитьСоставСтандартногоИнтерфейсаOData. Until the composition is set, the publication answers with code 200, but $metadata is empty.

Turn on the catalogs, documents, charts of accounts, accounting registers and information registers that you need for your questions. The data visible through OData is limited by the roles of the user on whose behalf the request is made.

Step 3. The 1C user

Create a separate user for Gleyk in the base, with standard authentication (login and password) and read-only rights to the objects you need. In Accounting, the supplied "Accountant" profile (Бухгалтер) works, or a separate profile made of read roles. If the user is restricted by departments, part of the data will be unavailable. Full rights are not needed. The connector writes to the base only through separately enabled tools and after confirmation in the chat, so write permissions are granted deliberately and separately.

Warning

Do not use the account of a live employee for the connector. A separate user lets you revoke access in one action and see its requests in the 1C log.

Step 4. Connecting in the platform

  1. Open "User settings", the "Connectors" section, click "New Connector" and select 1C:Enterprise.
  2. Enter a connection name and the publication address, for example https://host/buh/odata/standard.odata/. If you give the publication address without the /odata/standard.odata tail, Gleyk adds it itself.
  3. Enter the login and password of the 1C user. Basic authentication is used; if IIS is set up for Windows authentication, NTLM is supported. Secrets are stored encrypted and tied to the organization.
  4. Click "Check". Gleyk requests $metadata and shows the objects it finds.
  5. Save the connector and open its card: the status must be "Active".

After you save, the connector's tools appear for the organization's assistants and agents. If you have several bases (for example, several client companies of an accounting firm), each is connected as a separate base inside the connector, with its own address and credentials.

What the connector reads

The connector works from the published metadata of the specific base, with no ties to organizations or to the settings of a particular client:

  • catalogs (Catalog_…): counterparties, contracts, nomenclature, organizations;
  • documents (Document_…): sales, receipts, payment documents, with their tabular sections;
  • the chart of accounts (ChartOfAccounts_…);
  • accounting registers (AccountingRegister_…): postings, turnovers and balances through virtual tables;
  • information registers (InformationRegister_…).

On top of raw queries, ready-made tools are available: account balances at a date, a breakdown of turnovers on an account, month-close control, missing primary documents, possible duplicates, recurring operations, a counterparty card, an entity schema, and an arbitrary OData query with a filter tree. Answers contain exact amounts calculated on the platform side, and a reference to the source base and tool.

The URL length limit in IIS

IIS rejects a query string longer than about 2048 bytes (HTTP error 404.15, which is not visible in the 1C logs). A single filter like Ref_Key eq guid'…' takes about 70 bytes in URL encoding, so Gleyk sends filters on identifiers in batches of 20 and merges the result. In practice, 25 documents still fit into one request, but 37 did not. If you write OData queries yourself for testing, keep this limit in mind.

Troubleshooting

ResponseLikely causeWhat to do
200, empty $metadataThe OData composition is not setSet the composition of the OData interface in the base
401The user does not exist, the password is wrong, or standard authentication is turned offCheck the user in the Designer
404No publication or a wrong pathCompare the publication name in IIS with the address in the connector
404.15The query string is too longShorten the filter; Gleyk does this itself in batches of 20
500Bitness or version of the web server extension moduleCheck the application pool and web.config after a platform update
Slow responses, dropped connectionsSessions are not reusedSet reuseSessions and the pool size in default.vrd, read large selections page by page
Certificate errorSelf-signed certificateIssue a certificate from a trusted authority

How accounting uses a connected base is shown on the AI for 1C page. The general design of connectors is described in the article Architecture.

Ask Sema

Was this helpful?