Read a Key

This request will list the permissions and resource objects associated with the given API Key. Permissions and Resource objects are detailed here.

Request

Parameters
Method GET
Base URL https://api.xively.com
API Endpoint /v2/keys/KEY
Headers
X-ApiKey API_KEY_HERE
Body
JSON
XML
CSV
  • GET/v2/keys/KEY.json

    This request does not require body data
    
  • GET/v2/triggers/TRIGGER_ID.xml

    This request does not require body data
    
  • CSV format not available for this call
    

 

 

Response

Parameters
Status Code 200 OK
Headers
No Headers
Body
JSON
XML
CSV
  • {
        "key": {
            "api_key": "YMlMd2TsjWZLTY3w9MHW0JydaWCSAKxXVW00SFg3WW1raz0g",
            "label": "API TEST",
            "private_access": true,
            "permissions": [
                {
                    "access_methods": [
                        "get",
                        "put",
                        "post",
                        "delete"
                    ]
                }
            ]
        }
    }
    
  • <?xml version="1.0" encoding="UTF-8"?>
    <key>
        <api-key>YMlMd2TsjWZLTY3w9MHW0JydaWCSAKxXVW00SFg3WW1raz0g</api-key>
        <label>API TEST</label>
        <private-access>true</private-access>
        <permissions>
            <permission>
                <access-methods>
                    <access-method>get</access-method>
                    <access-method>put</access-method>
                    <access-method>post</access-method>
                    <access-method>delete</access-method>
                </access-methods>
            </permission>
        </permissions>
    </key>
    
  • CSV format not available for this call