ATN Application Release 3.0

From AccessText Network Wiki
Jump to: navigation, search

Base URL

API Reference

The API is a collection of calls for accessing AccessText database records over the web. Using the API, you can query and receive a list of records with associations from the database or add/edit single records within a table.

API Call Overview

  • The API is invoked as a URL sent in a GET request.
  • The response is in XML format.
  • The API call parameters are accepted in any order.
  • The username and apikey parameters are required and used to authenticate the user.
  • You should always use secure HTTPS as HTTP is not supported.

Available Calls

Table Call Description
requests do_query.xml Return a list of requests with associated publisher, authorized_user, user, title and media data.
requests do_edit.xml Update a single record in the requests table. The request record has a built-in id field which provides the unique key for that record within the table.
requests do_cancel.xml Cancel a single record in the requests table. The request record has a built-in id field which provides the unique key for that record within the table. Only AuthorizedUsers can invoke this API call.
requests do_add.xml Create a single record in the requests table. Only AuthorizedUsers can invoke this API call. Exchange requests cannot be added using the API.
messages do_query.xml Return a list of messages with associated request, authorized_user, user and publisher data.
messages do_add.xml Add a single record in the messages table.
titles do_query.xml Returns title information. Useful when you need the title_id which is a required parameter for adding a request.
titles do_add.xml Create a single record in the titles table. Only AuthorizedUsers can invoke this API call. Useful when you need the title_id which is a required parameter for adding a request.

Requests

do_query.xml

Use do_query.xml to get all records from the requests table.

This call is invoked as:

https://accesstext.gatech.edu/atn/requests/do_query.xml?username=[your user name]&apikey=[your apikey]

where [your user name] and [your apikey] are the actual values for these parameters.

Optionally, you can pass the modified parameter with a date/time to limit the return to request records modified after a certain date/time.

This call is invoked as:

https://accesstext.gatech.edu/atn/requests/do_query.xml?username=[your user name]&apikey=[your apikey]&modified=[datetime]

where [datetime] is in the format YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS.

A sample request would look like:

https://accesstext.gatech.edu/atn/requests/do_query.xml?username=johndoe&apikey=x7z412mg6x8oht2r&modified=20120701080000

All records from the requests table that the user johndoe is allowed to view and that have been modified after 8 AM on July 1, 2012 will be returned in XML format.

To return a specific request, you can pass the id parameter of the request you would like returned.

This call is invoked as:

https://accesstext.gatech.edu/atn/requests/do_query.xml?username=[your user name]&apikey=[your apikey]&id=[id]

where [id] is an integer.

A sample request would look like:

https://accesstext.gatech.edu/atn/requests/do_query.xml?username=johndoe&apikey=x7z412mg6x8oht2r&id=12345

The request with unique ID 12345 the user johndoe is allowed to view will be returned in XML format.

Data from records related to the request record will also be returned. Data tables related to the request are the Authorized User making the request, all users associated to the Authorized User account, the Title requested, the Publisher associated with the request, and the Media record related to the request if the request is an Exchange Request.

All fields for the Request, Authorized User, Title, and Media record will be returned. For the Publisher and User, only pertinent fields will be returned.

If multiple request records are returned, each record is contained within a <requests> tag. All records are contained within the <atnapi> tag.

A sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <id>554513</id>
  <authorized_user_id>1</authorized_user_id>
  <title_id>299084</title_id>
  <media_id>268</media_id>
  <publisher_id>1</publisher_id>
  <student_id>654</student_id>
  <course/>
  <instructor/>
  <term/>
  <request_type>Exchange</request_type>
  <status>Pending Approval</status>
  <format_requested>PDF</format_requested>
  <approval_method>Manual</approval_method>
  <date_approved/>
  <approval_assigned_to>11536</approval_assigned_to>
  <approved_by/>
  <date_archive_requested/>
  <date_archive_received/>
  <projected_fulfillment_date/>
  <date_fulfilled/>
  <fulfillment_assigned_to/>
  <fulfilled_by/>
  <fulfillment_method/>
  <format_delivered/>
  <tracking_number/>
  <download_expiration>8/21/17, 7:13 PM</download_expiration>
  <date_received/>
  <cancel_request>0</cancel_request>
  <cancellation_reason/>
  <date_cancelled/>
  <cancelled_by/>
  <publisher_file_unavailable>0</publisher_file_unavailable>
  <disposition_date/>
  <disposition_code/>
  <disposition_reason/>
  <notes/>
  <download_available_days/>
  <number_downloads_allowed/>
  <download_information/>
  <download_link/>
  <desk_copy_sent/>
  <created>8/7/17, 7:13 PM</created>
  <created_by>schooluser</created_by>
  <modified>8/7/17, 7:13 PM</modified>
  <modified_by>schooluser</modified_by>
  <media>
   <id>268</id>
  </media>
  <publisher>
   <id>1</id>
   <publisher_name>Pearson Education</publisher_name>
  </publisher>
  <title>
   <id>299084</id>
   <reference>0136050409</reference>
   <title>Government by the People</title>
   <author>Magleby, David B.; Light, Paul C.</author>
   <isbn10>0136050409</isbn10>
   <isbn13>9780136050407</isbn13>
   <edition>23</edition>
   <copyright>2009</copyright>
   <imprint>Longman Publishing</imprint>
   <publisher_id>1</publisher_id>
   <notes>This is the notes field.</notes>
   <publisher_file_unavailable>0</publisher_file_unavailable>
   <title_unavailable>0</title_unavailable>
   <manual_approval>0</manual_approval>
   <source/>
   <stored_file_format/>
   <available_formats>PDF</available_formats>
   <created>7/22/10, 1:45 PM</created>
   <modified>10/12/12, 7:38 AM</modified>
   <created_by/>
   <modified_by/>
  </title>
  <authorized_user>
   <id>1</id>
   <authorized_user_name>GA Tech</authorized_user_name>
   <institution_type>Other</institution_type>
   <member_since>4/24/08</member_since>
   <last_verified>7/31/15</last_verified>
   <address1>512 Means Street NW</address1>
   <address2>Suite 250</address2>
   <city>Atlanta</city>
   <state>GA</state>
   <zip_code>30318</zip_code>
   <country>USA</country>
   <website>http://www.accesstext.org</website>
   <billing_name>Bob Martinengo</billing_name>
   <billing_title>test</billing_title>
   <billing_addr1>512 Means St. NW</billing_addr1>
   <billing_addr2>Suite 250</billing_addr2>
   <billing_city>Atlanta</billing_city>
   <billing_state>GA</billing_state>
   <billing_zip>30318</billing_zip>
   <billing_phone>4048947681</billing_phone>
   <billing_fax/>
   <billing_email>dawnveronica@gmail.com</billing_email>
   <notes>This is the AU notes field.</notes>
   <system/>
   <other_institution_type>Testing</other_institution_type>
   <send_request_email_to>Primary Contact</send_request_email_to>
   <created>4/24/08, 11:32 AM</created>
   <modified>8/3/17, 6:14 PM</modified>
   <created_by/>
   <modified_by>dawn</modified_by>
   <users>
    <id>11534</id>
    <authorized_user_id>1</authorized_user_id>
    <username>Lucy_Aims</username>
    <full_name>Lucy Aims</full_name>
    <email>lucy.aims@cidi.gatech.edu</email>
    <title>DSP<title/>
    <phone>5555555555</phone>
    <primary_contact>0</primary_contact>
    <disable_email>0</disable_email>
   </users>
   <users>
    <id>8954</id>
    <authorized_user_id>1</authorized_user_id>
    <username>schooluser</username>
    <full_name>SchoolUser</full_name>
    <email>dawn@gatech.edu</email>
    <title>AccessText Network Coordinator</title>
    <phone>8662714968</phone>
    <primary_contact>1</primary_contact>
    <disable_email>0</disable_email>
   </users>
  </authorized_user>
 </requests>
