Start of Content Area

Background documentation Function: create with HTTP-POST multipart/form-data  Locate the document in its SAP Library structure

A new document with the specified docId is created. One or more components are stored in the content repository. The security level is set according to the standard specified on the content server.

create (c)

The following parameters exist:

Parameter

Optional/ mandatory

Default

Position

Sign

contRep

mandatory

 

URL

X

compId

mandatory

 

body

 

docId

mandatory

 

URL

X

pVersion

mandatory

 

URL

 

Content-Type

optional

 

body

 

charset

optional

 

body

 

version

optional

 

body

 

Content-Length

mandatory

 

Header body

 

docProt

optional

server setting

URL

X

accessMode

s-mandatory

 

URL

X

authId

s-mandatory

 

URL

X

expiration

s-mandatory

 

URL

X

secKey

optional

 

URL

 

Note

For HTTP-POST, the Content-Length in the request header is the total length of the body and the Content-Length in each part header is the length of the individual content units. For an HTTP PUT, the Content-Length is always the total length of the body.

Note the difference between when the parameter docProt is not transferred at all, and when it is transferred, but with no value (docProt=). In the first case, the content server default for ‘protection required’ is used. The second case specifies explicitly that the security level has not been set.

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

The data is transferred as HTTP-POST and as multipart/form-data. The document header information is transferred in the URL. One or more components are transferred in the body. This version of the function is particularly suitable for transferring documents consisting of several components into the content repository as a whole. The component information is specified in the header of each part; the data in the body.

In practice, this means that the URL contains the parameters contRep, docId, pVersion, docProt, accessMode, authId, expiration and secKey. All the other parameters are in the body.

The request body is in multipart/form-data format. With this format, it is possible to transfer several independent parts to an HTTP content server. The individual parts have a header and a body and are in MIME format (RFC 2045, 2046). The MIME format enables several components to be transferred to the content server simultaneously. If an error occurs when storing a component, the entire action is canceled.

The parameters compId and Content-Type are contained in the header of each part. The CompId is transferred in field X-compId. The component length is in the field Content-Length. The parameters charset and version can be appended to the Content-Type.

http://pswdf009:1080/ContentServer/ContentServer.dll?create&pVersion=0046&contRep=K1&docId=4B7689654E73D21197E70060B0672A3C

A document consisting of one or more components is transferred in multipart/form-data format.

Document header

Content-Type: multipart/form-data; boundary=A495ukjfasdfddrg4hztzu898aA0jklm
...some more header information...
Content length: 32413

Content part

--A495ukjfasdfddrg4hztzu898aA0jklm

X-compId: data
Content-Type: application/msword; charset=ISO-8859-1; version=6
Content-Length: 4242

... 4242 bytes data ...
--A495ukjfasdfddrg4hztzu898aA0jklm--

http://pswdf009:1080/ContentServer/ContentServer.dll?create&pVersion=0046&contRep=M1&docId=3810FF00804C257DE10000009B38FA09&docProt=ud&accessMode=c&authId=CN%3DKPR&expiration=19991025080635&secKey=MIIBlQYJKoZIhvcNA …

A document consisting of one or more components is transferred in multipart/form-data format.

Document header

Content-Type: multipart/form-data; boundary=KoZIhvcNAQcB
...some more header information...
Content length: 38

Content part

--KoZIhvcNAQcB

--KoZIhvcNAQcB--

The server answers the request with a response. The response status code indicates the outcome of the call.

HTTP Status Code

Meaning

201(created)

OK, document(s) created

400 (bad request)

Unknown function or unknown parameter

401 (unauthorized)

Security breach

403 (forbidden)

Document already exists

500 (Internal Server Error)

Internal error on Content Server

The content server must set the dates (dateC and compDateC) and the times (timeC and compTimeC) for creating the components and the document.

 

 

 

End of Content Area