How use REST inteface of biotronics.eu

Everyone can build their own biotronics software, which uses the portal database. Database is open on 80 port (no SSL) via REST interface and login is not needed. Main address of rest interface starts from address:

http://biotronics.eu/rest/

You have to add sub-address of entity:

 

Obligatory you have to provide the _format parameter:

_format=json

Example. http://biotronics.eu/rest/eav-paths?_format=json 

You will get:

[{"nid":[{"value":1667}],"uuid":[{"value":"9b11fc7b-fba7-4dc8-a0bb-5cacb4a8ef8d"}],"vid":[{"value":3367}],"langco...

Allowed formats: hal_json, json, xml

 

REST interface answer could return maximum 20 items. To see more you have to use pager:

page=<number of page>

First page has number 0

Example. http://biotronics.eu/rest/eap-therapies?_format=json&page=2

 

Use of title filter :

title=<contained text>

Example:  http://biotronics.eu/rest/eap-therapies?_format=json&title=headache

will return all entietes contain a word headache inside title e.g.

"title": [
  {
"value": "Headaches caused by changes in cervical vertebra (Bóle głowy wywołane zmianami w kręgach szyjnych)"
}
],

 

Narrow down the range of returned entities you can use if you want to show only liked items of user. For that you have to list all node identifiers (nid) in URL path. You can return only one item or more than one if you use + character.

For this you use Drupal context filter. 

E.g. http://biotronics.eu/rest/eap-therapies/1658+1435+1108?_format=json

or 

http://biotronics.eu/rest/eap-therapies/1658+1435+1108?_format=json&title=head

1658, 1435, 1108 are item nid's . Only item with 1108 nid has "head" string in title value.

The pictures below show how to use  the contextual filter as liked items :

imageimage

 

Filters and most significant json fields of entities.

* character means that field is filtered, n is number of returned item.

iontophoresis-substances

  • title=<contained text>

 

  • [n].title[0].value*
  • [n].field_active_electrode[0].value
  • [n].field_mol_mass[0].value
  • [n].field_valence[0].value
  • [n].nid[0].value
  • [n].langcode[0].value

 

 

eap-therapies

  • title=<contained text>
  • field_baps_value=<contained text>

 

  • [n].title[0].value*
  • [n].field_baps[0].value*
  • [n].body[0].processed
  • [n].body[0].value
  • [n].nid[0].value
  • [n].langcode[0].value

 

bioresonance-therapies

  • title=<contained text>
  • device=<string>  allowed values: freePEMF, multiZAP%2B%2B (i.e. multiZAP++), multiZAP, zapper-plus
  • langcode=<string>  allowed values: pl, en

 

  • [n].title[0].value*
  • [n].field_skrypt[0].value
  • [n].body[0].processed
  • [n].body[0].value
  • [n].nid[0].value
  • [n].langcode[0].value*
  • [n].field_urzadzenie[ ].value*     device, array field depended on valid devices  . See below.
     "field_urzadzenie": [
             {
                  "value": "freePEMF"
             },
             {
                 "value": "multiZAP++"
             }

E.g. show in XML format all therapies for multiZAP in English language for rehabilitation

http://biotronics.eu/rest/bioresonance-therapies?_format=xml&title=rehabilitation&device=multiZAP&langcode=en

 

 

English