Salesforce

OData Resource (Magic xpi 4.13)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

OData Resource (Magic xpi 4.13)

The OData resource lets the user configure details about the OData service. The user can set the Root URL of the service, provide additional Metadata Headers, and choose the authentication mechanism to access the service. The user can also add the annotation provided by the service.

These OData annotations provide additional information about the data being retrieved from the OData service like count of rows, context, or links to endpoints that can be accessed to perform further operations. The annotations are part of the OData response data and have a @odata prefix for identification.

The instance level and row level annotations can be added under the Get Annotations and Get Row Annotations properties, respectively.

OData resources contain the following parameters (a parameter in bold is mandatory):

Parameter

Description

Root URL

The OData service root URL.

Enter the required root URL or click to open the Environment Variables List. Here, you can select an environment variable to use as a root URL.

Metadata Headers

The HTTP headers for retrieving the OData service’s metadata. Click the Headers button (below) to enter the required HTTP header information.

This field is applicable only in the resource and is not used during runtime.

Authentication Type

This is a combo-box. Select the required authentication type from the drop-down list.

  • None (default)

  • Basic

  • Digest

  • Windows

(Since version: 4.7.2)

User

The username for authenticating the OData resource.

You can either enter the user name, or click to open the Environment Variables List. Here, you can select an environment variable to use as a user name.

Password

The password for authenticating the OData resource.

You can either enter the password, or click to open the Environment Variables List. Here, you can select an environment variable to use as a password.

A password entered as an environment variable is masked by asterisks.

Workstation

The workstation name of the computer originating the request.

This is available only if you select Windows in the Authentication Type parameter (above).

Domain

The domain used for authenticating the OData resource.

This is available only if you select Windows in the Authentication Type parameter (above).

Get Annotations

These are the entity level or stream level annotations. They are applicable at the root level of the entity. Under the Data Mapper they will be represented under the annotations element at the root level. Here multiple annotations can be added as comma separated values. While adding the annotations, the @odata prefix should not be added.

The default annotations available are count and context. These are optional and can be removed by the user.

(Since version: 4.13)

Row Annotations

These are the row level annotations. They are applicable for each row of the entity being retrieved. Under the Data Mapper they will be represented under the rowAnnotations element which will be the child of the row element. Here multiple annotations can be added as comma separated values. While adding the annotations the @odata prefix should not be added.

The default annotations available are etag and id. These are optional and can be removed by the user.

(Since version: 4.13)

OData resources also give you the following buttons:

Button

Description

Get Metadata

Click this button to retrieve the OData service’s metadata.

If the OData Service is running on the Cloud, then in order to fetch the OData service’s metadata, TLS 1.2 related settings must be configured. To do this make sure that your .NET framework is configured to support TLS 1.2.

.NET 4.0 does not enable TLS 1.2 by default. To enable TLS 1.2 by default perform the following steps:

In the following two registry keys, set the SchUseStrongCrypto DWORD value to 1:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319.

Entities

Click this button to open the Entity List. Here, you select the required OData entities. Prior to selecting the entities, you need to retrieve the metadata by clicking the Get Metadata button (above).

Headers

Click this button to open the Headers dialog box. Here, you can provide HTTP headers for retrieving the OData service’s metadata. The headers should be entered as key value pairs, with a line break between the pairs. For example:

Authorization: Bearer TXkgQWNjZXNzIFRva2Vu
Accept: application/json

(Since version: 4.6)

Reference
Attachment 
Attachment