Snowparks

A resource that implements the concept of Snowpark defined in the AlpineBits® DestinationData Ontology.

A JSON object representing such a resource MUST contain the following fields:

  • type: the constant "snowparks" that identifies the resource as being of the type snowpark.

  • id: a string that uniquely and persistently identifies the snowpark within a SERVER. See the definition in basic-resource-schema.adoc#anchor-attributes.

  • attributes: an object containing the attributes of the snowpark.

  • relationships: an object containing the relationships of the snowpark to other resources.

  • links: an object containing the links related to the snowpark.

A snowpark resource is structured as follows:

{
  "type": "snowparks",
  "id": "1",
  "meta": { ... },
  "attributes": { ... },
  "relationships": { ... },
  "links": { ... }
}

1. Meta

See definition of the meta object in basic-resource-schema.adoc#anchor-metadata.

2. Attributes

The attributes object of a snowpark resource MUST contain the following fields:

A summary of the attributes is presented in the table below:

Field Type Constraints

abstract

datatypes.adoc#anchor-text

Nullable

address

datatypes.adoc#anchor-address

Nullable

categories

Array of datatypes.adoc#anchor-type

Nullable, Non-empty

description

datatypes.adoc#anchor-text

Nullable, Conditional Assignment

difficulty

string

Enumeration, Nullable

features

Array of datatypes.adoc#anchor-type

Nullable, Non-empty

geometries

Array of datatypes.adoc#anchor-geometry

Nullable, Non-empty

howToArrive

string

Nullable

length

number

Nullable, Unit of Measure, Greater than Zero

maxAltitude

number

Nullable, Unit of Measure

minAltitude

number

Nullable, Unit of Measure

name

datatypes.adoc#anchor-text

Non-nullable, Conditional Assignment

openingHours

Array of datatypes.adoc#anchor-hoursspecification

Nullable, Non-empty

shortName

datatypes.adoc#anchor-text

Nullable

snowCondition

datatypes.adoc#anchor-snow

Nullable

url

datatypes.adoc#anchor-url

Nullable

3. Relationships

The relationships object of a snowpark resource MUST contain the following fields:

A summary of the relationships is presented in the table below:

Field Type Constraints

connections

basic-resource-schema.adoc#anchor-referencetomany object to Mountain Areas, Trails, Lifts and Snowparks

Nullable, Non-empty

multimediaDescriptions

basic-resource-schema.adoc#anchor-referencetomany object to Media Objects

Nullable, Non-empty

See definition of the links object in basic-resource-schema.adoc#anchor-links.

5. Endpoints

The following endpoints in this API specification return snowpark resources:

  • https://example.com /1.0/snowparks: returns a collection of snowparks.

  • https://example.com /1.0/snowparks/:id: returns the snowpark identified by the :id parameter.

  • https://example.com /1.0/snowparks/:id/connections: returns a collection of resources which may include snowparks.

  • https://example.com /1.0/lifts/:id/connections: returns a collection of resources which may include snowparks.

  • https://example.com /1.0/mountainAreas/:id/snowparks: returns a collection of snowparks.

  • https://example.com /1.0/mountainAreas/:id/connections: returns a collection of resources which may include snowparks.

  • https://example.com /1.0/trails/:id/connections: returns a collection of resources which may include snowparks.

6. Examples

The following example contains the minimal information required for a snowpark resource:

{
  "type": "snowparks",
  "id": "1",
  "meta": {
    "dataProvider": null,
    "lastUpdate": null
  },
  "attributes": {
    "name": {
      "eng": "Snowpark Merano 2000"
    },
    "shortName": null,
    "description": null,
    "abstract": null,
    "url": null,
    "categories": null,
    "length": null,
    "minAltitude": null,
    "maxAltitude": null,
    "address": {
      "street": null,
      "city": {
        "eng": "Merano"
      },
      "region": null,
      "country": "IT",
      "zipcode": null,
      "categories": null,
      "complement": null
    },
    "howToArrive": null,
    "difficulty": null,
    "features": null,
    "geometries": null,
    "openingHours": null,
    "snowCondition": null
  },
  "relationships": {
    "connections": null,
    "multimediaDescriptions": null
  },
  "links": {
    "self": "http://example.com/1.0/snowparks/1"
  }
}

