Home    
Home  >  API Reference

Authentication

In order to interact with the DataKnowl Cloud Services API, your application must authenticate.

Authentication is based on two keys:

- AccessKeyID
- SecretAccessKey

The AccessKeyID is used to identify the user, while SecretAccessKey is used to sign the request. SecretAccessKey is never sent or transmitted.

Authentication is implemented by passing parameters via HTTP headers

Parameters are:

Header Value Description
Authorization DCS-V1
AccessKeyId
Timestamp The timestamp of the request
Signature The signature

Signature

Canonical Signature Form:

StringToSign = AccessKeyID : Method : Content-Type : URL-Resource : MD5(Parameters) : Timestamp

To calculate the signature, for GET requests:

StrintToSign = AccessKeyID + ":GET::" + URL-Resource + ":" + MD5(Parameters) + ":" + Timestamp

Content-Type is empty, as in GET requests, we're not providing any payload.

When using POST:

StringToSign = AccessKeyID + ":POST:" + Content-Type : URL-Resource + ":" + MD5(Parameters) + ":" + Timestamp

where parameters are the ordered list by key, e.g. "key1=value1&key2=value2"

For POST the Content-Type is usually "application/x-www-form-urlencoded"

Example


curl -v -X POST -H "Accept: application/xml" 
                -H "Content-type: application/x-www-form-urlencoded; charset=UTF-8"
                -H "Authorization: DCS-V1" -H "AccessKeyId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
                -H "Timestamp: 1475577278578" 
                -H "Signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
                -d "sequence:text=Where is the nearest office ?" 
                https://eu-central.dcs.dataknowl.com/v1/vagent/{VAGNT}/conv/{VACNV}/sequence/process

where:
{VAGNT} is the V-Agent RID
{VACNV} is the Conversation RID, or NEW to start a new conversation

© 2019 Complexity Intelligence, LLC