List All Keys

This method returns all of the user’s keys. This list is not paginated: all keys are returned in a single document.

Request

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

    This request does not require body data
    
  • GET/v2/keys.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
  • {
        "keys": [
            {
                "api_key": "API_KEY",
                "label": "Electric Key",
                "private_access": true,
                "permissions": [
                    {
                        "access_methods": [
                            "get",
                            "put",
                            "post",
                            "delete"
                        ]
                    }
                ]
            },
            {
                "api_key": "API_KEY",
                "expires_at": "2013-03-27T01:23:45Z",
                "label": "sharing key",
                "private_access": true,
                "permissions": [
                    {
                        "access_methods": [
                            "get"
                        ]
                    },
                    {
                        "access_methods": [
                            "put"
                        ],
                        "referer": "my-domain.com",
                        "source_ip": "128.44.98.129",
                        "resources": [
                            {
                                "feed_id": 123199
                            }
                        ]
                    }
                ]
            },
            {
                "api_key": "API_KEY",
                "label": "Another Key",
                "private_access": true,
                "permissions": [
                    {
                        "access_methods": [
                            "get",
                            "put",
                            "post",
                            "delete"
                        ]
                    }
                ]
            }
        ]
    }
    
  • <?xml version="1.0" encoding="UTF-8"?>
    <keys type="array">
        <key>
            <api-key>API_KEY</api-key>
            <label>Electric Key</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>
        <key>
            <api-key>API_KEY</api-key>
            <label>sharing key</label>
            <expires-at>2013-03-27 01:23:45 UTC</expires-at>
            <private-access>true</private-access>
            <permissions>
                <permission>
                    <access-methods>
                        <access-method>get</access-method>
                    </access-methods>
                </permission>
                <permission>
                    <referer>my-domain.com</referer>
                    <source-ip>128.44.98.129</source-ip>
                    <access-methods>
                        <access-method>put</access-method>
                    </access-methods>
                    <resources>
                        <resource>
                            <feed-id>123199</feed-id>
                        </resource>
                    </resources>
                </permission>
            </permissions>
        </key>
        <key>
            <api-key>API_KEY</api-key>
            <label>Another Key</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>
    </keys>
    
  • CSV format not available for this call