Skip to main content
Skip table of contents

Manually Providing the OData REST Interface

It may be that the import of the EDMX file to a connector fails or the OData service provides no description file at all. In this case, you can provide the needed definitions manually.
You need to define:

  • an OData alias
    The OData alias specifies where the OData endpoint is located and more connection options. Refer to the OData Adapter Reference for more details.

  • an OData interface
    The OData interface describes how resources of this endpoint can be accessed. On OData Import Rules you can find an overview on how OData entities are mapped to UML elements.

OData Alias

Add an OData alias to your service in the Service panel. How to add an alias is explained on Service Panel > Aliases. The OData adapter configuration options are explained on OData Adapter Reference.

OData Interface

You need to create the types, resources, operations and parameters that are used by the Odata endpoint manually in the Implementation folder. We recommend to store the information in a packet structure that resembles the structure that would be created when importing to a connector.

Element

Description

Example

Main Package

Create a main package to store the Odata definitions. As a name, assign the name of the endpoint.

Northwind

Entities Folder

Create a folder to store the OData entity types (see OData Entity Types below).

Entities

Interface

Create an Odata interface as described below.

Northwind

Resources

Create REST resources as described below.

Customers

OData Entitiy Types

Collect all parameter and type information from the OData endpoint documentation and create classes and their relations accordingly. If you followed the recommendations above, you should store them to the folder Entities. Refer to Modeling Data Structures for more information on how to create packages, classes, and so on.
You do not need to depict the complete interface - it is sufficient to create the needed classes for the resources you want to access and the properties you want to deal with.

OData API Interface

Collect all needed information on the OData resources you want to access from the documentation of the Odata endpoint. You need to create all service elements that are listed as mandatory in the table below.

Element

Extension

Mandatory

Reference Link

Additional Attributes

Odata interface package

Odata Interface

(tick)

Odata Interface

Odata entity classes

Odata Entity

(tick)

OData Entity Set (Class)

  • External Name

  • OData Entity Type

((tick))

OData Entity Set Element (Class)

  • OData Entity Type

Odata operations

Odata Operation

(tick)

OData Operation

Odata parameters

Odata Primary Key Parameter

((tick))

OData Primary Key Parameter

  • External Name

Odata Custom Parameter

((tick))

OData Custom Parameter

  • External Name

  • In

Create classes, operations and parameters in the correct structure and apply the necessary extensions. Set the additional attributes that are related to the extension as needed.

  1. Create a package <your OData interface> (e.g. NorthwindInterface) under package <your API name> (e.g. NorthwindAPI) and assign the extension Odata Interface.

  2. In this package, create Odata resources (classes with the Odata entity extension) and their operations (extension Odata Operation) and parameters (extension Odata Primary Key or Custom Parameter) according to the Odata endpoint documentation.

    If an Odata parameter has an ugly name that would have to be escaped, specify an external name via the extension attribute. Refer to OData Adapter Reference for more details.

Related Content

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.