Function: info
Use
Effect
The function info retrieves document information. In response to info, the server sends the document header information and information on all components. If you require information on only one component, specify a compId. If you do so, the command info has the same effect as the command docGet, except that no component data is transferred with info.
resultAs is used to set the format of the information display. Return values can be provided in ASCII format (which means they can be easily parsed), or in an HTML file. The use of resultAs is optional. ascii is the default. The format is explained in more detail below.
If resultAs=ascii, and 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
Standard information about the document header and the components of the addressed document is returned. The results are given in ASCII format.
Access Mode
Read (r)
Client -> Server
Client sends an HTTP-GET Request. The URL can contain the following parameters:
|
Parameter |
Optional/Mandatory |
Default |
Sign |
|
contRep |
Mandatory |
X |
|
|
docId |
Mandatory |
X |
|
|
compId |
optional |
||
|
pVersion |
Mandatory |
||
|
resultAs |
optional |
ascii |
|
|
accessMode |
s-mandatory |
X |
|
|
authId |
s-mandatory |
X |
|
|
expiration |
s-mandatory |
X |
|
|
secKey |
optional |
Example
http://pswdf009:1080/ContentServer/ContentServer.dll?info&pVersion=0046&contRep=K1&docId=361A524A3ECB5459E0000800099245EC
The example is a request for information about the document. Information about the document header and all its components is requested.
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, information sent |
|
400 (bad request) |
Unknown function or unknown parameter |
|
401 (unauthorized) |
Security breach |
|
404 (not found) |
Document or component not found |
|
409 (conflict) |
Administrative data inaccessible |
|
500 (Internal Server Error) |
Internal error on Content Server |
The response header provides the following information about the document:
|
Keyword |
Format |
Meaning |
|
Content Type |
String |
Content type (if known) |
|
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-numberComps |
Integer string |
Number of components |
|
X-contentRep |
String |
Content Repository |
|
X-docId |
String |
Document ID |
|
X-docStatus |
String |
Status |
|
X-pVersion |
String |
Version |
For each function call, all information about the document header is displayed. If no specific component is addressed, information on all components is made provided. If you require information on only one component, you can restrict the output to this component by specifying the compId. The following combinations are possible:
-
docId= ID, compId= ID:
Provides information about the document header and one component.
-
docId= ID :
Provides information about the document header and all components of the document.
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 |
Application version used to create the content of the component |
|
Content Length |
Integer string |
Actual body size in the response, always 0 here |
|
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 |
There are two methods of coding the results in the response body. The parameter resultAs controls coding.
-
resultAs=ascii (default)
The server sends a response in multipart/form-data format (see RFC 1867). The total length of the body is specified by the parameter Content-Length in the response header. The individual parts of the response body are separated by a boundary specified in the response header. Each part represents one component. Each component has a component header and a component body. These have the length 0 because no component data is transferred (unlike the docGet command). Therefore, the component parameter Content-Length is always set to 0. If you want to set the component length, you can do so using the parameter X-Content-Length.
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.
-
resultAs=html
If resultAs=html is set, the server sends an HTML page. The structure of the HTML page is not specified, which means that graphical elements can be used as much as required.