Create XID
This API creates a new XID and returns it. The actual form of the ID is a decimal number, not a UUID.
The creation of the XID requires that the client supply the website that the content is being created on, for tracking purposes. It also requires that the client pass in both the policy ID (see Get Site Policies API) and the key. The key is a hex string of even length which encodes an array of random byte values.
URL format: |
https://host/api/xcontent |
HTTP Method: |
POST |
HTTP Headers: |
x-xloak-authtoken: auth-token |
x-xloak-k: APIkey |
URL Parameters: |
None |
POST body parameters: |
JSON structure that contains the following fields: “url”, “scheme”, “xpid”, and “key”. The value of the “url” field must be the full URL of the currently shown page on the browser; “scheme” must be the cloaking scheme as returned from the Get Site Policies API (the field name is “cipherscheme”), “xpid” is the value of a policy ID as retrieved via the Get Site Policies API, and “key” is the hexadecimal representation of an array of random byte values. An example parameter list is: {"url": "http://facebook.com/", "scheme": "default", "xpid": "81", "key": "abcdef"}
|
Returns: |
status code 200 if the creation of the XID succeeds. The data returned is similar to the following: {{'info': {'type': 'default', 'xid': '17', 'xpid', '81', 'key': 'abcdef'}, 'message': '', 'result': 'OK'}
Note that the key is returned along with the XID (for convenience, mostly). |
status code 403 if the request is made without a valid auth token. |
| |