RESTful Interface for IGSN Registration

GA has implemented a RESTful API for the IGSN registration system. Note that authentication is required for any data write operation, and each user can only insert/modify/delete records belonging to his/her own organisation.

Resources and Operations

Below is a list of resources and their respective RESTful operations which have been implemented so far. Please note that the data used in the examples has been randomly generated and is not intended to be realistic.

Resource: IGSNList

The IGSNList resource is intended to allow querying of IGSNs registered against specific organisations or against all organisations

Operation: GET

Examples: GET, GET, GET or GET

Note: Special organisation_code value "all" allows users to view records from all organisations

No authentication required

Optional HTTP Parameters to restrict the results returned are as follows:

Resource: IGSN

The IGSN resource allows individual IGSN records to be created, retrieved, modified or deleted.

Operation: GET

Example: GET retrieves a single record AU1. No authentication required

Operation: POST

Example: POST writes a new record AU999.

Example: POST writes a new record with the prefix AUVI and the next auto-generated numeric sample_id.

Basic authentication required.

This operation will fail if IGSN prefix is different to user’s organisation.

Body posted should be something like the following:



"organisation_code": "GA",

"date_acquired": "2017-12-01",

"geometry_type": "Point",

"spatial_reference": "Geocentric Datum of Australia 1994",

"west_ordinate": -130,

"east_ordinate": -110,

"south_ordinate": -40,

"north_ordinate": -25,

"top_depth": null,

"base_depth": null,

"country": "AUS",

"state": "ACT",

"current_location": "GA Services building",

"access_rights": "Private",

"publisher": "GA",

"sample_type": "Automated",

"method_type": "Auger",

"material_type": "Gas",

"lithology": "acidic igneous material",

"sampling_feature_type": "Borehole",

"remark": "Test sample",

"username": "ga",

"active": 1



Operation: PUT

Example: PUT will write changes to an existing record or attempt to add a new record.

Example: PUT will add a new record with the prefix AUVI and the next auto-generated numeric sample_id.

Basic authentication required.

Body can consist of any valid key/value pairs from the complete record above, e.g:



"url": "",

"active": 1



Operation: DELETE

Example: DELETE will set the active flag in the record for AU7 to zero (without actually deleting the record). Basic authentication required.

Resource: IGSNLookups

The IGSNLookups resource provides a means of obtaining a dump of all valid values for the various metadata fields sourced from vocabularies. Note that these values are the only ones which can be accepted for the various fields, so the user must be responsible for mapping any non-standard values in the organisation’s internal records to specific values from the relevant section of the data structure returned by the IGSNLookups “get” query.

Operation: GET

Example: GET will return a JSON dump of all valid lookup values. No authentication required.