</atnapi>

do_edit.xml

Use do_edit.xml to update a single record in the requests table.

This call is invoked as:

https://accesstext.gatech.edu/atn/requests/do_edit.xml?username=[your user name]&apikey=[your apikey]&id=[id of record to update]&field1=value1&field2=value2 ...

where [your user name] and [your apikey] are the actual values for these parameters. The request record that will be updated is the request record with the id field equal to the value passed in for the id parameter. Fields and update values are passed as field=value parameters. Only the fields specified in the call are changed. Unspecified fields remain unchanged.

Only the following fields on the request record can be updated using the do_edit.xml call:

  • date_approved
  • date_archive_requested
  • date_archive_received
  • projected_fulfillment_date
  • date_fulfilled
  • fulfillment_method
  • format_delivered
  • tracking_number
  • download_expiration
  • publisher_file_unavailable
  • disposition_date
  • disposition_code
  • disposition_reason
  • download_available_days
  • number_downloads_allowed
  • download_information
  • download_link

A sample request would look like:

https://accesstext.gatech.edu/atn/requests/do_edit.xml?username=johndoe&apikey=x7z412mg6x8oht2r&id=551&date_approved=2019-07-01

If the update is successful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage>No Error</ErrorMessage>
 </requests>
</atnapi>

If the update is unsuccessful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to save record</ErrorMessage>
 </requests>
</atnapi>

do_cancel.xml

Use do_cancel.xml to cancel a single record in the requests table. Only requests in a pending status can be cancelled. Only AuthorizedUsers may invoke this call.

This call is invoked as:

https://accesstext.gatech.edu/atn/requests/do_cancel.xml?username=[your user name]&apikey=[your apikey]&id=[id of request to cancel]&date_cancelled=[YYYYMMDD]&cancellation_reason=[reason]

where [your user name], [your apikey], [date_cancelled], and [reason] are the actual values for these parameters. The request record that will be cancelled is the request record with the id field equal to the value passed in for the id parameter. Only the cancel_request, date_cancelled, cancellation_reason, cancelled_by, and status fields on the request will be updated using this call. The cancel_request field will automatically be set to true, the status field will be set to Cancelled, and the cancelled_by field will be set to the user invoking the API call. A sample request would look like:

https://accesstext.gatech.edu/atn/requests/do_cancel.xml?username=johndoe&apikey=x7z412mg6x8oht2r&id=551&date_cancelled=20120701&cancellation_reason=Not+needed

If the cancel is successful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage>No Error</ErrorMessage>
 </requests>
</atnapi>

If the cancel is unsuccessful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to cancel record</ErrorMessage>
 </requests>
</atnapi>

do_add.xml

Use do_add.xml to add a single record in the requests table. Only AuthorizedUsers can invoke this call. Exchange requests cannot be added using this API call.

This call is invoked as:

https://accesstext.gatech.edu/atn/requests/do_add.xml?username=[your user name]&apikey=[your apikey]&field1=value1&field2=value2 ...

where [your user name] and [your apikey] are the actual values for these parameters. Fields and values are passed as field=value parameters.

The following fields on the request record are valid using the do_add.xml call:

  • title_id (required) The title_id can be found using the do_query.xml call on the titles table for an ISBN.
  • request_type (required) Either Publisher File, Permission to Scan Print Material, or Permission to Redistribute Alternative Text.
  • format_requested (required when request_type is Publisher File)
  • student_id (required)
  • student_name (optional)
  • student_disability (optional)
  • course (optional)
  • instructor (optional)
  • term (optional)
  • custom_text (optional)
  • custom_numeric (optional)
  • custom_date (optional)
  • custom_checkbox (optional)
  • custom_url (optional)

