Start of Content Area

Background documentation Function: info  Locate the document in its SAP Library structure

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.

Standard information about the document header and the components of the addressed document is returned. The results are given in ASCII format.

Read (r)

The client sends an HTTP-GET-Request. The URL contains 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

   

Note

s-mandatory means that this parameter need only be specified if the URL is signed.

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.

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 contains 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

Entire length of the body actually transferred

X-dateC

YYYY-MM-DD

Creation date (UTC)

X-timeC

HH:MM:SS

Creation time

X-dateM

YYYY-MM-DD

Last changed on [date] (UTC)

X-timeM

HH:MM:SS

Last changed at [time] (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

Each time the function is called, all document header information 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:

Provides information about the document header and one component.

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 the component in bytes

X-compId

String

Component ID

X-compDateC

YYYY-MM-DD

Creation date (UTC)

X-compTimeC

HH:MM:SS

Creation time

X-compDateM

YYYY-MM-DD

Last changed on [date] (UTC)

X-compTimeM

HH:MM:SS

Last changed at [time] (UTC)

X-compStatus

String

Component status

X-pVersion

String

Interface version

 

There are two methods of coding the results in the response body. These methods are explained below. The parameter resultAs controls coding.

  1. 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.

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...
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: 0
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

--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla12319981147528895

Content-Type: application/x-alf; charset=
Content-Length: 0
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-pVersion: 0045

--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla12319981147528895--

If the info command is executed on an empty document, the response body will contain something like the following:

--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla1231999102562159269

--A495ukjfasdfddrg4hztzu898aA0jklmAxcvla1231999102562159269--

  1. 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.

 

 

End of Content Area