Public endpoints are available for pulling ATOs, Instructors and Certifications data in JSON, XML or CSV formats
Example:
http://ptd.vatsim.net/api/atos.json #=> returns active ATOs listing in JSON format
http://ptd.vatsim.net/api/atos.xml #=> returns active ATOs listing in XML format
http://ptd.vatsim.net/api/atos.csv #=> returns active ATOs listing in CSV format
http://ptd.vatsim.net/atos #=> returns active ATOs listing as HTML (part of the web frontend)
Example:
http://ptd.vatsim.net/api/instructors.json #=> returns instructors listing in JSON format
http://ptd.vatsim.net/api/instructors.xml #=> returns instructors listing in XML format
http://ptd.vatsim.net/api/instructors.csv #=> returns instructors listing in CSV format
http://ptd.vatsim.net/instructors #=> returns instructors listing as HTML (part of the web frontend)
Example:
http://ptd.vatsim.net/api/certifications.json #=> returns certifications listing in JSON format
http://ptd.vatsim.net/api/certifications.xml #=> returns certifications listing in XML format
http://ptd.vatsim.net/certifications #=> returns certifications listing as HTML (part of the web frontend)
All read-only APIs are rebuilt on a 12 hours cache
The PTD application provides an API for programmatically issuing pilot rating certifications. You can hook this to your own ATO application in order to authomate the process of issuing pilot ratings and to avoid the manual labour of using the backend web interface.
In order to create an pilot certification, you send an HTTP POST request to
http://ptd.vatsim.net/certifications
with the JSON details
of the new certification and with your ATO API key (sent as a HEADER along with the request).
The following parameters need to be sent with the request:
cid
- the VATSIM id of the pilot traineeinstructor
- the VATSIM id of the instructor issuing the upgrade. Note, this instructor must
exist as a user in the PTD applicationrating
- a single digit, corresponding to the rating issued, i.e. 1
for "P1", 2
for "P2", etc.The API key for your ATO will be provided to you by the PTD staff.
Example:
# The following request will create a P2 rating certification for VATSIM user with cid 1175035
# issued from instructor with the VATSIM cid of 1111111. The ATO issuing the certification will
# be identified and included based on the supplied API key.
curl -X POST -H "Content-Type: application/json" -d '{"cid": "1175035","instructor":"1111111", "rating":"2"}' http://ptd.vatsim.net/certifications -H 'Authorization: Token token="your-ato-api-key"'
Notes:
can :manage, :all
cannot :create, Trainee
cannot :destroy, [Trainee, Ato, User]
can :read, :all
can :history, :all
can :export, :all
can :manage, [ApiKey, Ato, User, Trainee, Certificate, Certification]
cannot :destroy, [Ato, User, Trainee, Certification]
cannot :create, Trainee
cannot :export, Trainee
can :read, :all
cannot :read, ApiKey
can :history, [Ato, Certificate, Certification]
can :create, Certification
can :edit, Certification, :ato => {id: user.ato.id}
can :create, User, :ato_id => user.ato_id
can :read, :all
cannot :read, ApiKey
can :history, [Ato, Certificate, Certification]
can :create, Certification
can :edit, Certification, :ato => {id: user.ato.id}