A sample request would look like:

https://accesstext.gatech.edu/atn/requests/do_add.xml?username=johndoe&apikey=x7z412mg6x8oht2r&title_id=202187&student_id=abc&request_type=Publisher+File&format_requested=PDF

If the add is successful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage>No Error.  Request # created [where # is the actual ID number of the request]</ErrorMessage>
 </requests>
</atnapi>

If the add is unsuccessful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to add record</ErrorMessage>
 </requests>
</atnapi>

Error Codes

If you invoke an API call without passing the username and apikey credentials, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Missing Credentials</ErrorMessage>
 </requests>
</atnapi>

If you invoke an API call with incorrect username and apikey credentials, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid Credentials</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_edit.xml or do_cancel.xml API calls without an id parameter, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid Record ID</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_edit.xml or do_cancel.xml API call with an id parameter that your credentials are not allowed to update, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Permission Denied</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_edit.xml, do_cancel.xml, or do_add.xml API call with an invalid field name, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid field list</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_cancel.xml API call without passing the date_cancelled parameter, and error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Date Cancelled missing</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_cancel.xml API call without passing the cancellation_reason parameter, and error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Cancellation Reason missing</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_cancel.xml API call on a request that is already cancelled, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Request is already cancelled</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_cancel.xml API call on a request that is not in a pending status, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Only pending requests can be cancelled</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_cancel.xml or do_add.xml API call and your user role in not AuthorizedUser, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Only AuthorizedUsers can invoke this call</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_add.xml API call and omit a required parameter, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>[Required Parameter: Either Title ID, Student ID, Request Type, or Format Requested] is missing</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_add.xml API call and pass Exchange as the request type, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Exchange Request Type invalid in API</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_add.xml API call and pass an invalid value for the title id or a title cannot be found for the value passed, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid Title ID</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_add.xml API call and the associated title record is marked as title unavailable, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to add request as title is unavailable</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_add.xml API call and the request type is Publisher File and the associated title record is marked as publisher file unavailable, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to add publisher file request as publisher file is unavailable for title</ErrorMessage>
 </requests>
</atnapi>

If you invoke the do_add.xml API call and the request type is Publisher File and the associated title record is defined available formats and the value passed for format requested in not in the list of available formats for the title, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <requests>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to add publisher file request as format requested is unavailable for title</ErrorMessage>
 </requests>
</atnapi>

Messages

do_query.xml

Use do_query.xml to get all records from the messages table.

This call is invoked as:

https://accesstext.gatech.edu/atn/messages/do_query.xml?username=[your user name]&apikey=[your apikey]

where [your user name] and [your apikey] are the actual values for these parameters.

As a second option, you can pass the modified parameter with a date/time to limit the return to message records modified after a certain date/time.

This call is invoked as:

https://accesstext.gatech.edu/atn/messages/do_query.xml?username=[your user name]&apikey=[your apikey]&modified=[datetime]

where [datetime] is in the format YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS.

A sample request would look like:

https://accesstext.gatech.edu/atn/messages/do_query.xml?username=johndoe&apikey=x7z412mg6x8oht2r&modified=20120701080000

All records from the messages table that the user johndoe is allowed to view and that have been modified after 8 AM on July 1, 2012 will be returned in XML format.

As a third option, you can pass the rid parameter with a request id to limit the return to message records related to a particular request.

This call is invoked as:

https://accesstext.gatech.edu/atn/messages/do_query.xml?username=[your user name]&apikey=[your apikey]&rid=[requestid]

where [requestid] is the id number of the request.

A sample request would look like:

https://accesstext.gatech.edu/atn/messages/do_query.xml?username=johndoe&apikey=x7z412mg6x8oht2r&rid=158798

All records from the messages table that the user johndoe is allowed to view and that are related to request 158798 will be returned in XML format.

For any of the above three calls, you can optionally add the from parameter to additionally limit the message records returned. Valid values from the from parameter are AuthorizedUser or Publisher.

