BECS REST Service


This subsection is focused on explaining principles of using General BECS REST API Service and its sample usage in BECS integration project describing them in two major sections:

1. General BECS REST API Service principle…

2. How to use General BECS REST API Service in project…

​​​​​​​

1 General BECS REST API Service principle

​​​​​1.1 General info

Bentley Systems has its own integration platform called BECS, which implements official integration layer between world of Bentley applications and solutions and external world.

 

1.2 What is General BECS REST API Service?

BECS is open and very powerful platform used in wide range of industrial areas and business scenarios. To enable any 3rd party system talk to BECS, it has now many ways how to start BECS visual project, from any message in variety Queues, via using message open standards (CCOM, MSDL…) to watch dog on folder and finally via REST API or SOAP call.

General BECS REST API Service layer was designed as general way how to start integration via SOAP API call for any integration project.

​​​​​​​

1.2.1 General BECS REST API Service in closer look

Please do not forget, that BECS is driven by visual projects (called BECS Integration Project). To call any of the BECS integration projects you need to be able to send practically any possible attributes required by specific project. Having said this General BECS REST API Service has implemented open input in a form of simple .json message with following general structure:

 

​​​​​​​1.2.1.1 Input .json parameters and sections

returnAsXML

This parameter defines in which format will be generated output from BECS REST API Service. Possible options are:

Value in returnAsXML

Output format from BECS REST API Service

false

.Json

true

XML

 

projectName

As mentioned, this REST API service is one of the ways how to run any BECS Integration Project and with practically any input and output data. Of course, BECS project has to be implemented to return data in related XML structure.

Section “<values>”

This section is free section for capturing any project relevant inputs. It is structured to simple <Item> nodes with related “name” and “value” for each item. Each of those valued is internally interpreted in BECS as a list of Integration Project variables visible in Integration Project. Behavior, format, and structure of this section element strictly depends on used BECS Integration Project, so, please contact author of this project for details.

 

1.2.1.2 ​​​​​​​​​​​​​​OutPut of REST API Service

BECS REST API Service is returning data in a format of XML or .json (based on input parameter “returnAsXML” value) simple structure with element “Name” and “Value” for each returned attribute.

 

2 How to use General BECS REST API Service in the project

​​​​​​​​​​​​2.1 General intro

Using of BECS REST API service in real project is very simple. Let me explain functionality on the sample project for showing SAP data in PlantSight.

This project has one input attribute – Code, where PlantSight will send Code of actually selected object on 3D visualizer and data will be returned into “Properties box” of PlantSight.

Communication is required in .json only.

 

2.2 General BECS REST API Service Swagger

Service swagger is on following URL:

Swagger UI (bentley.com)

Please be aware, that Service EndPoint depends on machine where the service is installed, so it needs to be changed to proper architecture every time!

​​​​​​​

2.3 Service Input

BECS Integration Project named “BECS_Table” and called by General BECS REST API Service is adapted to read FLOC data from SAP for selected Code. In this sample implementation is following input .json used:

 

2.3.1 ​​​​​​Returned structure from General BECS SOAP Service

General BECS REST API Service is designed to return important information of the executed BECS Integration Project. For our sample project was returned: