Web API Properties

Within the CSDL $metadata document, each entity type that is not abstract will have Property elements.

Each Property element has the following attributes:

Attribute Description
Name The name of the property. This is usually the LogicalName of the column and is always lower case. One exception to this is Lookup properties.
Type The primitive type of the property. See Primitive types used by Dataverse

When you retrieve the $metadata document with Metadata annotations you can see some Annotation elements that can be useful. For example, the following name and openrevenue properties:

<Property Name="name" Type="Edm.String" Unicode="false">
    <Annotation Term="Org.OData.Core.V1.Description" String="Type the company or business name." />
</Property>
<Property Name="openrevenue" Type="Edm.Decimal" Scale="Variable">
    <Annotation Term="Org.OData.Core.V1.Description" String="Sum of open revenue against an account and its child accounts." />
    <Annotation Term="Org.OData.Core.V1.Computed" Bool="true" />
    <Annotation Term="Org.OData.Core.V1.Permissions">
        <EnumMember>Org.OData.Core.V1.PermissionType/Read</EnumMember>
    </Annotation>
</Property>

With the annotations in this example, you can know that the openrevenue field is read-only.

With Metadata annotations applied, you will find these annotations for properties:

Annotation Term Description
Org.OData.Core.V1.Description A description of the property
Org.OData.Core.V1.Computed Whether the property is computed. You can't set this value because it is computed by Dataverse.
Org.OData.Core.V1.Permissions Includes the types of permissions available for the property. This is only included when permissions are limited, and it always contains the value <EnumMember>Org.OData.Core.V1.PermissionType/Read</EnumMember> meaning that you can only read this value.

Note

Org.OData.Core.V1.Computed and Org.OData.Core.V1.Permissions annotations are frequently found together, but not always. Either of them means the property is read-only.

Primitive types used by Dataverse

Properties for entity types used for business data will only include primitive types.

The following are primitive types currently used by Dataverse.

Type Description
Edm.Binary Binary data. Used for file and image data.
Edm.Boolean Binary-valued logic.
Edm.Date Date without a time-zone offset.
Edm.DateTimeOffset Date and time with a time-zone offset, no leap seconds
Edm.Decimal Numeric values with fixed precision and scale
Edm.Double IEEE 754 binary64 floating-point number (15-17 decimal digits)
Edm.Guid 16-byte (128-bit) unique identifier
Edm.Int16 Signed 16-bit integer. Used only for certain schema EntityType properties
Edm.Int32 Signed 32-bit integer
Edm.Int64 Signed 64-bit integer
Edm.String Sequence of UTF-8 characters
This type may include the Unicode="false" facet.

When this facet exists, the string property will only contain and accept string values with characters limited to the ASCII character set.

If no value is specified, the Unicode facet defaults to true.

Lookup properties

You can find properties which use the following naming convention: _<name>_value. These are called lookup properties. OData represents lookup columns as Single-valued navigation properties rather than properties. Dataverse provides lookup properties to simplify scenarios to retrieve data using the primary key of a related record.

Lookup properties are computed, read-only properties that have an Edm.Guid value. You can use these lookup properties in a query filter to match all the records associated to the single record in the many-to-one relationship.

To change the value of a lookup property, you must change the single-valued navigation property that it represents. More information: Lookup properties

When you include lookup properties in a query, you can request annotations to be included that provide additional information about the data that is set for those underlying attributes which aren’t represented by a single-valued navigation property. More information: Retrieve data about lookup properties.

Next steps

Learn about Navigation Properties.

See also

Use the Dataverse Web API
Web API types and operations
Web API Service Documents
Web API EntityTypes