Skip to content
SteveBell edited this page Apr 7, 2011 · 6 revisions

GET /instruments.json?api_key=<YOUR API KEY>

[
    {
        created_at: "2011-04-02T11:45:29Z"
        data_type_id: 1
        deadtime: 11
        error: 11
        id: 20
        location_id: 254
        model: "TEst"
        notes: "Test test test"
        updated_at: "2011-04-02T11:45:30Z"
        user_id: 2
    }
]

GET /instruments/<INSTRUMENT ID>.json?api_key=<YOUR API KEY>

{
    created_at: "2011-04-02T11:45:29Z"
    data_type_id: 1
    deadtime: 11
    error: 11
    id: 20
    location_id: 254
    model: "TEst"
    notes: "Test test test"
    updated_at: "2011-04-02T11:45:30Z"
    user_id: 2

}

POST /instruments

Required parameters:
data_type_id: id,
model: string,
notes: string,
error: integer,
deadtime: integer,
To use a existing location:
location_id: integer
To create a new location:
location_name: string,
location_latitude: float,
location_longitude: float,

Returns the created instrument like 
# GET /instruments/<INSTRUMENT ID>.json

PUT /instruments/<INSTRUMENT ID>.json?api_key=<YOUR API KEY>

Same parameters like # POST /instruments

Returns the changed instrument like 
# GET /instruments/<INSTRUMENT ID>.json

DELETE /instruments/<INSTRUMENT ID>.json?api_key=<YOUR API KEY>

Returns the deleted instrument like 
# GET /instruments/<INSTRUMENT ID>.json

Back to the Main-Wiki.