This Page

Quick search

The InterMine API is made more accessible through
the publication of a number of client libraries in
different languages. For the purposes of this tutorial
we will use the Python client library for the illustration
of examples, but any of the client libraries (in Perl, Java,
Ruby and JavaScript) provides similar functionality.
Similarly we will use FlyMine (www.flymine.org) as an
example of an InterMine web-service, but the techniques
discussed here are applicable for any of available
implementations.

In the web-application interface we ‘log in’ to gain
access to our personal data. When using the web-service
API we speak of authentication as the process whereby
your requests are mapped to a particular user account.

The recommended manner of authentication is through the
use of API tokens; you can get yours by visiting the
appropriate section of the web-application
(http://www.flymine.org/query/mymine?tab=api). The token
is a long string which is unique across the mine - since
its use is equivalent to your password, remember to keep
it safe.

If the URL for the mine is incorrect, or the token is, an error
will be thrown.

While it is also possible use your username and password to
authenticate with the webservice. This is strongly discouraged,
due to the security implications of transmitting your password,
not to mention storing it on disk in order to use it in code.