Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =====================================================================================================================
- GET AUTHORIZATION TOKEN
- =====================================================================================================================
- @api {post} https://api.kameleoon.com/k-api/authorization Get Token
- @apiDescription Create temporary token using username and password from request body. Expiration in 1 hour.
- @apiName GetToken
- @apiGroup Rest_Auth
- @apiHeader Content-Type application/x-www-form-urlencoded
- @apiParam username Your user name.
- @apiParam password Your user password.
- @apiExample {curl} Example usage:
- curl -k -X POST \
- -H "Content-Type: application/x-www-form-urlencoded" \
- -d 'username=a@a.com&password=123456qwerty' \
- "https://api.kameleoon.com/k-api/authorization" \
- @apiSuccessExample Success-Response:
- HTTP/1.1 200 OK
- {
- "success": true,
- "error": [],
- "results": {
- "X-Auth-Key": "ABCDEF123456789",
- "expiration_in": 3600
- }
- }
- =====================================================================================================================
- SEND DATA
- =====================================================================================================================
- @api {put} https://api.kameleoon.com/k-api/site/tealium/:id Update Tealium
- @apiDescription Update tealium information. The tealium id is required in the URL.
- @apiName PutSiteTealiumUpdate
- @apiGroup Site
- @apiHeader X-Auth-Key Token from authorization request.
- @apiHeader X-Auth-Email User account email.
- @apiParam {JsonObject} [tealiumAudience] The list of audiences created in the third-party tools Tealium AudienceStream.
- @apiParam {JsonObject} [tealiumBadges] The list of badges created in the third-party tools Tealium AudienceStream.
- @apiExample {curl} Example usage:
- curl -k -X PUT \
- -H "X-Auth-Key: ABCDEF123456789" \
- -H "X-Auth-Email: a@a.com" \
- -H "Content-Type: application/json" \
- -d '{
- "tealiumAudience":
- [
- {
- "id":1,
- "name":"test1"
- },
- {
- "id":2,
- "name":"test2"
- }
- ],
- "tealiumBadges":
- [
- {
- "id":1,
- "name":"test1"
- },
- {
- "id":2,
- "name":"test2"
- }
- ]
- }' \
- "https://api.kameleoon.com/k-api/site/tealium/1" \
- @apiSuccessExample Success-Response:
- HTTP/1.1 200 OK
- {
- "result": {
- "sites": [
- {
- "id": 1,
- "tealiumAudience": [
- {
- "id":1,
- "name":"test1"
- },
- {
- "id":2,
- "name":"test2"
- }
- ],
- "tealiumBadges": [
- {
- "id":1,
- "name":"test1"
- },
- {
- "id":2,
- "name":"test2"
- }
- ]
- }
- ]
- },
- "success": true,
- "errors": []
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement