Answer the question
In order to leave comments, you need to log in
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
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.
there are web services in Bitrix, look at the documentation, pay attention to the webservice.statistic component (for example) and webservice.server
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 questionAsk a Question
731 491 924 answers to any question