FORMAT: 1A HOST: https://www.ethercalc.org/
API for real-time collaborative spreadsheets.
- Overview: http://ethercalc.net/
- 中文版: http://ethercalc.tw/
Note: When using curl
, please make sure to --data-binary
instead of --data
. For example:
curl -X PUT -H 'Content-Type: text/x-socialcalc' \
--data-binary @example.sc http://127.0.0.1:8000/_/example
Takes a JSON structure with room
and snapshot
fields.
Replaces the page with a serialization in Socialtext save format.
If room
is not specified, returns a new page.
-
Request (application/json)
{ "room": "test" , "snapshot": "..." }
-
Response 201
-
Headers
Location: /_/test
-
Takes a CSV structure that contains the new spreadsheet's content.
- Request (text/csv)
- Response 201
Takes a SocialCalc serialization format that contains the new spreadsheet's content.
- Request (text/x-socialcalc)
- Response 201
Fetch the page as a serialization in SocialCalc save format.
- Response 200 (text/x-socialcalc)
Replace the page with a serialization in CSV format.
- Request (text/csv)
- Response 200
Replace the page with a serialization in SocialCalc save format.
- Request (text/x-socialcalc)
- Response 200
Takes a JSON structure with a command
field (either as a string
or an array of strings), or a plain-text command string.
Runs one or more commands specified in the command
field.
To find out which command corresponds to which spreadsheet actions, perform the actions on the web interface and check the Audit tab for the recorded commands.
-
Request (application/json)
-
Response 202
{"command": "..."}
Takes a CSV structure that contains fields to be appended to the first column after the last row.
- Parameters
- row (optional, integer) ... If specified, insert and paste on the specified row instead of the last.
- Request (text/csv)
- Response 200
Returns a JSON representation of all defined cells in the page.
- Response 200 (application/json)
Returns a JSON representation of a single cell in the page.
- Response 200 (application/json)
Returns a HTML rendering of the page. (GET /_/{id}/html
also works.)
- Response 200 (text/html)
Returns a CSV rendering of the page. (GET /_/{id}/csv
also works.)
- Response 200 (text/csv)
Returns a JSON array-of-array rendering of the page. (GET /_/{id}/csv.json
also works.)
- Response 200 (text/csv)