Function: docGet
Use
Effect
The entire content of a document is retrieved from the content repository.
If an incorrect docId was specified, error 404 (not found) occurs.
If the function is executed successfully, the data is transferred as an entity body in multipart/form-data format (see RFC 1867) as a response to an HTTP-GET-Request.
Default
-
Access Mode
Read (r)
Client -> Server
Client sends an HTTP-GET Request. The following parameters are entered in the URL:
|
Parameter |
Optional/Mandatory |
Default |
Sign |
|
contRep |
Mandatory |
X |
|
|
docId |
Mandatory |
X |
|
|
pVersion |
Mandatory |
||
|
accessMode |
s-mandatory |
X |
|
|
authId |
s-mandatory |
X |
|
|
expiration |
s-mandatory |
X |
|
|
secKey |
optional |
Example
http://pswdf009:1080/ContentServer/ContentServer.dll?docGet&pVersion=0046&contRep=K1&docId=361A524A3ECB5459E0000800099245EC
This transfers the entire content of a document to the client.
Server -> Client
The server answers the request with a response. The response status code indicates the outcome of the call.
|
HTTP Status Code |
Meaning |
|
200 (OK) |
OK, document is transferred |
|
400 (bad request) |
Unknown function or unknown parameter |
|
401 (unauthorized) |
Security breach |
|
404 (not found) |
Document or component not found |
|
409 (conflict) |
Document or component inaccessible |
|
500 (Internal Server Error) |
Internal error on Content Server |
The server sends a response in multipart/form-data format (see RFC 1867). The individual parts of the response body are separated by a boundary specified in the response header. In contrast to the info command, when docGet is used, components are actually transferred and the length of the transferred components is specified in the field Content-Length of the relevant component, that is, Content-Length and X-Content-Length have identical values. The response header displays the following information about the document:
|
Keyword |
Format |
Meaning |
|
Content Type |
String |
Content type, always multipart/form-data |
|
boundary |
String |
Separator between individual components |
|
Content Length |
Integer string |
Total length of body actually transferred |
|
X-dateC |
YYYY-MM-DD |
Date of creation (UTC) |
|
X-timeC |
HH:MM:SS |
Time of creation |
|
X-dateM |
YYYY-MM-DD |
Date of the last change (UTC) |
|
X-timeM |
HH:MM:SS |
Time of the last change (UTC) |
|
X-numComps |
Integer string |
Number of components |
|
X-contRep |
String |
Content Repository |
|
X-docId |
String |
Document ID |
|
X-docStatus |
String |
Status |
|
X-pVersion |
String |
Version |
The component header contains the following information about the component:
|
Keyword |
Format |
Meaning |
|
Content Type |
String |
Content type (if known) |
|
charset |
String |
Character set (if known) |
|
version |
String |
|
|
Content Length |
Integer string |
Size of component in bytes |
|
X-Content-Length |
Integer string |
Size of component in bytes |
|
X-compId |
String |
Component ID |
|
X-compdateC |
YYYY-MM-DD |
Date of creation (UTC) |
|
X-compTimeC |
HH:MM:SS |
Time of creation |
|
X-compDateM |
YYYY-MM-DD |
Date of the last change (UTC) |
|
X-compTimeM |
HH:MM:SS |
Time of the last change (UTC) |
|
X-compStatus |
String |
Component status |
|
X-pVersion |
String |
Interface Version |
If the charset of a component is known, it must be transferred as a Content-Type parameter. Likewise, the parameter version (that is, the version number of the application used to create the component content (see Parameters and Key Words) for a component, if known, must be transferred as a Content-Type parameter.
Example
HTTP/1.1 200 (OK)
Server: Microsoft-IIS/4.0
Date: Wed, 04 Nov 1998 07:41:03 GMT Content-Type: multipart/form-data; boundary=A495ukjfasdfddrg4hztzu...
. ..some more header information...
Content-Length: 32413
X-dateC: 1998-10-07
X-timeC: 07:55:57
X-dateM: 1998-10-07
X-timeM: 07:55:57
X-contRep: K1 X-numComps: 2
X-docId: ID
X-docStatus: online
X-pVersion: 0045
--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla12319981147528895
Content-Type: application/x-alf; charset=
Content-Length: 259
X-compId: descr
X-Content-Length: 2591
X-compDateC: 1998-10-07
X-compTimeC: 07:55:57
X-compDateM: 1998-10-07
X-compTimeM: 07:55:57
X-compStatus: online
X-pVersion: 0045
...component data ...
--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla12319981147528895
Content-Type: application/x-alf; charset=
Content-Length: 29313
X-compId: data
X-Content-Length: 29213
X-compDateC: 1998-10-07
X-compTimeC: 07:55:57
X-compDateM: 1998-10-07
X-compTimeM: 07:55:57
X-compStatus: online
X-compStatus: online
X-pVersion: 0045
...component data ...
--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla12319981147528895-
If the docGet command is executed on an empty document, the response body could contain, for example, nothing between the boundaries:
--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla1231999102562159269
--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla1231999102562159269--