EUROCORE API

EUROCORE data portal: public API

Brief documentation

1. Get an individual data object by record ID

Main syntax: https://api.eurocore.rocks/$table/$id[.xml | .json | .jsonp | .api]

Examples:

  • https://api.eurocore.rocks/drillcore/1
  • https://api.eurocore.rocks/drillcore/1.json
  • https://api.eurocore.rocks/sample/775
  • https://api.eurocore.rocks/analysis/3620


  • 2. Search and/or get a list of records

    Main syntax: https://api.eurocore.rocks/$table

    Optional parameters:

  • to specify output format: ?format=json|jsonp|api (If not specified, default format is api)
  • to specify page: ?page=$page
  • to specify the number of records per page: ?paginate_by=$paginate_by (page limits are specified in List of Tables below. If not specified, limit is 1000 records)
  • to specify list of fields to retrieve: ?fields=$field1,$field2,...
  • to specify search criteria: ?$field__$lookuptype=$search_string (where $lookuptype is one of: exact, iexact, in, range, contains, icontains, startswith, istartswith, endswith, iendswith, gt, lt, gte, lte, isnull, hierarchy. If omitted is equivalent to __exact)
  • to display related data: ?related_data=$table&fields=$field1,$field2,...
  • to order results by a field: ?order_by=$field (ascending) or ?order_by=-$field (descending)
  • to group results by a field: ?group_by=$field
  • to exclude records by some criteria: ?$field!=$value
  • to exclude null values: ?$field__isnull!=True or ?$field__isnull=False or ?$field!=null
  • Examples:

  • https://api.eurocore.rocks/drillcore
  • https://api.eurocore.rocks/analysis/?format=json&fields=id,drillcore__name,depth,analysis_method__method&drillcore__name__icontains=kylylahti
  • https://api.eurocore.rocks/drillcore/?name__istartswith=kyly
  • https://api.eurocore.rocks/analysis_result/?parameter__parameter=Au&value__gt=3

  • OR search:

    OR search, one value from multiple fields: ?multi_search=value:$value;fields:$field1,$field2,$field3;lookuptype:$lookuptype

  • To exclude values: value:!$value
  • Lookuptype parameter can be omitted, is equivalent to exact
  • Multiple multi_search query strings can be added

  • OR search, different fields, different values: ?or_search=$field1:$value1;$field2:$value2;$field3:$value3

  • https://api.eurocore.rocks/analysis_summary/?or_search=au_ppm__gt:3;ag_ppm__gt:2&fields=drillcore_name,depth,au_ppm,ag_ppm&order_by=drillcore_name,-depth&format=json

  • 3. List of tables and fields that can currently be accessed

    analysis

    Fields:

    • acquisition_params
    • agent__acronym
    • agent__name
    • agent__parent__acronym
    • agent__parent__name
    • analysis_method__method
    • analysis_method__remarks
    • analysisresult__parameter__parameter
    • analysisresult__unit__unit
    • analysisresult__value
    • attachment__id
    • attachmentlink__attachment__url
    • dataset__id
    • dataset__name
    • date
    • date_free
    • depth
    • drillcore__diameter
    • drillcore__id
    • drillcore__name
    • end_depth
    • id
    • instrument__instrument
    • lab__lab
    • number
    • remarks
    • sample__drillcore__id
    • sample__drillcore__name
    • sample__id
    • sample__sample_number

    analysis_result

    Fields:

    • analysis__analysis_method__method
    • analysis__dataset__id
    • analysis__depth
    • analysis__drillcore__id
    • analysis__drillcore__name
    • analysis__end_depth
    • analysis__id
    • analysis__sample__id
    • analysis__sample__sample_number
    • id
    • lower_limit
    • parameter__parameter
    • unit__unit
    • value
    • value_error
    • value_txt

    analysis_summary

    Fields:

    • ag_pct
    • ag_ppm
    • al2o3_pct
    • al2o3_ppm
    • al_pct
    • al_ppm
    • analysis_id
    • analysis_method
    • as_pct
    • as_ppm
    • au_pct
    • au_ppb
    • au_ppm
    • b_pct
    • b_ppm
    • ba_pct
    • ba_ppm
    • be_pct
    • be_ppm
    • bi_pct
    • bi_ppm
    • br_pct
    • br_ppm
    • c_pct
    • c_ppm
    • ca_pct
    • ca_ppm
    • cao_pct
    • cao_ppm
    • cd_pct
    • cd_ppm
    • ce_pct
    • ce_ppm
    • cl_pct
    • cl_ppm
    • co_pct
    • co_ppm
    • cr_pct
    • cr_ppm
    • cu_pct
    • cu_ppm
    • dataset_id
    • depth
    • drillcore_id
    • drillcore_name
    • end_depth
    • fe2o3_pct
    • fe2o3_ppm
    • fe_pct
    • fe_ppm
    • ga_pct
    • ga_ppm
    • id
    • ir_pct
    • ir_ppb
    • ir_ppm
    • k2o_pct
    • k2o_ppm
    • k_pct
    • k_ppm
    • la_pct
    • la_ppm
    • li_pct
    • li_ppm
    • mg_pct
    • mg_ppm
    • mgo_pct
    • mgo_ppm
    • mn_pct
    • mn_ppm
    • mno_pct
    • mno_ppm
    • mo_pct
    • mo_ppm
    • na2o_pct
    • na2o_ppm
    • na_pct
    • na_ppm
    • nb_pct
    • nb_ppm
    • ni_pct
    • ni_ppm
    • os_pct
    • os_ppb
    • os_ppm
    • p2o5_pct
    • p2o5_ppm
    • p_pct
    • p_ppm
    • pb_pct
    • pb_ppm
    • pd_pct
    • pd_ppb
    • pd_ppm
    • pt_pct
    • pt_ppb
    • pt_ppm
    • rb_pct
    • rb_ppm
    • re_pct
    • re_ppb
    • re_ppm
    • rh_pct
    • rh_ppb
    • rh_ppm
    • ru_pct
    • ru_ppb
    • ru_ppm
    • s_pct
    • s_ppm
    • sample_id
    • sample_number
    • sb_pct
    • sb_ppm
    • sc_pct
    • sc_ppm
    • se_pct
    • se_ppm
    • si_pct
    • si_ppm
    • sio2_pct
    • sio2_ppm
    • sn_pct
    • sn_ppm
    • sr_pct
    • sr_ppm
    • te_pct
    • te_ppm
    • th_pct
    • th_ppm
    • ti_pct
    • ti_ppm
    • tio2_pct
    • tio2_ppm
    • u_pct
    • u_ppm
    • v_pct
    • v_ppm
    • w_pct
    • w_ppm
    • y_pct
    • y_ppm
    • zn_pct
    • zn_ppm
    • zr_pct
    • zr_ppm

    attachment

    Fields:

    • analysis__id
    • attachment_type__value
    • description
    • filename
    • filesize
    • id
    • mime_type__extension
    • mime_type__mime
    • original_filename
    • title
    • url
    • uuid

    dataset

    Fields:

    • agent__name
    • analysis__drillcore__id
    • id
    • name

    deposit

    Fields:

    • adj_rock1
    • adj_rock2
    • adj_rock3
    • adj_rock4
    • age_host__age
    • age_min__age
    • alteration
    • alternative_names
    • dip
    • discovery
    • district
    • genetic_type__id
    • genetic_type__name
    • grade
    • host_rock1
    • host_rock2
    • id
    • latitude
    • longitude
    • main_commodity
    • metal_group__id
    • metal_group__name
    • metal_subgroup__id
    • metal_subgroup__name
    • metam_grade
    • metgen_area
    • mined_mt
    • mineralogy1
    • mineralogy2
    • mining_method
    • mining_start
    • mining_time
    • name
    • ore_distrib
    • other_commodities
    • plunge
    • radiom_age_host
    • radiom_age_min
    • reference__id
    • reference__reference
    • remarks
    • reserve
    • resource
    • shape
    • size_cat
    • status
    • strike
    • structure
    • tect_ctrl
    • texture
    • tonnage

    Related data:

    • reference

    dip

    Fields:

    • azimuth
    • depth
    • dip
    • drillcore__id
    • drillcore__name
    • id

    drillcore

    Fields:

    • analysis__analysis_method__method
    • analysis__analysisresult__parameter__parameter
    • analysis__analysisresult__unit__unit
    • analysis__dataset__id
    • analysis__dataset__name
    • core_depositor__acronym
    • core_depositor__id
    • core_depositor__name
    • deposit__alternative_names
    • deposit__genetic_type__id
    • deposit__genetic_type__name
    • deposit__id
    • deposit__main_commodity
    • deposit__metal_group__name
    • deposit__metal_subgroup__name
    • deposit__name
    • deposit__other_commodities
    • diameter
    • drilling_agent__name
    • drilling_year
    • elevation
    • hole_azimuth
    • hole_dip
    • hole_length
    • id
    • latitude
    • longitude
    • name
    • number_boxes
    • remarks

    Related data:

    • drillcore_box

    drillcore_box

    Fields:

    • attachmentlink__attachment__mime_type__extension
    • attachmentlink__attachment__url
    • attachmentlink__attachment__uuid
    • drillcore__id
    • drillcore__name
    • end_depth
    • id
    • image__filename
    • image__mime_type__extension
    • image__url
    • image__uuid
    • number
    • start_depth

    drillcore_diameter

    Fields:

    • diameter
    • drillcore__id
    • end_depth
    • id
    • start_depth

    drillcore_interval

    Fields:

    • drillcore__id
    • end_depth
    • id
    • image__url
    • start_depth

    drillcore_summary

    Fields:

    • analyses
    • attachments
    • boxes
    • ctscans
    • dips
    • drillcore__id
    • id
    • lithologies
    • references
    • rqds
    • samples
    • stratigraphies
    • structures

    lithology

    Fields:

    • agent_described
    • color__color
    • color_attribute__attribute
    • date_described
    • description
    • drillcore__id
    • drillcore__name
    • end_depth
    • field_name
    • id
    • mineralogical_rock_name
    • remarks
    • rock_class__id
    • rock_class__name
    • rock_name__id
    • rock_name__name
    • start_depth

    ore_genetic_type

    Fields:

    • id
    • name

    parameter

    Fields:

    • analysisresult__analysis__sample__sample_number
    • analysisresult__analysis__sample__site__name
    • analysisresult__unit__unit
    • id
    • parameter

    reference

    Fields:

    • author
    • deposit__id
    • id
    • publisher
    • reference
    • title
    • url
    • year

    rqd

    Fields:

    • agent
    • date
    • depth
    • drillcore__id
    • drillcore__name
    • end_depth
    • fractures
    • id
    • remarks
    • rqd

    sample

    Fields:

    • depth
    • drillcore__id
    • drillcore__name
    • end_depth
    • id
    • sample_number

    spectrum

    Fields:

    • analysis__id
    • analysis__instrument__instrument
    • data
    • energy_range__value
    • id
    • remarks

    structure

    Fields:

    • agent_described__name
    • comments
    • date_described
    • depth_actual
    • depth_estimated
    • dip
    • direction
    • drillcore__id
    • drillcore__name
    • id
    • structure_type__name

    teaching_module

    Fields:

    • author
    • date_added
    • description
    • files__title
    • files__url
    • id
    • institution__name
    • title

    x

    Fields:

    • id