Changes for page ONEcount API Documentation
Last modified by Rayaan Ahmed on 2025/02/09 22:20
To version 12.1
edited by Admin User
on 2024/04/29 14:06
on 2024/04/29 14:06
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. rayaan1 +XWiki.admin - Content
-
... ... @@ -330,10 +330,6 @@ 330 330 331 331 ---- 332 332 333 -{{panel bgColor="#D3D3D3" width="100%"}} 334 -(% class="nolink nolink" %)https:~/~/api.onecount.net/v2/users 335 -{{/panel}} 336 - 337 337 === (% class="core-title" style="color:#212121" %)Request Headers(%%) === 338 338 339 339 ---- ... ... @@ -868,12 +868,6 @@ 868 868 869 869 ---- 870 870 871 -{{panel bgColor="#D3D3D3" width="100%"}} 872 - (% class="nolink nolink" %)https:~/~/api.onecount.net/v2/users/(% style="color:#212121" %)~{~{OCID}} 873 -{{/panel}} 874 - 875 -=== (% class="core-title" style="color:#212121" %)Request Headers(%%) === 876 - 877 877 ---- 878 878 879 879 (% class="Text__TextContainer-sc-1kqigik-0 cEvDCP iauueY item-key sc-fznXWL" style="color:#212121" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color:#212121" %)~{~{ONECOUNT API KEY}} ... ... @@ -966,10 +966,6 @@ 966 966 967 967 ---- 968 968 969 -{{panel bgColor="#D3D3D3" width="100%"}} 970 - (% class="nolink nolink" %)https:~/~/api.onecount.net/v2/users(% class="nolink" style="color:#212121" %)/login 971 -{{/panel}} 972 - 973 973 === (% class="core-title" style="color:#212121" %)Request Headers(%%) === 974 974 975 975 ---- ... ... @@ -1040,10 +1040,6 @@ 1040 1040 1041 1041 ---- 1042 1042 1043 -{{panel bgColor="#D3D3D3" width="100%"}} 1044 -(% class="nolink nolink" %)https:~/~/api.onecount.net/v2/users(% class="nolink" style="color:#212121" %)/lookup?2=user_242_6298&return=1,2,3,4 1045 -{{/panel}} 1046 - 1047 1047 === (% class="core-title" style="color:#212121" %)Request Headers(%%) === 1048 1048 1049 1049 ---- ... ... @@ -1120,10 +1120,6 @@ 1120 1120 1121 1121 ---- 1122 1122 1123 -{{panel bgColor="#D3D3D3" width="100%"}} 1124 -(% class="nolink nolink" %)https:~/~/api.onecount.net/v2(% class="nolink" style="color:#212121" %)/users/~{~{OCID}}/partners/~{~{Partner id}} 1125 -{{/panel}} 1126 - 1127 1127 === (% class="core-title" style="color:#212121" %)Request Headers(%%) === 1128 1128 1129 1129 ---- ... ... @@ -1135,11 +1135,7 @@ 1135 1135 1136 1136 ---- 1137 1137 1138 -{{panel bgColor="#D3D3D3" width="100%"}} 1139 -(% class="nolink nolink" %)https:~/~/api.onecount.net/v2/users 1140 -{{/panel}} 1141 1141 1142 - 1143 1143 (% class="western" %) 1144 1144 **POST method should be used to create users.** 1145 1145 ... ... @@ -1308,11 +1308,7 @@ 1308 1308 1309 1309 ---- 1310 1310 1311 -{{panel bgColor="#D3D3D3" width="100%"}} 1312 - (% class="nolink nolink" %)https:~/~/api.onecount.net/v2/users/~{~{OCID(% class="nolink" %)}} 1313 -{{/panel}} 1314 1314 1315 - 1316 1316 (% class="western" %) 1317 1317 **PUT method should be used to update users.** 1318 1318 ... ... @@ -12899,7 +12899,7 @@ 12899 12899 Add options to specific metric in an engagement without passing all options and overriding existing options. 12900 12900 12901 12901 Parameters required to update the engagement needs to be sent as post data in JSON format. 12902 -\\This API is used to add options only for select and checkbox metrics. If any metric does not exist12872 +\\This API is used to add options only for select and checkbox metrics. 12903 12903 ))) 12904 12904 |(% style="text-align:left; vertical-align:top" %)(% style="text-align: left;vertical-align: top;" %) 12905 12905 ((( ... ... @@ -13377,6 +13377,149 @@ 13377 13377 {{/code}} 13378 13378 13379 13379 13350 +(% id="HPUTUpdateEngagement" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13351 +== (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" id="cke_bm_7146126S" style="color:#0053b8; display:none" %) (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#ad7a03" %)POST(% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#0053b8" %) (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)Add options to metric(%%) == 13352 + 13353 +---- 13354 + 13355 +{{panel bgColor="#D3D3D3" width="100%"}} 13356 + (% class="nolink" %)https:~/~/api.onecount.net/v2(%%)/engagements/metric/(% style="color:#212121" %)~{~{Engagement Id}} 13357 +{{/panel}} 13358 + 13359 +=== (% class="core-title" style="color:#212121" %)Request Headers(%%) === 13360 + 13361 +---- 13362 + 13363 +(% class="Text__TextContainer-sc-1kqigik-0 cEvDCP iauueY item-key sc-fznXWL" style="color:#212121" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color:#212121" %)~{~{ONECOUNT API KEY}} 13364 + 13365 +=== (% style="color:#212121" %)Body (% style="color:#6b6b6b" %)raw (json)(%%) === 13366 + 13367 +---- 13368 + 13369 +{{code language="yml" title="Body"}} 13370 +{"Metrics":[ 13371 + {"Attendance Status":[{"text":"checks","value":"checks"},{"text":"c","value":"c"}]}, 13372 + {"lagacy status":[{"text":"c","value":"c"}]} 13373 + ]} 13374 +{{/code}} 13375 + 13376 +==== Example ==== 13377 + 13378 +---- 13379 + 13380 +(% style="color:#6b6b6b" %)Request 13381 + 13382 +{{code language="php" title="(% class=~"documentation-core-item-request-name jbmEtY sc-fzomuh~" style=~"color:#212121~" %)Add options to metric"}} 13383 + <?php 13384 + 13385 +$curl = curl_init(); 13386 + 13387 +curl_setopt_array($curl, array( 13388 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements/metric/{{Engagement Id}}', 13389 + CURLOPT_RETURNTRANSFER => true, 13390 + CURLOPT_ENCODING => '', 13391 + CURLOPT_MAXREDIRS => 10, 13392 + CURLOPT_TIMEOUT => 0, 13393 + CURLOPT_FOLLOWLOCATION => true, 13394 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13395 + CURLOPT_CUSTOMREQUEST => 'PUT', 13396 + CURLOPT_POSTFIELDS =>'{"Metrics":[ 13397 + {"Attendance Status":[{"text":"checks","value":"checks"},{"text":"c","value":"c"}]}, 13398 + {"lagacy status":[{"text":"c","value":"c"}]} 13399 + ]}', 13400 + CURLOPT_HTTPHEADER => array( 13401 + 'Appkey: {{ONECOUNT API KEY}}', 13402 + 'Content-Type: application/json' 13403 + ), 13404 +)); 13405 + 13406 +$response = curl_exec($curl); 13407 + 13408 +curl_close($curl); 13409 +echo $response; 13410 + 13411 +{{/code}} 13412 + 13413 + 13414 +(% style="color:#6b6b6b" %)Response 200 OK 13415 + 13416 +{{code language="yml" title="(% class=~"documentation-core-item-request-name jbmEtY sc-fzomuh~" style=~"color:#212121~" %)Add options to metric"}} 13417 +{ 13418 + "result": { 13419 + "success": "1", 13420 + "error": { 13421 + "code": "", 13422 + "message": "" 13423 + } 13424 + }, 13425 + "Engagements": [ 13426 + { 13427 + "Id": "e0e816ec-77ba-4db1-bfc0-22d340337357", 13428 + "Name": "Test engagement 3", 13429 + "Metrics": [ 13430 + { 13431 + "Name": "Attendance Status", 13432 + "Type": "select", 13433 + "Values": [ 13434 + { 13435 + "text": "Attended", 13436 + "value": "attended" 13437 + }, 13438 + { 13439 + "text": "Not Attended", 13440 + "value": "not_attended" 13441 + }, 13442 + { 13443 + "text":"checks", 13444 + "value":"checks" 13445 + }, 13446 + { 13447 + "text":"c", 13448 + "value":"c" 13449 + } 13450 + ] 13451 + }, 13452 + { 13453 + "Name": "Price", 13454 + "Type": "text" 13455 + }, 13456 + { 13457 + "Name": "Name", 13458 + "Type": "select", 13459 + "Values": [ 13460 + { 13461 + "text": "Webinar 1", 13462 + "value": "Webinar_1" 13463 + }, 13464 + { 13465 + "text": "Webinar 2", 13466 + "value": "Webinar_2" 13467 + } 13468 + ] 13469 + }, 13470 + { 13471 + "Name": "Transaction Date", 13472 + "Type": "text" 13473 + }, 13474 + { 13475 + "Name": "id", 13476 + "Type": "text" 13477 + }, 13478 + { 13479 + "Name": "activity_time", 13480 + "Type": "text" 13481 + } 13482 + ] 13483 + } 13484 + ] 13485 +} 13486 +{{/code}} 13487 + 13488 + 13489 + 13490 + 13491 + 13492 + 13380 13380 (% id="HPOSTAddUsertoEngagement" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13381 13381 == (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#ad7a03" %)POST(% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %) Add User to Engagement(%%) == 13382 13382