API V1.0 User Info

URIDetailsResponse
api.bookshare.org/user/info/display/for/Text User Info User Info Response

User Info

  • Description: Get the account information for the given user.
  • Format: api.bookshare.org/user/info/display/for/Text, where the for parameter specifies the email address/username of the end user for whom the download is being requested for.  In addition the MD5 hash of the end user password must be passed in the request via a "X-password" HTTP header.
  • Authentication: User Authenticated
  • Response: User Info Response
  • Examples:

User Info Response

Container: user

Fields

FieldTypeDescriptionOccurrence
downloads-remaining Number Indicates the number of downloads remaining for this User 1

Container: user/list/result

Additional Fields

FieldTypeDescriptionOccurrence
userId Number Bookshare ID of the given user 1
displayName Text Name of the given user 1

XML Example:

<bookshare>
  <version>3.5.1</version>
  <messages>
    <string>User account information for test@benetech.org</string>
  </messages>
  <user>
    <downloads-remaining>100</downloads-remaining>
    <list>
      <page>1</page>
      <limit>10</limit>
      <num-pages>1</num-pages>
      <result>
        <name>userId</name>
        <value>237689</value>
     </result>
     <result>
       <name>displayName</name>
       <value>Joe Srinivasan</value>
     </result>
   </list>
  </user>
</bookshare>

JSON Example:

{"bookshare": {
  "version": "3.5.1",
  "messages": [
    "User account information for test@benetech.org"
  ],
  "user": {
    "userId": 237689,
    "displayName": "Joe Srinivasan"
  },
  "downloadsRemaining": 100
}}