EHESO API (v1)

Download OpenAPI specification:Download

Layer Data

Get All Layer Data

Retrieve all the data from a specified layer in the requested format.

Authorizations:
ApiKeyAuth
path Parameters
layerId
required
string
Examples:
  • HEI - Query data from the `Higher Educational Institutions` layer.
  • COUNTRY - Query data from the `Country` layer.

The ID of the layer

query Parameters
format
required
string (format)
Enum: "detailed" "flat" "sql"
Example: format=flat

The format in which the data should be returned. The available formats are:

  • "default": this returns a so-called field-based structure. This field-based structure is a nested object where the fieldIds define the nested properties. Each field is represented by an object that may have either a v property or a c property, like so: {SOME: { FIELD { v: 1 }}}. The v property is the value of the field, while the c property is the code, if there was no value for that field (e.g. "m" for "missing").
  • "flat": this returns a flat array of objects, where each object represents a row. The object has properties that correspond to the fieldIds, like so: { "SOME.FIELD": 1 }. The .c and .v properties are not present in this format, so it is possible to get a string value for a number field, because the value it is actually a code.
  • "sql": this is similar to the "flat" format, but the fieldIds don't have the dot notation. The dots are replaced with _ to make the fieldIds SQL-friendly, like so: { "SOME_FIELD": 1 }.

Responses

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    }
]

Query Layer Data

Retrieve data from a specified layer based on the provided parameters. This endpoint allows querying the layer for specific data, applying filters, and returning the results in the requested format.

Authorizations:
ApiKeyAuth
path Parameters
layerId
required
string
Examples:
  • HEI - Query data from the `Higher Educational Institutions` layer.
  • COUNTRY - Query data from the `Country` layer.

The ID of the layer

Request Body schema: application/json
required
format
required
string
Enum: "detailed" "flat" "sql"

The format in which the data should be returned. The available formats are:

  • "default": this returns a so-called field-based structure. This field-based structure is a nested object where the fieldIds define the nested properties. Each field is represented by an object that may have either a v property or a c property, like so: {SOME: { FIELD { v: 1 }}}. The v property is the value of the field, while the c property is the code, if there was no value for that field (e.g. "m" for "missing").
  • "flat": this returns a flat array of objects, where each object represents a row. The object has properties that correspond to the fieldIds, like so: { "SOME.FIELD": 1 }. The .c and .v properties are not present in this format, so it is possible to get a string value for a number field, because the value it is actually a code.
  • "sql": this is similar to the "flat" format, but the fieldIds don't have the dot notation. The dots are replaced with _ to make the fieldIds SQL-friendly, like so: { "SOME_FIELD": 1 }.
locale
string

Note: This parameter is not yet fully implemented.

The locale in which the data should be returned. The locale is a string that represents the language and country (e.g. fr_BE for French in Belgium). If the locale is not provided, the default locale de_AT is used.

object

The find object is a nested object that represents the filter criteria. The keys of the find object are the fieldIds, and the values are the filter criteria. For a detailed description of the operators and the filter criteria, see this page: MongoDB query reference

property name*
additional property
any
select
Array of strings

The select array is an array of fieldIds (or part of a fieldId) that should be returned. If the select array is not provided, all fields are returned. If the select array is provided, only the fields matching the select array are returned. For example, if the select array is ["SOME"], only the fields that start with "SOME." are returned. If the select array is

["SOME.FIELD", "SOME.OTHER.FIELD"]

, the fields with the fieldId "SOME.FIELD" and "SOME.OTHER.FIELD" are returned.

includeKeyFields
boolean

Specifies whether the key fields should be included in the result, even if they are not part of the select array. If the select array is not provided, this property has no effect.

deselect
Array of strings

Note: This parameter is not yet implemented.

object
  • The sort object is an object that represents the sort criteria.
  • The keys of the sort object are the fieldIds.
  • The order of the keys in the sort object defines the sort order.
  • The sort order can be either 1 (ascending) or -1 (descending).

For example, a valid sort object would be

{ "SOME.FIELD": 1, "SOME.OTHER.FIELD": -1 }

If you want to explicitly specify, if the value (v) or the code (c) should be used for sorting, you need to include the respective property in the sort object, like so:

