Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The attachment service is used to retrieve attachments such as clipped images, drawings, chemistry files, full page images, and other non-textual files delivered by patent offices from the CLAIMS Direct data warehouse. 

Table of Contents

/attachment/list

List all attachments associated with one or more ucids. Responses are available in JSON and XML. See Requests and Responses for more information.

MethodGET
Path/attachment/list
Parameters


ValuesDescription
@ucidString: e.g., US-20100077592-A1Document identifier
@multiBoolean: 1|0Specifies an alternative response format suitable for multi-ucid input, e.g., ?ucid=US-5551212-A,EP-0700000-A2

Single UCID

Code Block
languagetext
wget -O- \
  --header 'x-user:x' \
  --header 'x-password:y' \
'http://cdws21.ificlaims.com/attachment/list?ucid=US-20100077592-A1'

Response JSON

Code Block
languagetext
{
   "status" : "success",
   "time" : "0.076931"
   "count" : 6,
   "attachments" : [
      {
         "path" : "/EP/20001004/B1/000000/70/00/00/00360001.tif",
         "filename" : "00360001.tif",
         "media" : "image/tiff",
         "pkey" : "EP-0700000-B1-20001004",
         "size" : 22886
      },
      /* further attachment array members */
   ],
}

Response XML

Code Block
languagexml
<?xml version="1.0"?>
<response method="attachment/list" status="success" time="0.652126">
  <attachments>
    <attachment pkey="EP-0700000-B1-20001004"
                size="22886"
                media="image/tiff"
                path="/EP/20001004/B1/000000/70/00/00/00360001.tif"
                filename="00360001.tif" />
    <!-- further attachment elements -->
  </attachments>
</response>

Multiple UCIDs

Code Block
languagetext
wget -O- \
  --header 'x-user:x' \
  --header 'x-password:y' \
'http://cdws21.ificlaims.com/attachment/list?ucid=EP-0700000-A2,EP-0700000-B1&multi=1'

Response JSON

Code Block
languagetext
{
   "ucid_count" : 2,
   "status" : "success",
   "time" : "0.152457",
   "attachments" : [
      {
         "EP-0700000-A2" : {
            "count" : 7,
            "attachments" : [
               {
                  "path" : "/EP/19960306/A2/000000/70/00/00/EP0700000A219960306.pdf",
                  "filename" : "EP0700000A219960306.pdf",
                  "pkey" : "EP-0700000-A2-19960306",
                  "media" : "application/pdf",
                  "size" : 710278
               },
               ; etc ...
            ]
         }
      },
      {
         "EP-0700000-B1" : {
            "count" : 6,
            "attachments" : [
               {
                  "path" : "/EP/20001004/B1/000000/70/00/00/00360001.tif",
                  "filename" : "00360001.tif",
                  "media" : "image/tiff",
                  "pkey" : "EP-0700000-B1-20001004",
                  "size" : 22886
               },
               ; etc ...
            ]
         }
      }
   ],
}

Response XML

Code Block
languagexml
<?xml version="1.0"?>
<response method="attachment/list" time="0.081054" status="success">
  <attachment-listing ucid-count="1">
    <attachments ucid="EP-0700000-A2" count="7">
      <attachment filename="EP0700000A219960306.pdf" media="application/pdf" path="/EP/19960306/A2/000000/70/00/00/EP0700000A219960306.pdf" pkey="EP-0700000-A2-19960306" size="710278"/>
      <attachment filename="imgaf001.tif" media="image/tiff" path="/EP/19960306/A2/000000/70/00/00/imgaf001.tif" pkey="EP-0700000-A2-19960306" size="7365"/>
      <attachment filename="imgf0001.tif" media="image/tiff" path="/EP/19960306/A2/000000/70/00/00/imgf0001.tif" pkey="EP-0700000-A2-19960306" size="22135"/>
      <attachment filename="imgf0002.tif" media="image/tiff" path="/EP/19960306/A2/000000/70/00/00/imgf0002.tif" pkey="EP-0700000-A2-19960306" size="21904"/>
      <attachment filename="imgf0003.tif" media="image/tiff" path="/EP/19960306/A2/000000/70/00/00/imgf0003.tif" pkey="EP-0700000-A2-19960306" size="11082"/>
      <attachment filename="imgf0004.tif" media="image/tiff" path="/EP/19960306/A2/000000/70/00/00/imgf0004.tif" pkey="EP-0700000-A2-19960306" size="22929"/>
      <attachment filename="imgf0005.tif" media="image/tiff" path="/EP/19960306/A2/000000/70/00/00/imgf0005.tif" pkey="EP-0700000-A2-19960306" size="12493"/>
    </attachments>
  </attachment-listing>
