Analyze OData Scheme

OData is an HTTP-based protocol (and thus platform-independent) that allows access to data services. There is a query language available directly via the URL that allows you arbitrary specific querying of existing data resources. In addition, data can also be written and deleted. Basically, OData is a kind of SQL for the web. For details, please visit http://www.odata.org. You will find numerous tutorials there.

OData also provides metadata (XML schema files) that describes the structure of these data services. This plugin allows you to read out an OData schema file and create a Lobster_data structure (source or destination).

Directly Uploading the Schema File

images/download/attachments/36576185/OData_1a_EN-version-2-modificationdate-1563439032000-api-v2.png

images/download/attachments/36576185/OData_1b_EN-version-2-modificationdate-1563871664000-api-v2.png


(1) Here you can directly upload the EDMX file ( Entity Data Model XML ) $metadata if you have one. Alternatively, you can specify a URL under which it is available (see next section). Important note: Lobster_data expects files in version 4. Here is an example file: $metadata.

(2) Here you can select one of the entities in the schema file from a list.

(3) Optionally, you can additionally select existing references in the respective entity. However, only one level down is read out.

(4) Select whether you need a source or destination structure and press the button to save it to the clipboard. Then open your profile and paste the structure via the context menu (5).

images/download/attachments/36576185/OData_2_EN-version-1-modificationdate-1563439293000-api-v2.png

images/download/attachments/36576185/OData_3-version-2-modificationdate-1563871499000-api-v2.png

Loading Schema File $metadata via URL

To explain how to get the $metadata file via a URL, we would like to refer to the example services on the official OData page https://services.odata.org/.

Choose the read-only service https://services.odata.org/V3/OData/OData.svc/.

Now add the suffix $metadata to this URL and you will receive the desired EDMX file. However, you will get a version 1 file here (see first line at the end), but we need version 4. Therefore, please change the URL to https://services.odata.org/V4/OData/OData.svc/$metadata.

You can now enter this URL in the GUI.

images/download/attachments/36576185/OData_URL_EN-version-1-modificationdate-1563948567000-api-v2.png

(6) Here you can select a channel of type HTTP.

(7) If (8) is an HTTPS URL, you can optionally assign a client certificate. To do this, you select one of the local certificates.

(8) The URL to the file.

(9) If you click this button, another dialogue opens, in which you can enter additional HTTP headers. You can use variables for the header names and the values. Syntax: @<Variable name>@.

(10) If set, the DMZ server (if available) will be used for sending the request instead of the internal Integration Server.

(11) Press this button to read the file via the URL. The rest works like in the first case.

Reading Data

In order to query data via OData for the generated source structure, use the following query URL:

https://services.odata.org/V4/OData/OData.svc/Suppliers

Try it in a normal browser. The result is data in the JSON format.

Here is a simple example profile: Profile-OData_example.pak

Inserting, Updating and Deleting Data

To insert or update data, you would send a JSON file to an OData service (a URL statement is sufficient for deleting). So you would analogously create a destination structure in a profile with the metadata file and create a JSON file with the JsonCreationUnit, for example, which you would then send to the OData service in an HTTP Response Route. This will only be hinted here this far, but the principle should be clear. Details on inserting, updating and deleting data can be found at http://www.odata.org.

Note: Depending on whether you read, insert, update or delete, a different HTTP method (GET, POST, PATCH, DELETE) is necessary. In the profile above, for example, GET is used. See https://www.odata.org/getting-started/basic-tutorial.

Note: When reading, writing, updating and deleting, Lobster_data always acts as a client. Lobster_data does not provide an OData service as a server.