Cmdlets for OData

Build 25.0.9434

ExcludeControlInformationRootType Parameter (Connect-OData Cmdlet)

Indicates whether OData should use the odata.type control information for the root element.

Syntax

Connect-OData -ExcludeControlInformationRootType SwitchParameter

Data Type

bool

Default Value

false

Remarks

The OData specification requires that the root element in a POST or PATCH request include the control information annotation odata.type. However, some services do not accept this annotation. In these cases, you can set this property to true, which will omit the annotation from the request.

The ExcludeControlInformationRootType property is only applicable when the DataFormat property is set to JSON or when it is set to AUTO and a JSON format is detected.

This is an example of how this annotation appears on request post data:

{
  "@odata.type": "#NorthwindModel.Category",
  "CategoryName": "Electronics"
}

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434