GET environment

A lookup call to get all available environments, including their ID and description. The call will allow a single ID to be given in order to return the description. If no ID is supplied, all environments are returned.

When accessed via a GET request this API method will return a list of all environments. Included in the response will be a list of required and optional attributes for the environment. This data can be used as the basis for generating the attribute listing when creating or updating frames.

INPUT

As this method is accessed via a GET request there is no HTTP body so options can be specified via the URL.

parameter type description
id string (optional) a environment code to restrict results to

OUTPUT - JSON sample

If accessing GET /api/environment?id=AirportEnclosed the following JSON would be returned:

{
    "data": [{
        "environment_code": "AirportEnclosed",
        "route_environment_description": "Airport - enclosed (airport interior)",
        "on_route": 1,
        "space_environment_description": "Airport Enclosed",
        "attributes": {
            "required": [
                "Address",
                "FramePositionID",
                "MapID",
                "PostCode"
            ],
            "optional": [
                "MGEIndoorCoordinate"
            ]
        }
    }]
}
        

A "data" element that contains an array of environments defined as follows:

environment_code - string - the unique identifier used within Code Allocator to reference the environment

route_environment_description - string - a description of the environment suitable for display to a user

space_environment_description - string - SPACE description of the environment suitable for display to a user

attributes - array - an array containing required and optional keys

  • required - array - an array of strings listing required attributes for this environment
  • optional - array - an array of strings listing optional attributes for this environment