{ "SOME.FIELD.c": -1, "SOME.FIELD.v": 1 }
property name*
additional property
any
limit
integer

The limit is an integer that represents the maximum number of records that should be returned. If the limit is not provided, all records are returned.

resultInfo
boolean

Note: This parameter is not yet fully implemented.

Specifies whether the result info should be included in the result. The result info contains the total number of records, the number of records that were returned, and (sometimes) the number of records that were skipped. This is useful for pagination or a preview of the data.

Note: The result info is the last object in the result array. This block is marked with an itemType property like so:

{
  "itemType": "ResultInfo",
  "itemsSent": 9,
  "messages": []
}

Responses

Request samples

Content type
application/json
Example

Return all fields in flat format.

{
  • "format": "flat"
}

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    }
]

Export Layer Data

Authorizations:
ApiKeyAuth
path Parameters
layerId
required
string
Examples:
  • HEI - Query data from the `Higher Educational Institutions` layer.
  • COUNTRY - Query data from the `Country` layer.

The ID of the layer

Request Body schema: application/json
format
required
string
Enum: "detailed" "flat" "sql"

The format in which the data should be returned. The available formats are:

  • "default": this returns a so-called field-based structure. This field-based structure is a nested object where the fieldIds define the nested properties. Each field is represented by an object that may have either a v property or a c property, like so: {SOME: { FIELD { v: 1 }}}. The v property is the value of the field, while the c property is the code, if there was no value for that field (e.g. "m" for "missing").
  • "flat": this returns a flat array of objects, where each object represents a row. The object has properties that correspond to the fieldIds, like so: { "SOME.FIELD": 1 }. The .c and .v properties are not present in this format, so it is possible to get a string value for a number field, because the value it is actually a code.
  • "sql": this is similar to the "flat" format, but the fieldIds don't have the dot notation. The dots are replaced with _ to make the fieldIds SQL-friendly, like so: { "SOME_FIELD": 1 }.
locale
string

Note: This parameter is not yet fully implemented.

The locale in which the data should be returned. The locale is a string that represents the language and country (e.g. fr_BE for French in Belgium). If the locale is not provided, the default locale de_AT is used.

object

The find object is a nested object that represents the filter criteria. The keys of the find object are the fieldIds, and the values are the filter criteria. For a detailed description of the operators and the filter criteria, see this page: MongoDB query reference

property name*
additional property
any
select
Array of strings

The select array is an array of fieldIds (or part of a fieldId) that should be returned. If the select array is not provided, all fields are returned. If the select array is provided, only the fields matching the select array are returned. For example, if the select array is ["SOME"], only the fields that start with "SOME." are returned. If the select array is

["SOME.FIELD", "SOME.OTHER.FIELD"]

, the fields with the fieldId "SOME.FIELD" and "SOME.OTHER.FIELD" are returned.

includeKeyFields
boolean

Specifies whether the key fields should be included in the result, even if they are not part of the select array. If the select array is not provided, this property has no effect.

deselect
Array of strings

Note: This parameter is not yet implemented.

object
  • The sort object is an object that represents the sort criteria.
  • The keys of the sort object are the fieldIds.
  • The order of the keys in the sort object defines the sort order.
  • The sort order can be either 1 (ascending) or -1 (descending).

For example, a valid sort object would be

{ "SOME.FIELD": 1, "SOME.OTHER.FIELD": -1 }

If you want to explicitly specify, if the value (v) or the code (c) should be used for sorting, you need to include the respective property in the sort object, like so:

{ "SOME.FIELD.c": -1, "SOME.FIELD.v": 1 }
property name*
additional property
any
limit
integer

The limit is an integer that represents the maximum number of records that should be returned. If the limit is not provided, all records are returned.

resultInfo
boolean

Note: This parameter is not yet fully implemented.

Specifies whether the result info should be included in the result. The result info contains the total number of records, the number of records that were returned, and (sometimes) the number of records that were skipped. This is useful for pagination or a preview of the data.

Note: The result info is the last object in the result array. This block is marked with an itemType property like so:

{
  "itemType": "ResultInfo",
  "itemsSent": 9,
  "messages": []
}
object

