Use new Signature v2 for APIs that have Sign2.0 tag
429baseUrl = "https://api.linksfield.net/cube/v4"| Parameter | Example | Mandatory | Description |
|---|---|---|---|
| Accept-Language | zh-CH | No | Default: en-US |
| Content-Type | application/json | No | application/json |
| Authorization | LF {keyId}/{sign} | Yes | Each pair of public and private keys corresponds to a keyId |
| X-LF-Api-Version* (note 1) | 1.0 | No | Default: the latest-1 version |
| X-LF-Signature-Type* (note 2) | 1.0 | No | Default: 1.0/ 2.0 |
X-LF-Api-Version is not specified in the header, the earlier version, say v1.0 will be selected.X-LF-Signature-Type:timestamp format (in ms) and the timezone is UTC0 by default.page_size and page_nopage_size and last_cursor| Http Status Code | Description | Remarks |
|---|---|---|
| 200 | Success | - |
| 400 | Invalid parameter | Parameter bad format or missing |
| 401 | Unauthorised | Authorization is missing |
| 403 | Invalid signature | Signature verification fails |
| 429 | Rate Limiting | Exceeds rate limit |
| 500 | Service Error | - |
| Key | Key Length | Description |
|---|---|---|
| RSA | 1024 bit | Private key to sign; Public key to verify signature. |
keyPair: {
keyId: String,
publicKey: String,
privateKey: String,
}
Authorization-H Authorization: LF {KeyID}/{Signature}
//Example:
Authorization: LF b30a5e0e135d42e6ab43b021a30b7987/XbEd2v1LxXpGzzu8RZHwmRKmowVCGtuCdpWWgTB1DgWqy19mAGfNx4TvrmBpDqDyzPnxE2+WZAEE9wjpnR6pWziGfT+VL6uAYyPKWnFbAsrmS0Uas7fMickMF6i59sWxmYhVhLbrb4ZF2/fKoaLcdP1ynvhXqibAROiEvTl/kAc=
| Signature | Algorithm |
|---|---|
| Sign the API contents | sha1withRSA |
401 Unauthorized / 403 ForbiddenSHA1withRSA but there are two versions of method implemented, in terms of constructing the data for signature calculation.