{"id":189,"date":"2020-04-27T12:07:10","date_gmt":"2020-04-27T12:07:10","guid":{"rendered":"http:\/\/localhost\/senitron\/?page_id=189"},"modified":"2020-04-29T16:40:23","modified_gmt":"2020-04-29T16:40:23","slug":"restapi-session-ping","status":"publish","type":"page","link":"https:\/\/senitron.net\/developers\/restapi-session-ping\/","title":{"rendered":"RESTAPI-Session Ping"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"--awb-bg-size:cover;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-column-wrapper-legacy\"><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-top:0px;margin-bottom:0px;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;border-color:#e2e2e2;border-top-width:2px;\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-1\"><p><span class=\"redtextcolor\">Service Name \u00a0\u00a0<\/span><span class=\"textindentlevel1\"> \u00a0\u00a0 Session Ping<\/span><br \/>\n<span class=\"redtextcolor\">Service Method\u00a0\u00a0 <\/span><span class=\"textindentlevel1\"> GET<\/span><br \/>\n<span class=\"redtextcolor\">Service URL\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 <\/span><span class=\"textindentlevel1\"> \/sessions\/ping<\/span><\/p>\n<p><span class=\"redtextcolor\">Request Header Fields <\/span><br \/>\n<span class=\"greentextcolor\">Content-Type<\/span> = <span class=\"cyantextcolor\">application\/json<\/span><br \/>\n<span class=\"greentextcolor\">Authorization<\/span> = &lt;<span class=\"cyantextcolor\">token<\/span>&gt;<\/p>\n<p><span class=\"darkbluetextcolor\">Response Data (JSON)<\/span><br \/>\n{<br \/>\n<span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">settings<\/span>\": {<\/span><br \/>\n<span class=\"textindentlevel2\">\"<span class=\"greentextcolor\">auto_login<\/span>\": &lt;<span class=\"cyantextcolor\">auto login status<\/span>&gt;,<br \/>\n\"<span class=\"greentextcolor\">remember_username<\/span>\": &lt;<span class=\"cyantextcolor\">remeber username status<\/span>&gt;,<br \/>\n\"<span class=\"greentextcolor\">remember_password<\/span>\": &lt;<span class=\"cyantextcolor\">remeber password status<\/span>&gt;,<br \/>\n\"<span class=\"greentextcolor\">api_url<\/span>\": \"&lt;<span class=\"cyantextcolor\">base api url<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">check_version<\/span>\": &lt;<span class=\"cyantextcolor\">version check status<\/span>&gt;,<br \/>\n\"<span class=\"greentextcolor\">current_version<\/span>\": \"&lt;<span class=\"cyantextcolor\">senitron mobile app current version<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">current_version_url<\/span>\": \"&lt;<span class=\"cyantextcolor\">senitron mobile app current version url<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">timezone<\/span>\": \"&lt;<span class=\"cyantextcolor\">timezone<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">check_timezone<\/span>\":&lt;<span class=\"cyantextcolor\">check timezone status<\/span>&gt;,<br \/>\n\"<span class=\"greentextcolor\">default_location<\/span>\": {<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">code<\/span>\": \"&lt;<span class=\"cyantextcolor\">default location code<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">name<\/span>\": \"&lt;<span class=\"cyantextcolor\">default location name<\/span>&gt;\"<\/span><br \/>\n<span class=\"textindentlevel2\">},<br \/>\n\"<span class=\"greentextcolor\">locations<\/span>\": [<\/span><br \/>\n<span class=\"textindentlevel3\">{<\/span><br \/>\n<span class=\"textindentlevel4\">\"<span class=\"greentextcolor\">code<\/span>\": \"&lt;<span class=\"cyantextcolor\">location code<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">name<\/span>\": \"&lt;<span class=\"cyantextcolor\">location name<\/span>&gt;\"<\/span><br \/>\n<span class=\"textindentlevel3\">},<br \/>\n{<\/span><br \/>\n<span class=\"textindentlevel4\">\"<span class=\"greentextcolor\">code<\/span>\": \"&lt;<span class=\"cyantextcolor\">location code<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">name<\/span>\": \"&lt;<span class=\"cyantextcolor\">location name<\/span>&gt;\"<\/span><br \/>\n<span class=\"textindentlevel3\">}<\/span><br \/>\n<span class=\"textindentlevel2\">]<\/span><br \/>\n<span class=\"textindentlevel1\">}<\/span><br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p><span class=\"graytextcolor\">Example<\/span><br \/>\n<span class=\"blacktextcolor\">GET: http:\/\/app.senitron.net\/api\/v1\/sessions\/ping<\/span><br \/>\n{<br \/>\n<span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">settings<\/span>\": {<\/span><br \/>\n<span class=\"textindentlevel2\">\"<span class=\"greentextcolor\">auto_login<\/span>\": <span class=\"cyantextcolor\">false<\/span>,<br \/>\n\"<span class=\"greentextcolor\">remember_username<\/span>\": <span class=\"cyantextcolor\">true<\/span>,<br \/>\n\"<span class=\"greentextcolor\">remember_password<\/span>\": <span class=\"cyantextcolor\">true<\/span>,<br \/>\n\"<span class=\"greentextcolor\">api_url<\/span>\": \"<span class=\"cyantextcolor\">http:\/\/app.senitron.net\/\/api\/v1<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">check_version<\/span>\": <span class=\"cyantextcolor\">true<\/span>,<br \/>\n\"<span class=\"greentextcolor\">current_version<\/span>\": \"<span class=\"cyantextcolor\">1.24.0<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">current_version_url<\/span>\": \"<span class=\"cyantextcolor\">https:\/\/senitroncloud.s3.amazonaws.com\/uploads\/handheld_apk\/SenitronRFID-v1.24.0.apk<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">timezone<\/span>\": \"<span class=\"cyantextcolor\">America\/Los_Angeles<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">check_timezone<\/span>\": <span class=\"cyantextcolor\">true<\/span>,<br \/>\n\"<span class=\"greentextcolor\">default_location<\/span>\": {<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">code<\/span>\": \"<span class=\"cyantextcolor\">001<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">name<\/span>\": \"<span class=\"cyantextcolor\">Floor-1<\/span>\"<\/span><br \/>\n<span class=\"textindentlevel2\">},<br \/>\n\"<span class=\"greentextcolor\">locations<\/span>\": [<\/span><br \/>\n<span class=\"textindentlevel3\">{<\/span><br \/>\n<span class=\"textindentlevel4\">\"<span class=\"greentextcolor\">code<\/span>\": \"<span class=\"cyantextcolor\">001<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">name<\/span>\": \"<span class=\"cyantextcolor\">Floor-1<\/span>\"<\/span><br \/>\n<span class=\"textindentlevel3\">}<\/span><br \/>\n<span class=\"textindentlevel2\">]<\/span><br \/>\n<span class=\"textindentlevel1\">}<\/span><br \/>\n}<\/p>\n<\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"side-navigation.php","meta":{"footnotes":""},"class_list":["post-189","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":1,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages\/189\/revisions"}],"predecessor-version":[{"id":1324,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages\/189\/revisions\/1324"}],"wp:attachment":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/media?parent=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}