keiono / cy-rest

This site is obsolete! Please use the link here:
http://github.com/idekerlab/cyREST
MIT License
4 stars 1 forks source link

Make Table PUT API more intuitive #24

Closed keiono closed 10 years ago

keiono commented 10 years ago

In current version, updating Table data requires the following steps:

  1. Create new columns one-by-one
  2. Prepare data to be PUT:
    • mapping key name in target table
    • mapping key in the data to be posted
    • Actual key-value pairs
  3. Call PUT method

This is not intuitive. We need a simplified method to batch-update table.

keiono commented 10 years ago

The API has been updated to accept simplified document body:

{
    "data":[
        {
            "SUID": 1234,
            "col1": "foo"
        }
    ]
}

Also, it automatically creates new columns if it does not exists.

Limitation

Automatic column creation is limited to the following data types:

If user needs to specify number types, he/she needs to create column before calling this PUT method.