Start of Content Area

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

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.

-

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

pVersion

mandatory

   

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?docGet&pVersion=0046&contRep=K1&docId=361A524A3ECB5459E0000800099245EC

This transfers the entire content of a document to the 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 contains 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

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

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

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.

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: 2591
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--

 

 

 

End of Content Area