Skip to content

Entries

EntryInfoProperty (BaseModel) pydantic-model

description: str pydantic-field required

description of the entry property

sortable: bool pydantic-field

defines whether the entry property can be used for sorting with the "sort" parameter. If the entry listing endpoint supports sorting, this key MUST be present for sortable properties with value true.

unit: str pydantic-field

the physical unit of the entry property

EntryInfoResource (BaseModel) pydantic-model

description: str pydantic-field required

description of the entry

formats: List[str] pydantic-field required

list of available output formats.

output_fields_by_format: Dict[str, List[str]] pydantic-field required

a dictionary of available output fields for this entry type, where the keys are the values of the formats list and the values are the keys of the properties dictionary.

properties: Dict[str, optimade.models.entries.EntryInfoProperty] pydantic-field required

a dictionary describing queryable properties for this entry type, where each key is a property ID.

EntryRelationships (Relationships) pydantic-model

This model wraps the JSON API Relationships to include type-specific top level keys.

references: ReferenceRelationship pydantic-field

Object containing links to relationships with entries of the references type.

structures: StructureRelationship pydantic-field

Object containing links to relationships with entries of the structures type.

EntryResourceAttributes (Attributes) pydantic-model

Contains key-value pairs representing the entry's properties.

immutable_id: str pydantic-field

The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to "the latest version" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future. - Type: string. - Requirements/Conventions:

  • Support: OPTIONAL, i.e., MAY be :val:null.
  • Query: MUST be a queryable property with support for all mandatory filter features.

  • Examples:

  • :val:"8bd3e750-b477-41a0-9b11-3a799f21b44f"

  • :val:"fjeiwoj,54;@=%<>#32" (Strings that are not URL-safe are allowed.)

last_modified: datetime pydantic-field required

Date and time representing when the entry was last modified. - Type: timestamp. - Requirements/Conventions:

  • Support: SHOULD be supported, i.e., SHOULD NOT be :val:null. Is REQUIRED in this implementation, i.e., MUST NOT be :val:null.
  • Query: MUST be a queryable property with support for all mandatory filter features.
  • Response: REQUIRED in the response unless the query parameter :query-param:response_fields is present and does not include this property.

  • Example:

  • As part of JSON response format: :VAL:"2007-04-05T14:30Z" (i.e., encoded as an RFC 3339 Internet Date/Time Format <https://tools.ietf.org/html/rfc3339#section-5.6>__ string.)