Skip to content
Dariusz Jarosz edited this page Apr 7, 2022 · 10 revisions

Installation

The traveler API can by found on pypi repository.. It can be installed using pip with the following command.

pip install Traveler-API

Getting API Key

Users can now request API key from the profile page on the traveler web application. This can be done by clicking on your name in the upper right corner and clicking profile in the drop down. Once on the profile page you should see a button that says "Generate API Key". If the button is not there contact your administrator to be given the API permission.

Initializing the API

Now that you have the API Key you can initialize the API and start querying the traveler system. The API Key will allow most read only calls and only some write commands. The other commands are reserved for higher level system accounts.

from traveler_api_factory import TravelerApiFactory

traveler_host = 'https://traveler.aps.anl.gov'
traveler_user = 'user'
traveler_api_key = '1234ApiKey'

factory = TravelerApiFactory(traveler_host, traveler_user, traveler_api_key)

Updating the traveler data using the API

This is one write calls that is possible to do using the API Key. It will allow updating traveler entries using the API.

Clone this wiki locally