Function: get
Use
Effect
A content unit of a component or a range within a content unit is retrieved from the content repository. The parameters contRep, docId, and compId describe the component. fromOffset and toOffset describe the range of the content unit.
If the function is executed successfully, the content unit is transferred from the server to the client as an entity body in the response to an HTTP GET request.
Default
If no compId is specified, the following conditions are tested in the appropriate order:
-
If the component "data" exists, this component is returned.
-
If the component "data1" exists, this component is returned.
If an incorrect compId, or no compId, was specified, and if neither of the conditions above is fulfilled, the function returns Error 404 (not found).
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 |
see above |
|
|
pVersion |
Mandatory |
||
|
fromOffset |
optional |
0 |
|
|
toOffset |
optional |
-1 |
|
|
accessMode |
s-mandatory |
X |
|
|
authId |
s-mandatory |
X |
|
|
expiration |
s-mandatory |
X |
|
|
secKey |
optional |
Example
http://pswdf009:1080/ContentServer/ContentServer.dll?get&pVersion=0045&contRep=K1&docId=361A524A3ECB5459E0000800099245EC&compId=data
This requests the document component "data".
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, content unit of component 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 response header contains the following standard information about the document:
|
Keyword |
Meaning |
|
Content Type |
Content Type |
|
charset |
The character set of the component (as a content type parameter). |
|
version |
The version of the component (as a content type parameter). |
|
Content Length |
Total length of body actually transferred |
The response 'content type' depends on the content type of the component requested. 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.
The content unit (or range within the content unit) of the component is transferred in the response body.