Export related parameters

format
string
Enum: "csv" "xlsx"

The format of the file to export.

At the moment the supported formats are CSV and XLSX.

fieldSeparator
string
Default: ","

The field separator for the CSV file. This parameter is only relevant if the format is CSV.

The default value is a comma ,.

includeTimeInFilename
boolean
Default: true

If this parameter is set to true, the current date and time are included in the filename.

The default value is true.

Responses

Request samples

Content type
application/json
{
  • "format": "flat",
  • "locale": "de_AT",
  • "find": {
    },
  • "select": [
    ],
  • "includeKeyFields": true,
  • "deselect": [ ],
  • "sort": {
    },
  • "limit": 100,
  • "resultInfo": true,
  • "fileExport": {
    }
}

Field Info

Get All Fields

Retreive a list of fields with additional information such as field type, subtype, name and additional metadata. A filter can be provided to limit the results to a specific set of fields.

  • No filter Provided: Retreive a list a list of all fields
  • Filter Provided: Retrieve a list of fields that match the specified filter criteria. For a description of the filter parameters, see the description below (query parameters).
Authorizations:
ApiKeyAuth
query Parameters
filter
string
Example: filter=CY.KO2

Optional parameter used for filtering the results. If no filter is provided, all fields will be returned. The filter is based on the field uniqueId and can be the whole uniqueId or just parts of the parameter uniqueId.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get One Field

Retrieve information about the specified field, such as the field type, subtype, name, and additional metadata.

Authorizations:
ApiKeyAuth
path Parameters
uniqueFieldId
required
string

The unique ID of the field to retrieve.

Responses

Response samples

Content type
application/json
{
  • "layerId": "COUNTRY",
  • "fieldId": "CY.YEAR",
  • "fieldName": "Reference year",
  • "fieldType": "number",
  • "fieldSubType": "year",
  • "isCalculated": 0,
  • "info": {
    },
  • "codes": { }
}

Layer Info

Short Layers Info

Retrieve information for the specified layer, such as the description, countries, and field count.

Authorizations:
ApiKeyAuth
query Parameters
layerId
required
string
Examples:
  • layerId=HEI - Query data from the layer `HEI`

The ID of the layer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Minimal Field Information

Retreive metadata such as field type, name, category, and definition for each field in the specified layer.

Authorizations:
ApiKeyAuth
path Parameters
layerId
required
string
Examples:
  • HEI - Query data from the `Higher Educational Institutions` layer.
  • COUNTRY - Query data from the `Country` layer.

The ID of the layer

Responses

Response samples

Content type
application/json
{
  • "uniqueId": "COUNTRY:CY.KO2.ACADFREEDOMINDEX",
  • "fieldId": "CY.YEAR",
  • "fieldName": "Reference year",
  • "fieldType": "number",
  • "fieldSubType": "year",
  • "isCalculated": 0,
  • "code": "{ \"c\": \"SC.ONLY_MISS\", \"spss\": \"MS.SPSS\", \"stata\": \"MS.STATA\"}",
  • "info": {
    }
}

Single Layer Code Information

Retrieve the codes and their corresponding values for the specified single layer.

Authorizations:
ApiKeyAuth
path Parameters
layerId
required
string
Examples:
  • HEI - Query data from the `Higher Educational Institutions` layer.
  • COUNTRY - Query data from the `Country` layer.

The ID of the layer

Responses

Response samples

Content type
application/json
{
  • "property1": { },
  • "property2": { }
}

Country Data

Get country data for all countries

Get country data of all countries, including the region, region type, and the currency, ppp and exchange rate, and membership per year (if available).

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get data of a single country by country code

Retrieve country data by country code. Returns data of a single country specified by the country code (cc) like the region, region type, and the currency, ppp and exchange rate, and membership per year (if available).

Authorizations:
ApiKeyAuth
path Parameters
cc
required
string
Examples:
  • HR - Query data from the country `Croatia`

The country code

Responses

Response samples

Content type
application/json
{
  • "_id": {
    },
  • "region": "Austria",
  • "regionType": "C",
  • "cc": "AT",
  • "isoCode": "AT",
  • "description": null,
  • "years": {
    }
}