 - If JSON is not required for API message options, it is still valid.
 - If API message options are sent as JSON, the message must be sent with
   a request header of "Content-Type: application/json".
+
+- See also: API mocha test suite:
+  https://github.com/sagemathinc/cocalc/tree/master/src/smc-hub/test/api
 
 ###
 

# create) a plain text file (binary files not allowed, since sending
# them via JSON makes no sense).
# client --> hub
API message
    event        : 'write_text_file_to_project'
    id           : undefined
    project_id   : required
    path         : required
    content      : required

# The file_written_to_project message is sent by a project_server to
# confirm successful write of the file to the project.


Set title and description for a project, given the project id.
  curl -u sk_abcdefQWERTY090900000000: -H "Content-Type: application/json" \
    -d '{"query":{"projects":{"project_id":"29163de6-b5b0-496f-b75d-24be9aa2aa1d", \
                              "title":"REVISED TITLE", \
                              "description":"REVISED DESC"}}}' \
    https://cocalc.com/api/v1/query
    ==> {"event":"query",
         "query":{},
         "multi_response":false,
         "id":"ad7d6b17-f5a9-4c5c-abc3-3823b1e1773f"}

Information on which fields are gettable and settable in the database tables
via API message is in file 'db-schema.coffee', in CoCalc sources on GitHub at
