How to use the oData protocol when publishing an infobase to web server
To access data from the infobase via oData protocol, in the Designer, click Administration > Publish to web server, select the option “Publish standard interface oData”, and publish the infobase.
Also, it is necessary to add the composition of objects published via oData protocol in Enterprise mode. You can do with the help of global context procedures.
To write attributes to the oData interface:
SetStandardODataInterfaceContent(<MetadataObjects>)
It determines the content of metadata objects available through the standard OData API service.
Objects that can be included into standard OData API:
Catalog.<CatalogName>
Document.<DocumentName>
ExchangePlan.<ExchangePlanName>
ChartOfAccounts.<ChartOfAccountsName>
ChartOfCalculationTypes.<ChartOfCalculationTypesName>
ChartOfCharacteristicTypes.<ChartOfCharacteristicTypesName>
AccountingRegister.<AccountingRegisterName>
InformationRegister.<InformationRegisterName>
CalculationRegister.<CalculationRegisterName>
AccumulationRegister.<AccumulationRegisterName>
DocumentJournal.<DocumentJournaName>
Enum.<EnumName>
Task.<TaskName>
BusinessProcess.<BusinessProcessName>
Constant.<ConstantName>
Availability:
Server, thick client, external connection, Integration.
Example:
Array = New Array();
For Each Catalog From Metadata.Catalogs Do
Array.Add(Catalog);
EndDo;
To read attributes saved in the oData interface:
SetStandardODataInterfaceContent(Array);
It returns an array of metadata objects included to standard OData API.
Objects that can be included into standard OData API:
Catalog.<CatalogName>
Document.<DocumentName>
ExchangePlan.<ExchangePlanName>
ChartOfAccounts.<ChartOfAccountsName>
ChartOfCalculationTypes.<ChartOfCalculationTypesName>
ChartOfCharacteristicTypes.<ChartOfCharacteristicTypesName>
AccountingRegister.<AccountingRegisterName>
InformationRegister.<InformationRegisterName>
CalculationRegister.<CalculationRegisterName>
AccumulationRegister.<AccumulationRegisterName>
DocumentJournal.<DocumentJournaName>
Enum.<EnumName>
Task.<TaskName>
BusinessProcess.<BusinessProcessName>
Constant.<ConstantName>
Availability:
Server, thick client, external connection, Integration.
Note:
It returns all configuration objects available for being included to standard OData API in the mode of configuration compatibility with v. 8.3.4.
Example:
Array = GetStandardODataInterfaceContent();
For Each MetadataObject From Array Do
Message(MetadataObject.FullName());
EndDo;