asciidoc/examples/snowpark.min.json

The following example illustrates the fields defined for snowpark resources:

{
  "type": "snowparks",
  "id": "1",
  "meta": {
    "dataProvider": "http://example.com",
    "lastUpdate": "2020-04-01T08:00:00+02:00"
  },
  "attributes": {
    "name": {
      "ita": "Snowpark Merano 2000",
      "deu": "Snowpark Merano 2000",
      "eng": "Snowpark Merano 2000"
    },
    "shortName": {
      "eng": "Snowpark Merano 2000"
    },
    "description": {
      "eng": "Located in the rear part of the skiing area on the Oswald-Slope, close to the Waidmann Alpine Cottage, the SNOWPARK MERANO 2000 awaits brave Snowboarders and Freestylers. An ambitious project with many kicks, rails, tubes and boxes for newcomers and pros alike. You can reach the Jump Zone from the mountain station of the Ropeway by using the chairlift Piffing."
    },
    "abstract": {
      "eng": "Located in the rear part of the skiing area on the Oswald-Slope, close to the Waidmann Alpine Cottage, the SNOWPARK MERANO 2000 awaits brave Snowboarders and Freestylers..."
    },
    "url": "http://example.com",
    "categories": [
      "example/free-style"
    ],
    "length": 1300,
    "minAltitude": 1500,
    "maxAltitude": 2500,
    "address": {
      "street": null,
      "city": {
        "eng": "Merano"
      },
      "region": null,
      "country": "IT",
      "zipcode": null,
      "categories": null,
      "complement": null
    },
    "howToArrive": null,
    "difficulty": "intermediate",
    "features": [
      "example/jib",
      "example/pipe"
    ],
    "geometries": [
      {
        "type": "LineString",
        "coordinates": [
          [
            11.305682659149168,
            46.66705018437341
          ],
          [
            11.30692720413208,
            46.667182709603225
          ],
          [
            11.308064460754393,
            46.667491933875965
          ]
        ]
      }
    ],
    "openingHours": {
      "dailySchedules": {
        "2020-12-25": null
      },
      "weeklySchedules": [
        {
          "validFrom": "2020-01-01",
          "validTo": "2020-12-31",
          "monday": [
            {
              "opens": "08:00:00+01:00",
              "closes": "18:00:00+01:00"
            }
          ],
          "tuesday": [
            {
              "opens": "08:00:00+01:00",
              "closes": "18:00:00+01:00"
            }
          ],
          "wednesday": [
            {
              "opens": "08:00:00+01:00",
              "closes": "18:00:00+01:00"
            }
          ],
          "thursday": [
            {
              "opens": "08:00:00+01:00",
              "closes": "18:00:00+01:00"
            }
          ],
          "friday": [
            {
              "opens": "08:00:00+01:00",
              "closes": "18:00:00+01:00"
            }
          ],
          "saturday": [
            {
              "opens": "08:00:00+01:00",
              "closes": "18:00:00+01:00"
            }
          ],
          "sunday": [
            {
              "opens": "08:00:00+01:00",
              "closes": "18:00:00+01:00"
            }
          ]
        }
      ]
    },
    "snowCondition": {
      "primarySurface": "mtnxml/frozen-granular",
      "secondarySurface": "mtnxml/packed-powder",
      "baseSnow": 30,
      "baseSnowRange": {
        "lower": 25,
        "upper": 40
      },
      "latestStorm": 5,
      "obtainedIn": "2020-01-14",
      "snowOverNight": 0,
      "groomed": true,
      "snowMaking": false
    }
  },
  "relationships": {
    "connections": {
      "data": [
        {
          "type": "trails",
          "id": "2"
        },
        {
          "type": "trails",
          "id": "3"
        }
      ],
      "links": {
        "related": "http://example.com/1.0/mountainAreas/1/connections/"
      }
    },
    "multimediaDescriptions": {
      "data": [
        {
          "type": "mediaObjects",
          "id": "2"
        }
      ],
      "links": {
        "related": "http://example.com/1.0/mountainAreas/1/multimediaDescriptions/"
      }
    }
  },
  "links": {
    "self": "http://example.com/1.0/snowparks/1"
  }
}

asciidoc/examples/snowpark.full.json