API Resources

The following table lists the complete set of operations you can perform with the Xively API. These operations are accomplished using 7 Xively resources: Products, Devices, Keys, Feeds, Triggers, Datastreams, and Datapoints. Each resource has specific attributes associated with it. Note: If you do not specify a format/media type – JSON, CSV or XML – when interacting with the Xively API, the default format accepted/returned is JSON.

Feeds, Datastreams and Datapoints

Resource Operation Format Example URL Method Returns
Feeds Read json, xml, csv https://api.xively.com/v2/feeds/

see Searching Feeds for details on refining the list of returned Feeds.
GET Feed containing the current state of all Datastreams and metadata.
Feeds Read (range) json, xml, csv https://api.xively.com/v2/feeds/
feed_id?range

see Historical Data for details on how to format feed_id and range
GET Feed containing the specified range of historical data in each Datastream.
Feeds Update json, xml, csv https://api.xively.com/v2/feeds/feed_id PUT HTTP headers only
Feeds List All json, xml, csv https://api.xively.com/v2/feeds GET All available Feeds
Datastreams Create json, xml, csv https://api.xively.com/v2/feeds/feed_id/
datastreams
POST n/a
Datastreams Read json, xml, csv, png https://api.xively.com/v2/feeds/feed_id/
datastreams/datastream_id
GET Feed containing the current state of the requested Datastream.
Datastreams Read (range) json, xml, csv, png https://api.xively.com/v2/feeds/feed_id/
datastreams/datastream_id?range

see Historical Data for details on how to format feed_id and range
GET Feed containing the specified range of historical data in the requested Datastream.
Datastreams Update json, xml, csv https://api.xively.com/v2/feeds/feed_id/
datastreams/datastream_id
PUT HTTP Headers only
Datastreams Delete json, xml, csv https://api.xively.com/v2/feeds/feed_id/
datastreams/datastream_id
DELETE HTTP Headers only
Datastreams List All   To retrieve all the available Datastreams in a Feed, read the Feed:
https://api.xively.com/v2/feeds/feed_id
GET Feed with all Datastreams
Datapoints Delete (single) n/a https://api.xively.com/v2/feeds/feed_id/
datastreams/datastream_id/datapoints/
timestamp
DELETE HTTP Headers only
Datapoints Delete (range) n/a https://api.xively.com/v2/feeds/feed_id/
datastreams/datastream_id/
datapoints?range

see Historical Data for details on how to format range
DELETE HTTP Headers only

Products, Devices, Keys and Triggers

Resource Operation Format Example URL Method Returns
Products Create json https://api.xively.com/v2/products POST Location header with created product location.
Products Update json https://api.xively.com/v2/products/
product_id
PUT HTTP headers only
Products List All json https://api.xively.com/v2/products GET Multiple Products
Products Read json https://api.xively.com/v2/products/
product_id
GET Single product
Products Delete n/a https://api.xively.com/v2/products/
product_id
DELETE HTTP headers only
Devices Create json https://api.xively.com/v2/products/
product_id/devices
POST Location header with created device location
Devices Read json https://api.xively.com/v2/products/
product_id/devices/serial_number
GET Single device
Devices Update json https://api.xively.com/v2/products/
product_id/devices/serial_number
PUT HTTP headers only
Devices Delete n/a https://api.xively.com/v2/products/
product_id/devices/serial_number
DELETE HTTP headers only
Devices List All json https://api.xively.com/v2/products/
product_id/devices
GET Multiple Devices
Devices Activate json, csv https://api.xively.com/v2/devices/
activation_code/activate
GET HTTP headers only
Keys Create json, xml https://api.xively.com/v2/keys POST HTTP Headers only
Keys Read json, xml https://api.xively.com/v2/keys/key_id GET json, xml
Keys Delete n/a https://api.xively.com/v2/keys/key_id DELETE HTTP Headers only
Keys List All json, xml https://api.xively.com/v2/keys GET json, xml
Triggers Create json, xml https://api.xively.com/v2/triggers/ POST HTTP Headers only
Triggers Read json, xml https://api.xively.com/v2/triggers/trigger_id GET trigger
Triggers Update json, xml https://api.xively.com/v2/triggers/trigger_id PUT HTTP Headers only
Triggers Delete n/a https://api.xively.com/v2/triggers/trigger_id DELETE HTTP Headers only
Triggers List All json, xml https://api.xively.com/v2/triggers/ GET Triggers