< Back to API menu

New VRS survey

First, create the survey and the related VRS.

POST http://api.rinexlab.com/v1/vrs/surveys

The authentication token has to be included as a bearer token in the request headers.

The request body is JSON content with the survey and virtual stations details. The stations list must be a list even if there is only one station in it. Please note that virtual stations must be all created here. You can't add one to the survey afterwards.

{
    "token":<vrs_token>,
    "datum":<datum>,
    "name":<survey_name>,
    "vrs": [
        {
            "first_epoch": <vrs_first_epoch>,
            "last_epoch": <vrs_last_epoch>,
            "name": <vrs_name>,
            "position": <vrs_position>,
            "rate": <vrs_rate>
        },
        ... # up to 4 virtual station objects
    ]
}

With :

  • vrs_token (str) : the VRS token you subscribed. It must be valid and have some remaining credits ;
  • datum (str) : the survey datum. Accepted values are etrf2000, rgf93, nad83, sirgas, rgr92, etrf2014, itrf2014 ;
  • survey_name (str) : the name of the survey ; MUST be a unique value
  • vrs_first_epoch (str) : first virtual observation datetime in GPS time formatted in "%Y-%m-%d %H:%M:%S" ;
  • vrs_last_epoch (str) : last virtual observation datetime in GPS time formatted in "%Y-%m-%d %H:%M:%S". The maximum time span from the first to the last epoch is 24 hours ;
  • vrs_name (str) : name of the virtual station ;
  • vrs_position (str) : the position of the virtual station in the survey datum formatted in a string with "<latitude>, <longitude>" in decimal degrees. The height is not to be specified as this is set automatically during the generation process ;
  • vrs_rate (float) : the rate in seconds of the virtual observations record. Possible values are 1, 2, 5, 10

The server response is expected to be a code 201 with the following JSON content.

{
    "created_at": <creation_datetime>,
    "datum": <datum>,
    "id": <survey_id>,
    "name": <survey_name>,
    "vrs": [
        {
            "first_epoch": <vrs_first_epoch>,
            "id": <vrs_id>,
            "last_epoch": <vrs_last_epoch>,
            "name": <vrs_name>,
            "position": <vrs_position>,
            "rate": <vrs_rate>,
            "rinex": <vrs_rinex>,
            "status": <vrs_status>
        },
        ...
    ]
}

With :

  • creation_datetime (str) : time of creation, formatted in "%Y-%m-%d %H:%M:%S" ;
  • datum (str) : the survey datum ;
  • survey_id (int) : the unique ID of the survey ;
  • survey_name (str) : the name of the survey ;
  • vrs_first_epoch (str) : first virtual observation datetime ;
  • vrs_id (int) : the unique ID of the virtual station ;
  • vrs_last_epoch (str) : last virtual observation datetime ;
  • vrs_name (str) : name of the virtual station ;
  • vrs_position (str) : the position of the virtual station ;
  • vrs_rate (int) : the rate in Hz of the virtual observations record
  • vrs_rinex (str) : the URL of the virtual RINEX file - at this point it is empty because it has not been created yet ;
  • vrs_status (int) : the status of the rover processing. Possible values are 0 (pending), 1 (processing), 2 (done), 3 (failed). 

The virtuel RINEX creation is going to start automatically after the survey has been posted.

Here is an example of how to post a new VRS survey in Python 3.X.

import requests

host = 'http://api.rinexlab.com'
version = 'v1'

auth_token = 'ey...Ugs' # token retrieved from the login process
vrs_token = '_1M...HFN' # VRS token you subscribed for
datum = 'etrf2000'

r = requests.post(f'{host}/{version}/vrs/surveys',
	json={
		"token": vrs_token,
		"datum": datum,
		"name": "my new VRS survey",
		"vrs": [
			{
				"first_epoch": "2020-12-06 10:00:00",
				"last_epoch": "2020-12-06 14:00:00",
				"name": "VRSI",
				"position": "49.218371, 5.553621",
				"rate": "1"
			},
			{
				"first_epoch": "2020-12-06 10:00:00",
				"last_epoch": "2020-12-06 14:00:00",
				"name": "VRSJ",
				"position": "49.218371, 4.553621",
				"rate": "1"
			}
		]
	},
headers={'Authorization': f'Bearer {auth_token}'}
)
survey = r.json()
print(survey)

Retrieve VRS surveys

GET http://api.rinexlab.com/v1/vrs/surveys

Search for a survey based on its name like this.

GET http://api.rinexlab.com/v1/vrs/surveys?search=<survey_name>

It's a matching search so you may input only the first characters of the survey name.

Here is a survey search example in Python 3.x.

import requests

host = 'http://api.rinexlab.com'
version = 'v1'

auth_token = 'ey...Ugs' # token retrieved from the login process

r = requests.get(f'{host}/{version}/vrs/surveys',
	params={
		"search": <survey_name>
	},
headers={'Authorization': f'Bearer {auth_token}'}
)

print(r.json())

Retrieve the details of a VRS survey

GET http://api.rinexlab.com/v1/vrs/surveys/<survey_id>

Retrieve the details of a virtual station

GET http://api.rinexlab.com/v1/vrs/surveys/<survey_id>/stations/<vrs_id>

Download the virtual RINEX

GET http://api.rinexlab.com/v1/vrs/surveys/<survey_id>/stations/<vrs_id>/rinex

< Back to API menu