swipos-API (acacia)

Download OpenAPI specification:Download


The swipos-API provides an application interface to the Swiss Positioning Service swipos. This is the main documentation which includes all the swipos-API documentation for developers.

The swipos-API is part of the swipos-GIS/GEO product. To access the swipos-API, you need a valid swipos-GIS/GEO license, which can be ordered via the Pricing and Order page.

The swipos-API currently consists of the RINEX Download, which offers an interface to the AGNES station information and their RINEX data (CORS).

Data availability

RINEX data is available for full hours, or it can be requested for a desired duration. A full hour is available roughly 5 minutes after the hour is complete. You can request data for the last 356 days.

swipos-API conventions

When using the swipos-API, the following conventions apply:

Time

Dates, times and durations are expressed in a custom format that is based on ISO 8601.

GPS time is usually given in seconds, and is related to the international atomic time (TAI). This differs from the Universal Time Coordinated (UTC), which is kept synchronized to the earth's rotation by leap seconds. The relation can be expressed as GPSTime = UTC + 18s

To simplify the use of the swipos-API, we kept the formats proposed in ISO 8601, and added G as a timezone indicator instead of the Z used for UTC time. Times that do not end with G are treated as having invalid format.

The swipos-API accepts only durations of up to 6 hours, so all durations must start with PT (period, time), followed by the duration in hours and/or minutes.

If requesting an hour file, it is enough to fill the hour; it is not necessary to give minutes or seconds.

Examples:

  • basic format: yyyyMMddThhmmG / 20200821T1313G OR yyyMMddThhG / 20210217T05G
  • extended format: yyyy-MM-ddThh:mmG / 2020-08-21T13:13G
  • duration (in hours, minutes): PTnHmmM / PT3H30M

As of now, times without the timezone G will not be considered valid times.

Epochs

The RINEX data is recorded at the base station and will be sent every hour to the swipos servers. One hour file contains 3600 epochs if all recordings were successful. An hour file will be available around 20 minutes after the hour has ended.

Please note, that the delivered RINEX files may not contain 100% of the epochs due to recording issues.

Coordinate system

Unless otherwise stated, the swipos-API uses latitude and longitude in decimal degrees in the ETRS89 reference system.

Example: 46.28310, 7.53854

Note: The coordinates in the base station information are to be used for representation only, they are not intended for geodetic calculations. The geocentric coordinates contained in the RINEX file as approximate position can be used as precise coordinates.

RINEX 3.04

The delivered RINEX format is 3.04 with 1 second sampling rate as recorded at the base stations (Trimble NetR9 or Leica GR50). To manipulate the RINEX, the RINEX GNSS Data Conversion and Manipulation Toolbox "gfzrnx" is used: Nischan, Thomas (2016): GFZRNX - RINEX GNSS Data Conversion and Manipulation Toolbox. GFZ DataServices

The RINEX files are compressed with hatanaka. The download includes both the observation and navigation files.

Station code

The base station is always identified by its 4 character station code, which is case sensitive and must use capital letters, as returned by the /list endpoint.

Example: ZIM2

Authentication

The swipos-API uses basic authentication for the calls to request-hour and request-data. Any swipos login with a valid swipos-GIS/GEO License can be used with the exception of Pay-per-Use licenses, which are not supported.

swipos-API specification

The api specification was defined as openapi version 3.0.0 openapi spec.
Here you can find the current developement api specification api-docs.yml.
Here you can find the current productive api specification api-docs.yml.
To generate clients use openapi-generator.

Versioning

Versions are named after plants. Version are alphabetically sorted, where letters later in the alphabet corresnpond with a version published later in time. For minor releases, the second or third letter of the name is significant.

Examples:

  • acacia - 1st release
  • aconite - 1st minor release
  • begonia - 2nd release

RINEX

swipos-API endpoints that provide RINEX services.

Returns a list of all AGNES stations.

The request returns an array of BaseStation objects, which for each base station give the station code, postion and if the station is still operational.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

The base station object of the nearest active AGNES station.

Specify a point and get the closest active AGNES station back. If no time arguments are supplied, returns nearest station without consideration if the station is operational at the moment or not. In case of 'time_from' argument, returns nearest station that was active at that moment. In case of 'time_from' and 'time_to' or 'period' arguments, returns a station with activity in described time frame.

Authorizations:
basicAuth
query Parameters
latitude
required
number <double>
Example: latitude=46.38851

Latitude of your position. Example 46.38851

longitude
required
number <double>
Example: longitude=7.05977

Longitude of your position. Example 7.05977

time_from
string

Filter for stations that were operational starting at this time point (e.g. yyyy-MM-ddThh:00G or yyyyMMddThh00G)

time_to
string

Filter for stations that were operational until this time point (e.g. yyyy-MM-ddThh:00G or yyyyMMddThh00G)

Responses

Response samples

Content type
application/json
{
  • "base_station": {
    },
  • "distance": 12.64378
}

Request an existing hour RINEX file for a station code.

Request the hour file from a station with the station_code (eg. SAA2) and hour (eg. "2020-08-17T13:00G" or "2020081713G"). The endpoint will return the coresponding rinex hour file. Note The hour file is written in GPS time, so has 18s offset to UTC times. Use this if you need a full hour.

Authorizations:
basicAuth
query Parameters
station_code
required
string

Station code

time
required
string

Requesting hour starting at (e.g. yyyy-MM-ddThh:00G or yyyyMMddThh00G)

Responses

Response samples

Content type
application/json
{
  • "message": "There are no params at all.",
  • "error_code": 104
}

Request up to 6 hours of rinex data from one AGNES station.

Use this you need data from more than one RINEX hour files. For requesting, you need the AGNES station code as well as the starting date and time. You can either give a duration or an end time. The result will be submitted to the provided callback url. Note One request can handle a maximum of 6 hours at once. If you need one hour only, use 'request-hour' instead.

Authorizations:
basicAuth
Request Body schema: application/json
station_code
required
string

A valid 4-character base station code in capital letters.

time_from
required
string

An ISO 8601 timestamp that defines start of desired period.

time_to
string

An ISO 8601 timestamp that defines end of desired period.

duration
required
string

An ISO 8601 period that defines length of desired period. Minimum duration must be 5 minutes (PT5M)

callback_url
string <uri>

This url will be triggered with a POST request with CallbackAnswer in body.

include_log
string

If there is a value like ‘true’, ‘1’, ‘yes’, ‘y’, case insensitive, resulting archive will contain logs from merge process.

observation_only
string

If there is a value like ‘true’, ‘1’, ‘yes’, ‘y’, case insensitive, resulting archive will not contain NAV files. In case 'include_log' is false, the resulting file will be a single observation rinex file.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "station_code": "AIGE",
  • "time_from": "2020-08-17T13:00G",
  • "time_to": "2020-08-17T13:23G",
  • "duration": "PT23M",
  • "include_log": "yes",
  • "observation_only": "yes"
}

Response samples

Content type
application/json
{
  • "request_id": "db610686-4ce8-403e-8338-85437b326618",
  • "station_code": "AIGE",
  • "time_from": "2020-08-17T13:00G",
  • "time_to": "2020-08-17T13:23G",
  • "duration": "PT23M",
  • "with_callback": true,
  • "with_email_notification": true,
}

Callback payload samples

Callback
POST: A POST request with the request-data result.
Content type
application/json
{}