CPL24 Rest API

  • Home

Welcome to CPL24 RestAPI!

Retrieve data in different formats explained here

Use the export controler to retrieve specified reports explained below.

Syntax


[yourhostname]/api/export/[connection]/[username]/[password]/[mandator]/[exportname]/[format]/[parameter1]/[parameter2]/[parameter3]/[parameter4]/[parameter5]/.
  • ./api/export/: calls the export controller
  • connection: connection name defined in the web.config file
  • username: username for login. Set username to "basic" and password also to "basic" to use basic authentication.
  • password: password for the given username or use the "Authorization: Bearer mypassword" header (recommended). In this case you set this part to something arbitrary but non empty value e.g. bearer.
  • mandator: mandator id
  • exportname: e.g. myownreport. Escape special chars "URL-Escaped" (%23 instead of # (hash))
  • format: select one of the following supported formats: xml, json, xsd, csv.
  • parameter 1 - 5: exports can have between zero and five optional parameters.

Example

  • Imagine that the service is available unter the url http://rest.cpl24.com
  • The connectionname is cpl24con.
  • The username is myuser
  • The password is myPassW0rD
  • The mandator id is demo
  • Exportname is exampleexport
  • Format is xml
  • For the exampleexport there are two mandatory parameters
    1. first
    2. second
If you use the password in the url (not reccomended) the call would be:
http://rest.cpl24.com/api/export/cpl24con/myuser/myPassW0rD/demo/exampleexport/xml/first/second/

or with an http header (reccomended): http://rest.cpl24.com/api/export/cpl24con/myuser/bearer/demo/exampleexport/xml/first/second/
Authorization: Bearer myPassW0rD
or with basic authentication:
Set the fields username and password to "basic". You'll be asked for username and password.
http://rest.cpl24.com/api/export/cpl24con/basic/basic/demo/exampleexport/xml/first/second/

Never use insecure http in production environments! Always use https!