A sample request would look like:

https://accesstext.gatech.edu/atn/messages/do_query.xml?username=johndoe&apikey=x7z412mg6x8oht2r&modified=20120701080000&from=AuthorizedUser

All records from the messages table that the user johndoe is allowed to view and that have been modified after 8 AM on July 1, 2012 and that are from the AuthorizedUser will be returned in XML format.

Data from selected records related to the message record will also be returned. Data tables related to the message are the Request, the Authorized User making the request, the primary contact User for the Authorized User, and the Publisher associated with the request.

All fields for the Message record will be returned. For the Authorized User, Publisher and User, only pertinent fields will be returned. No data from the Request will be returned.

If multiple message records are returned, each record is contained within a <messages> tag.

A sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <messages>
  <id>108168</id>
  <authorized_user_id>220</authorized_user_id>
  <publisher_id>4</publisher_id>
  <request_id>554500</request_id>
  <user_id/>
  <resolved>0</resolved>
  <from>Admin</from>
  <to>AuthorizedUser</to>
  <body>test</body>
  <created>8/9/17, 2:49 PM</created>
  <modified>8/9/17, 2:49 PM</modified>
  <created_by>trunkle</created_by>
  <modified_by>trunkle</modified_by>
  <user/>
  <publisher>
   <id>4</id>
   <publisher_name>Cengage Learning</publisher_name>
  </publisher>
  <authorized_user>
   <id>220</id>
   <authorized_user_name>CIDI</authorized_user_name>
   <users>
    <id>244</id>
    <authorized_user_id>220</authorized_user_id>
    <username>dawn@gatech.edu</username>
    <full_name>Dawn Evans</full_name>
    <email>dawn@gatech.edu</email>
    <title>E-Text Coordinator</title>
    <phone>404-894-8187</phone>
   </users>
  </authorized_user>
 </messages>
</atnapi>

do_add.xml

Use do_add.xml to add a single record in the messages table.

This call is invoked as:

https://accesstext.gatech.edu/atn/messages/do_add.xml?username=[your user name]&apikey=[your apikey]&rid=[requestid]&body=[messagebody]

where [your user name] and [your apikey] are the actual values for these parameters. The message that will be added will be related to the request record with the id field equal to the value passed in for the rid parameter. The message text is contained within the message body parameters and should be URL encoded.

A sample request would look like:

https://accesstext.gatech.edu/atn/messages/do_add.xml?username=johndoe&apikey=x7z412mg6x8oht2r&rid=158798&body=We+have+uploaded+the+file+and+the+download+should+now+work

If the add is successful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <messages>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage>No Error</ErrorMessage>
 </messages>
</atnapi>

If the add is unsuccessful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <messages>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to add message</ErrorMessage>
 </messages>
</atnapi>

Error Codes

If you invoke an API call without passing the username and apikey credentials, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <messages>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Missing Credentials</ErrorMessage>
 </messages>
</atnapi>

If you invoke an API call with incorrect username and apikey credentials, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <messages>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid Credentials</ErrorMessage>
 </messages>
</atnapi>

If you invoke the do_add.xml API call without a rid parameter, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <messages>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Missing Request ID</ErrorMessage>
 </messages>
</atnapi>

If you invoke the do_add.xml API call with a body parameter, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <messages>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Missing message body</ErrorMessage>
 </messages>
</atnapi>

Titles

do_query.xml

Use do_query.xml to search for records in the titles table.

This call is invoked as:

https://accesstext.gatech.edu/atn/titles/do_query.xml?username=[your user name]&apikey=[your apikey]

where [your user name] and [your apikey] are the actual values for these parameters.

You can search for titles by ISBN13 or by title.

If you use ISBN13, the search is an exact match.

A sample request would look like:

https://accesstext.gatech.edu/atn/titles/do_query.xml?username=johndoe&apikey=x7z412mg6x8oht2r&isbn13=9780672321245

If you use title, the search is a contains match. In other words, all records where the title parameters is contained within the title field are returned. At most 100 records are returned. You can further limit the number of records returned by using the optional num parameter.

A sample request would look like:

https://accesstext.gatech.edu/atn/titles/do_query.xml?username=johndoe&apikey=x7z412mg6x8oht2r&title=algebra&num=10

Ten records from the titles table where the title field contains the string algebra will be returned in XML format.

Data from the publisher related to the title record will also be returned. For the Publisher, only the publisher_id and publisher_name fields will be returned.

If multiple title records are returned, each record is contained within a <titles> tag.

The value for the <id> field returned for a title is what is passed in for the title_id parameters when invoking the do_add.xml API call to add a request. Note that the id and isbn13 for a title are not the same value.

A sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <id>129080</id>
  <reference>9812545301</reference>
  <title>Political Science : A Primer</title>
  <author>Syed Serajul Islam; Abdul Rashid Moten</author>
  <isbn10>9812545301</isbn10>
  <isbn13>9789812545305</isbn13>
  <edition>1</edition>
  <copyright/>
  <imprint>Cengage Learning Asia</imprint>
  <publisher_id>4</publisher_id>
  <publisher_file_unavailable>1</publisher_file_unavailable>
  <title_unavailable>0</title_unavailable>
  <available_formats/>
  <notes/>
  <created>7/22/10, 1:45 PM</created>
  <created_by/>
  <modified>4/25/17, 6:31 PM</modified>
  <modified_by>Todd.McCoy@cengage.com</modified_by>
  <publisher>
   <id>4</id>
   <publisher_name>Cengage Learning</publisher_name>
  </publisher>
 </titles>
</atnapi>

do_add.xml

Use do_add.xml to add a single record in the titles table. Only AuthorizedUsers can invoke this call.

This call is invoked as:

https://accesstext.gatech.edu/atn/titles/do_add.xml?username=[your user name]&apikey=[your apikey]&field1=value1&field2=value2 ...

where [your user name] and [your apikey] are the actual values for these parameters. Fields and values are passed as field=value parameters.

The following fields on the title record are valid using the do_add.xml call:

  • title (required)
  • author (optional)
  • edition (optional)
  • copyright (optional)
  • isbn13 (required)
  • publisher_id (required)
  • notes (optional)

A sample request would look like:

https://accesstext.gatech.edu/atn/titles/do_add.xml?username=johndoe&apikey=x7z412mg6x8oht2r&title=Introduction+to+Algebra&author=Jones&edition=3&copyright=2013&isbn13=1234567890123&publisher_id=1

If the add is successful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage>No Error.  Title # created [where # is the actual ID number of the title record]</ErrorMessage>
 </titles>
</atnapi>

If the add is unsuccessful, a sample response would look like:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Unable to add record</ErrorMessage>
 </titles>
</atnapi>

Error Codes

If you invoke an API call without passing the username and apikey credentials, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Missing Credentials</ErrorMessage>
 </titles>
</atnapi>

If you invoke an API call with incorrect username and apikey credentials, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid Credentials</ErrorMessage>
 </titles>
</atnapi>

If you invoke the do_query.xml API call and fail to pass either the isbn13 or title key, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid Search Key</ErrorMessage>
 </titles>
</atnapi>

If you invoke the do_add.xml API call and fail to pass the title, isbn13, or publisher_id key, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>[Key Field] missing</ErrorMessage>
 </titles>
</atnapi>

If you invoke the do_add.xml API call and try to add a title for an existing ISBN13, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>ISBN13 already exists</ErrorMessage>
 </titles>
</atnapi>

If you invoke the do_add.xml API call with an invalid field name, an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<atnapi>
 <titles>
  <ErrorCode>1</ErrorCode>
  <ErrorMessage>Invalid field list</ErrorMessage>
 </titles>
</atnapi>