OCLC Developer Network

Response Details

Download Examples:

The Article Exchange web service will return a binary file when a successful download is executed.  The file is returned without any wrapper document. The file is returned in the format it was originally uploaded. The web service returns the following headers to assist the client with handling the document returned.

  • Content-Type - Media type of the file. For example, application/pdf, image/jpeg, image/tiff
  • Content-deposition - header to alert client to allow user to choose where to save the file
  • Content-Length - size of the file

Upload Examples:

The following example demonstrates using an Article Exchange API url to upload a binary file and the response returned from the server. The API is capable of returning a JSON response if application/json is sent as the accept header. Please note that none of the examples include the principalID and principalIDNS parameters that are required to successfully complete the operation.

POST a binary file to the Article Exchange API (XML)

Request:

https://ill.sd00.worldcat.org/articleexchange/?autho=[id]&password=[password]
&requesterEmail=test@oclc.org&requesterInstSymbol=BOR&oclcRequestId=28374239487
&illiadRequestId=2394879823&vdxRequestId=vdx:23987234&jTitle=The%20Journal%20Title
&aTitle=The%20Article%20Title&aAuthor=Iam%20The%20Author&aVolume=1&aIssue=35
&aDate=June%205&aPages=55

Response:

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:os="http://a9.com/-/spec/opensearch/1.1/" xmlns:gd="http://schemas.google.com/g/2005">
  <id>ae:upload:response</id>
  <title type="text">Upload response</title>
  <link href="http://localhost/articleexchange/?autho=[ID]&password=[password]&
              requesterEmail=test@oclc.org&requesterInstSymbol=BOR&oclcRequestId=28374239487
              &illiadRequestId=2394879823&vdxRequestId=vdx:23987234
              &jTitle=The%20Journal%20Title&aTitle=The%20Article%20Title
              &aAuthor=Iam%20The%20Author&aVolume=1&aIssue=35&aDate=June%205&aPages=55" rel="self" />
  <updated>2012-05-31T20:53:04.421Z</updated>
  <gd:etag>W/"1280881908"</gd:etag>
  <os:totalResults>1</os:totalResults>
  <os:startIndex>1</os:startIndex>
  <os:itemsPerPage>1</os:itemsPerPage>
  <entry>
    <title type="text" />
    <updated>2012-05-31T20:53:04.428Z</updated>
    <content type="application/xml">
      <uploadResponse xmlns="">
        <accessInformationResponse>
          <password>[LINK PASSWORD]</password>
          <url>[LINK URL]</url>
        </accessInformationResponse>
        <articleInformationResponse>
          <articleAuthor>Iam The Author</articleAuthor>
          <articleTitle>The Article Title</articleTitle>
          <date>June 5</date>
          <number>35</number>
          <pages>55</pages>
          <title>The Journal Title</title>
          <volume>1</volume>
        </articleInformationResponse>
        <borrowerInfoResponse>
          <borrowingEmail>test@oclc.org</borrowingEmail>
          <borrowingSymbol>BOR</borrowingSymbol>
        </borrowerInfoResponse>
        <requestIdResponse>
          <illiadId>2394879823</illiadId>
          <oclcId>28374239487</oclcId>
          <vdxId>vdx:23987234</vdxId>
        </requestIdResponse>
      </uploadResponse>
    </content>
  </entry>
</feed>

POST a binary file to the Article Exchange API (JSON)

Request:

https://ill.sd00.worldcat.org/articleexchange/?autho=[id]&password=[password]
&requesterEmail=test@oclc.org&requesterInstSymbol=BOR&oclcRequestId=28374239487
&illiadRequestId=2394879823&vdxRequestId=vdx:23987234&jTitle=The%20Journal%20Title
&aTitle=The%20Article%20Title&aAuthor=Iam%20The%20Author&aVolume=1&aIssue=35
&aDate=June%205&aPages=55

Response:

{
 "id":"ae:upload:response",
 "title":"Upload response",
 "updated":"2012-05-31T21:01:49.301Z",
 "links":[{
   "href":"http://localhost/articleexchange/?autho=[id]&password=[password]&requesterEmail=test@oclc.org
           &requesterInstSymbol=BOR&oclcRequestId=28374239487&illiadRequestId=2394879823
           &vdxRequestId=vdx:23987234&jTitle=The%20Journal%20Title&aTitle=The%20Article%20Title
           &aAuthor=Iam%20The%20Author&aVolume=1&aIssue=35&aDate=June%205&aPages=55",
   "rel":"self"
  }
 ],
 "entries":[
      {
         "title":"",
         "content":{
            "author":null,
            "borrowerInfoResponse":{
               "borrowingSymbol":"BOR",
               "borrowingEmail":"test@oclc.org"
            },
            "requestIdResponse":{
               "oclcId":"28374239487",
               "illiadId":"2394879823",
               "vdxId":"vdx:23987234"
            },
            "articleInformationResponse":{
               "number":"35",
               "date":"June 5",
               "title":"The Journal Title",
               "articleAuthor":"Iam The Author",
               "articleTitle":"The Article Title",
               "volume":"1",
               "pages":"55"
            },
            "accessInformationResponse":{
               "password":"[LINK_PASSWORD]",
               "url":"[LINK_URL]"
            }
         },
         "updated":"2012-05-31T21:01:49.585Z"
      }
   ],
   "extensions":[
      {
         "name":"gd:etag",
         "attributes":{
            "xmlns:gd":"http://schemas.google.com/g/2005"
         },
         "children":[
            "W/\"387987136\""
         ]
      },
      {
         "name":"os:totalResults",
         "attributes":{
            "xmlns:os":"http://a9.com/-/spec/opensearch/1.1/"
         },
         "children":[
            "1"
         ]
      },
      {
         "name":"os:startIndex",
         "attributes":{
            "xmlns:os":"http://a9.com/-/spec/opensearch/1.1/"
         },
         "children":[
            "1"
         ]
      },
      {
         "name":"os:itemsPerPage",
         "attributes":{
            "xmlns:os":"http://a9.com/-/spec/opensearch/1.1/"
         },
         "children":[
            "1"
         ]
      }
   ]
}

Follow the OCLC Developer Network:

The OCLC Developer Network supports the use of OCLC Web Services—a set of tools and APIs that expose data and services for WorldCat and our member libraries and partner institutions or companies. learn more »

© 2010 OCLC Domestic and international trademarks and/or service marks of OCLC Online Computer Library Center, Inc. and its affiliates


Powered by Drupal, an open source content management system