Update a Key

Request

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

     {
      "key":{
        "label":"sharing key",
        "private_access": true,
        "expires_at": "2013-03-27T01:23:45.123456Z",
        "permissions":[
          {
            "access_methods":["put"],
            "source_ip": "128.44.98.129",
            "referer": "my-domain.com",
            "resources": [
              {
                "feed_id": 504
              }
            ]
          },
          {
            "access_methods": ["get"]
          }
        ]
      }
    }
    
  • PUT/v2/keys/KEY.xml

     <key>
        <label>sharing key</label>
        <private-access>true</private-access>
        <expires_at>2013-03-27T01:23:45.123456Z</expires_at>
        <permissions>
          <permission>
              <access-methods>
                <access-method>put</access-method>
              </access-methods>
              <source-ip>128.44.98.129</source-ip>
              <referer>my-domain.com</referer>
              <resources>
                <resource>
                    <feed-id>FEED_ID_TO_ACCESS</feed-id>
                </resource>
              </resources>
          </permission>
          <permission>
              <access-methods>
                <access-method>get</access-method>
              </access-methods>
          </permission>
        </permissions>
    </key>
    
  • CSV format not available for this call
    

 

 

Response

Parameters
Status Code 200 OK
Headers
No Headers
Body
JSON
XML
CSV
  • This response does not return body data
    
  • This response does not return body data
    
  • CSV format not available for this call