{"id":13095,"date":"2016-06-22T08:53:28","date_gmt":"2016-06-22T13:53:28","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=13095"},"modified":"2016-07-13T11:28:36","modified_gmt":"2016-07-13T16:28:36","slug":"uri-parameters","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mtr-software\/mtr-api-reference\/rcell_api_requests\/uri-parameters\/","title":{"rendered":"URI Parameters"},"content":{"rendered":"<p>URI parameters are reserved keys that are used to modify the functionality of API calls, override HTTP header values, and bundle multiple API requests together. Below is a list of available URI keys and descriptions of their functionality.<\/p>\n<table style=\"width: 650; border-collapse: collapse;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; background: #4F81BD; padding: 0in .01in 0in .01in; color: white;\" valign=\"top\" width=\"150\"><strong>URI Key<\/strong><\/td>\n<td style=\"border: solid #4F81BD 1.0pt; background: #4F81BD; padding: 0in .01in 0in .01in; color: white;\" colspan=\"2\" valign=\"top\" width=\"500\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">fields<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Applies a RESTful action to multiple collections\/elements. Each request path is separated by a comma. Requested data within a field is returned using the path by replacing &#8216;\/&#8217; characters with &#8216; &#8216; characters.\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">method<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Allows passing RESTful action (GET, PUT, POST, &amp; DELETE) in URI. This overrides the HTTP header method.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">apply<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Allows the request to be applied at the given timestamp without restarting. Currently, only apply=now is supported.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">token<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Authorizes an API call. A token is returned after a successful login. If a user is logged in, the whoami request will return that user&#8217;s current token.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">inactivity<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Allows requests to be made without bumping the user&#8217;s token expiration date. This is useful for automated polling loops that would otherwise allow a user to timeout due to inactivity. (<strong>inactivity<\/strong>=<strong>true<\/strong>)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">session<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Reserved for internal use. This member will be overwritten.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">data<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Allows you to pass a JSON Object in the URI.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">default<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Retrieves the factory defaults of a collection when using a RESTful GET request, and sets a collection to its factory defaults when using a RESTful PUT request. (<strong>default<\/strong>=<strong>true<\/strong>)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">version<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Sets the API version expectation for that request.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">username<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Stores a user&#8217;s login name. Used for logging into the API.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">password<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Stores a user&#8217;s login password. Used for logging into the API.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" valign=\"top\" width=\"150\">logoutUser<\/td>\n<td style=\"border: solid #4F81BD 1.0pt; padding: 0in .01in 0in .01in;\" colspan=\"2\" valign=\"top\" width=\"500\">Names the user you are logging out. Use this parameter for an api\/logout request only.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Example<\/h3>\n<p><strong>Behavior of the &#8220;fields&#8221; key<\/strong>:<\/p>\n<pre class=\"brush:xml\">GET https:\/\/192.168.2.1\/api?fields=lan\/ip,serial\/client\/enabled&amp;method=GET\r\n\r\nStatus: HTTP\/1.1 200 OK\r\n{\r\n    \"code\" : 200, \r\n    \"result\" : {\r\n        \"lan_ip\" : \"192.168.2.1\",\r\n        \"serial_client_enabled\" : false\r\n    },\r\n    \"status\" : \"success\"\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>URI parameters are reserved keys that are used to modify the functionality of API calls, override HTTP header values, and bundle multiple API requests together. Below is a list of available URI keys and descriptions of their functionality. URI Key Description fields Applies a RESTful action to multiple collections\/elements. Each request path is separated by [&hellip;]<\/p>\n","protected":false},"author":1872,"featured_media":0,"parent":12979,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-13095","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1872"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=13095"}],"version-history":[{"count":23,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13095\/revisions"}],"predecessor-version":[{"id":13509,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13095\/revisions\/13509"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/12979"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=13095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}