</response>


In the event that the ucid has no attachments, the HTTP response code 204 No Content will be returned if the @multi attribute is not specified. Otherwise, an empty JSON attachment list with count : 0 will be returned. The returned JSON is an array containing anonymous structures. The keys to the anonymous structure, i.e., media, path, and size, correspond identically with that of the XML response. Please see below for details. The attribute @count is the total number of attachments residing in the data store for the corresponding ucid. If @count > 0, a list of attachment elements follows. The attributes are described below.

KeyDescription
@media

Internet media type, i.e., text/xml and image/tiff. There are other types of attachments, e.g., ChemDraw, Chemical Expression, and Mathmatica but there are currently no standard internet media types and hence, this attribute will be populated with non-standard media types. The following attachments, corresponding file name extension, and internet media types are available.

FileExtension@media
Sequence ListingsAPPapplication/app
ChemDrawCDXapplication/chemdraw
Graphics Interchange FormatGIFimage/gif
Initialization FilesINIapplication/ini
JPEGJPGimage/jpeg
Chemical ExpressionMOLapplication/chemexpres
MathmaticaNBapplication/mathmatica
Portable Document FormatPDFapplication/pdf
Portable Network GraphicsPNGimage/png
PostScriptPOSapplication/postscript
Sequence FilesSEQapplication/seq
ST.33 FilesST33image/st33
Tagged Image FormatTIF(F)image/tiff
Text FilesTXTtext/plain
Extensible Markup LanguageXMLtext/xml
ZIP FilesZIPapplication/zip
@path

The relative path by which the attachment can be retrieved in a subsequent call using /attachment/fetch

@sizeSize, in bytes, of attachment
@filenameName of file as stored in the attachments server

/attachment/fetch

Fetch an attachment associated with a ucid

Warning

Paths may change at any time. To get the most current @path parameter, you must use attachment/list.

MethodGET
Path/attachment/fetch
Parameters
ValuesDescription
@path

String: e.g.,

/EP/19960306/A2/000000/70/00/00/imgaf001.tif

The path of the attachment to fetch as returned in the response to /attachment/list
@scaleBoolean 1|0Enable image scaling.
@scale.xInteger (pixels)(v3.5) Scale x to given pixels.
@scale.yInteger (pixels)(v3.5) Scale y to given pixels.
@scale.factorFloat, e.g., scale=.50 half size(v3.5) Scale the image by a factor. This is a float value.
@scale.typeString: min|max(v3.5) If both .x and .y are given, the one resulting in a larger image is used ('max'), unless you set the type parameter to 'min'.
@scale.qtypeString: preview|mixing|normal(v3.5) Type of scaling in order of speed and inverse quality, preview being fastest with least quality, normal being slowest with the best quality.
@scale.thumbnailBoolean: 1|0(v3.5) Setting this parameter creates a pre-configured thumbnail with defaults of .x=80, .y=80, and qtype=preview.
@convertBoolean 1|0(v3.5) Enable image conversion.
@convert.toString: tiff|jpeg|png(v3.5) Convert image to given format.

Request

Code Block
languagetext
wget -O- \
  --header 'x-user:x' \
  --header 'x-password:y' \
'http://cdws21.ificlaims.com/attachment/fetch?path=12345678/EP/19960306/A2/000000/70/00/00/imgaf001.tif'

Response

The request Accept header is irrelevant with regard to response format. In the event of a system failure involving attachment availability between calls to /attachment/list and /attachment/fetch, the HTTP response code 404 Not Found will be returned. If this rare situation arises, it is advised to call list to retrieve valid @path attributes.


Request (with scaling and conversion)

Code Block
languagetext
wget -O- \
  --header 'x-user:x' \
  --header 'x-password:y' \
'http://cdws21.ificlaims.com/attachment/fetch?path=12345678/EP/19960306/A2/000000/70/00/00/imgaf001.tif&scale=1&scale.factor=.75&convert=1&convert.to=jpeg'


/attachment/fetchall

Fetch all attachments corresponding to a particular ucid in a compressed zip package.

MethodGET
Path/attachment/fetchall
Parameters
ValuesDescription
@ucid

String: e.g., EP-0700000-B1

Document identifier
@excludeString: e.g., pdf,mol,cdx

(v3.8.6) Comma-separated list of file extensions to exclude from package. The following extensions can be excluded:

  • app  
  • cdx  
  • gif  
  • ini  
  • jpg  
  • mol  
  • nb   
  • pdf  
  • png  
  • pos  
  • seq  
  • st33 
  • tif  
  • tiff 
  • txt  
  • xml  
  • zip  

Request

Code Block
languagetext
wget -O- \ 
  --header 'x-user:x' \
  --header 'x-password:y' \
'http://cdws21.ificlaims.com/attachment/fetchall?ucid=EP-0700000-B1'>> ./EP-0700000-B1.zip

Response

The request Accept header is irrelevant with regard to response format. In the event of a system failure involving attachment availability between calls to /attachment/list and /attachment/fetchall, the HTTP response code 404 Not Found will be returned. If this rare situation arises, it is advised to call list to retrieve valid @path attributes or be certain the ucid has attachments. Content-Type returned is application/zip.

/attachment/pdf

Fetch the PDF, if available, for a particular ucid.

MethodGET
Path/attachment/pdf
Parameters
ValuesDescription
@ucidString: e.g., EP-0700000-B1Document identifier

Request

Code Block
languagetext
wget -O- \
  --header 'x-user:x' \
  --header 'x-password:y' \
'http://cdws21.ificlaims.com/attachment/pdf?ucid=US-20160000001-A1'

Response

If the request is successful, an HTTP response code of 200 along with data of type application/pdf will be returned. If no PDF file is available for the requested ucid, the HTTP response code 204 No Content will be returned.

/attachment/abimage

Fetch the front page drawing or figure, if available, for a particular ucid. If there is no front page image, the first referenced image is retrieved.

MethodGET
Path/attachment/abimage
Parameters
ValuesDescription
@ucidString: e.g., US-20160000001-A1Document identifier
@scaleBoolean 1|0Enable image scaling.
@scale.xInteger (pixels)(v3.8.6) Scale x to given pixels.
@scale.yInteger (pixels)(v3.8.6) Scale y to given pixels.
@scale.factorFloat, e.g., scale=.50 half size(v3.8.6) Scale the image by a factor. This is a float value.
@scale.typeString: min|max(v3.8.6) If both .x and .y are given, the one resulting in a larger image is used ('max'), unless you set the type parameter to 'min'.
@scale.qtypeString: preview|mixing|normal(v3.8.6) Type of scaling in order of speed and inverse quality, preview being fastest with least quality, normal being slowest with the best quality.
@scale.thumbnailBoolean: 1|0(v3.8.6) Setting this parameter creates a pre-configured thumbnail with defaults of .x=80, .y=80, and qtype=preview.
@convertBoolean 1|0(v3.8.6) Enable image conversion.
@convert.toString: tiff|jpeg|png(v3.8.6) Convert image to given format.

Request

Code Block
languagetext
wget -O- \
  --header 'x-user:x' \
  --header 'x-password:y' \
'http://cdws21.ificlaims.com/attachment/abimage?ucid=US-20160000001-A1'

Response

An Accept header during the request is allowed but not required. If the request is successful, an HTTP response code of 200 along with the abstract or first image will be returned. If no specific image type was requested via the Accept header, the returned data will be in the original format which will be listed in the Content-Type response header. If no images are available for the requested ucid, the HTTP response code 204 No Content will be returned.