android_app_beta

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

android_app_beta [2012/11/21 23:37]
cbeley created
android_app_beta [2012/11/21 23:38] (current)
cbeley
Line 1: Line 1:
-====== Flextory API Documentation ====== +====== Installing the Beta Flextory Android App ====== 
-===== Introduction ===== +Flextory is not yet in the Android App Store, so you'll have to explicitly tell your phone to allow installing Android applications from "unknown sources".  To do this go to Settings->Applications and then check "Unknown Sources".  You can then install the Flextory Android app by downloading [[http://flextory.com/Flextory-0.9.0.apk]] from your Android device.
-The Flextory API allows you to query and manipulate items via simple url calls.  The API can be used to integrate the data you have in Flextory with other applications and scripts.  Some examples of how the Flextory API could be useful are as follows:+
  
-  * Have your DNS server only allow machines that are listed in your Flextory account +You may also download Flextory by scanning in the QR code below:
-  * Import data from another database or source +
-  * Export data to another source +
-  * Create new interfaces/software to manipulate data you have listed in Flextory +
-  * Automatically add data to your Flextory account based on events in your custom software +
-  * Whatever else you can imagine+
  
-===== Usage Limits ===== +{{:qrcode.8483444.png |}}
-Your use of the Flextory API is limited by the plan in which you are subscribed to and the terms listed in the **Service Agreement** Excessive or abusive usage of the Flextory API may result in warnings and or suspension of your account.  If you have concerns about your particular use of the API, please contact [[support@flextory.com]].+
  
-===== What You Will Need ===== +====== Updates ====== 
-  * Your Flextory Private Key +The Flextory Android App is not yet in the Android store, so you'll have to check back here for any updates.  Major updates will be mentioned in the [[http://flextory.com/blog|Flextory blog]] and a change log is shown below.
-    * A private key is automatically generated for each new Flextory user.  Click on your name (User Profile) while logged into Flextory to retrieve your private key. +
-  * A Language with an implementation of [[http://en.wikipedia.org/wiki/Hash-based_message_authentication_code|HMAC]] with support for [[http://en.wikipedia.org/wiki/SHA-2|SHA512]]+
  
-===== Basic Usage ===== +====== Flextory Android App Change Log ====== 
-You'll first have to build a query string.  For example, the following query string finds all items that have the Item Type, 'Desktop': +  * Jul/28/12 Flextory-0.9.Initial public release.
- +
-<code> +
-userName=api&search=true&itemType=Desktop +
-</code> +
- +
-You then have to use the HMAC method on your query string to generate your public key for this request.  In PHP, you would do the following: +
- +
-<code> +
-$publicKey = hash_hmac('sha512', 'userName=api&search=true&itemType=Desktop', '[Private Key Here]'); +
-</code> +
- +
-You then need to add your public key to the end of your query string like so: +
- +
-<code> +
-userName=api&search=true&itemType=Desktop&publicKey=$publicKey +
-</code> +
- +
-Finally, you can put the entire url together like so: +
- +
-<code> +
-http://home.codingbychris.com:82/inventory/inventory/dataHandlers/api.php?userName=api&search=true&itemType=Desktop&publicKey=$publicKey +
-</code> +
- +
-Make use of https:// instead of http:// to use a secure connection if your language supports it.  Consult your language's documentation on how to configure and use https. +
- +
-The server will then return a JSON object.  If the 'success' variable is true, then the query was successful.  An example response can be seen below. +
- +
-<code> +
-+
-  "items": [ +
-    { +
-      "assetType": "Desktop",  +
-      "attributes": { +
-        "OS": "Windows",  +
-        "IP": "192.168.1.232",  +
-        "End User": "Fred",  +
-      },  +
-      "barcode": "4334433434",  +
-      "dateAdded": "2012-03-09 10:28:29",  +
-      "dateModified": "2012-03-09 10:28:29",  +
-      "id": 29,  +
-      "name": "Glados" +
-    },  +
-    { +
-      "assetType": "Desktop",  +
-      "attributes": { +
-        "OS": "Linux",  +
-        "IP": "192.168.1.222",  +
-        "End User": "Chris",  +
-      },  +
-      "barcode": "34453344",  +
-      "dateAdded": "2012-03-09 10:29:27",  +
-      "dateModified": "2012-03-09 10:29:27",  +
-      "id": 34,  +
-      "name": "Pixie" +
-    } +
-  ],  +
-  "success": "true" +
-+
-</code> +
- +
-===== Available Operations ===== +
-==== Item Retrieval ==== +
-^ Operation^ Description^ Example^ +
-| id    | Retrieve an item by its id    | <code>id=23</code> | +
-| barcode    | Retrieve an item by its barcode. | <code>barcode=AB293F3</code> | +
-| search    | Perform a search of all items in your inventory     | <code>search=true</code>  | +
-| category | Search for items in a particular category id | <code>search=true&category=23</code> | +
-| attributeValues[] | Search for items that have particular attribute values.  * can be used as a wildcard. | <code>search=true&attributeValues[]=value1&attributeValues[]=value2</code> | +
-| attributePairValues | Search for attribute/value pairs.  Must be used with attributePairTitles. * can be used as a wildcard. | <code>search=true&attributePairValues[]=val1&attributePairTitles[]=title1&attributePairValues[]=val2&attributePairTitles[]=title2</code> | +
-| name | Search for items with a particular name.  * can be used as a wildcard. | <code>search=true&name=someName</code> | +
-| offset | Retrieve items past a certain offset for pagination type activities. | <code>search=true&attributeValues[]=red&offset=10</code> | +
-| itemsWanted | Limit the amount of returned results. | <code>search=true&attributeValues[]=red&itemsWanted=5</code> | +
- +
-==== Item Manipulation ==== +
-Coming Soon!+
  
  
android_app_beta.1353541035.txt.gz · Last modified: 2012/11/21 23:37 by cbeley