D
D
Denis Lysenko2014-07-29 12:47:24
PHP
Denis Lysenko, 2014-07-29 12:47:24

How to get data from Bitrix via API?

There is a Bitrix box, in which for some reason they did not implement the REST API (although B24 has it). You need to write an application that will pull data from Bitrix in XML or JSON format and work with them. It is even possible to make some changes in the Bitrix itself. How to implement it, where to dig? At first I hoped that the REST API still exists and I don’t even have to open the Bitrix sources, but as I understand it, I need to implement my own API using, for example, SOAP?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
agladkov, 2014-07-29
@agladkov

In the simplest version:
1. create a page that connects the prologue and pulls the component that pulls your data (news.list, catalog.section..)
2. for the component, create a template that just pulls json_encode($arResult), and on the client figure out what you got there.
A small complication is to cast JSON to the structure you need in the component template.
A little more complication is to write your own component that will get only the data you need and return already prepared.

M
maraduda, 2014-08-07
@maraduda

there are web services in Bitrix, look at the documentation, pay attention to the webservice.statistic component (for example) and webservice.server

A
Artem Zhitnik, 2021-10-28
@art-zhitnik

As an option to move towards the GraphQL API, I am writing a module of the same name. Search in the marketplace.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question