Key

Primary key

A key is the resource field defined as the primary key in the database schema. Most often, the key is the id field. Refer to the resource tables in the Database Schema Reference for the primary key definition of each resource.

Any particular resource element can be retrieved by specifying the key value following the resource name in the URI. For example to request an experiment resource element whose id field value is 3, use the following syntax:

http://myhost/rundb/api/v1/experiment/3

This returns the single experiment.

Use keys to get a resource

You can get a set of resources by adding the set keyword to the URI and specifying the primary key value of each resource, separated by a semicolon. For example:

http://myhost/rundb/api/v1/experiment/set/3;5

This returns two resource elements whose id field values are 3 and 5.

Table of contents

Previous topic

Work with Django

Next topic

Fields

This Page