-
Notifications
You must be signed in to change notification settings - Fork 9
API Features and Endpoints #13
Comments
I propose we should have all apis not in root route but in "/api/"
|
What's the purpose of this? |
@jzaefferer our download zip will contain a json file that can later be uploaded to the site to get back to the theme. This will be beneficial in case we change api/other things in future. |
You've edited the original description to say "without upload", what will that look like? Use HTTP terms, please. |
I believe the decision between @geekman-rohit, @arschmitz, and myself last Tuesday was to paste json data into a textarea and processing the variable data via a form submit, allowing for more client side validation, rather than uploading a physical .json file via a file uploader to the server. |
So the endpoint would be a POST method expecting a application/json body? |
Yes. |
@sfrisk I believe what we discussed was that it would not post at all and would just parse client side and update the approriate fields |
Okay. What about the |
Ah okay, for some reason I thought it was going through the server side code, but my IRC history didn't go back that far to double check. I stand corrected. |
It will be GET, the json data for variables will be encoded in a string (and probably compressed) and passed as shown in example, using GET. I added upload file option to consider any server side support to parse the JSON File (which will contain theme data which user can upload to recover the theme). @arschmitz , me and @sfrisk however agreed not to use any server side support at all and parse json in the browser, and rely on the usual api (or in browser method) used to update the theme. |
It has been decided not to use a database for now, instead all data is to be passed to server using HTTP GET. The UI wil also update the current url in window with the latest changes in data. This would make each theme state bookmarkable.
This is a general issue, also to discuss what features the API should support and the addresses for each
For example :
3. Upload JSON file(We agreed on doing this without upload, the ui will parse the json and update the theme)The text was updated successfully, but these errors were encountered: