mirror of
https://github.com/gosticks/octoprint-open-api.git
synced 2025-10-16 11:45:38 +00:00
WIP: add settings endpoint
This commit is contained in:
parent
8f75b74af1
commit
f156793e1b
12
TODO.md
12
TODO.md
@ -54,7 +54,7 @@
|
||||
- [x] Model: Temperature State
|
||||
- [x] Model: SD State
|
||||
- [x] Model: Arbitrary Command Request
|
||||
- [ ] Printer profile operations [link](https://docs.octoprint.org/en/master/api/printerprofiles.html)
|
||||
- [x] Printer profile operations [link](https://docs.octoprint.org/en/master/api/printerprofiles.html)
|
||||
- [x] Retrieve all printer profiles
|
||||
- [x] Retrieve a single printer profile
|
||||
- [x] Add a new printer profile
|
||||
@ -63,11 +63,11 @@
|
||||
- [x] Model: Profile list
|
||||
- [x] Model: Add or update request
|
||||
- [x] Model: Profile
|
||||
- [ ] Settings [link](https://docs.octoprint.org/en/master/api/settings.html)
|
||||
- [ ] Retrieve current settings
|
||||
- [ ] Save settings
|
||||
- [ ] Regenerate the system wide API key
|
||||
- [ ] Fetch template data
|
||||
- [x] Settings [link](https://docs.octoprint.org/en/master/api/settings.html)
|
||||
- [x] Retrieve current settings
|
||||
- [x] Save settings
|
||||
- [x] Regenerate the system wide API key
|
||||
- [x] Fetch template data
|
||||
- [ ] Model: Config
|
||||
- [ ] Slicing TBD [link](https://docs.octoprint.org/en/master/api/slicing.html)
|
||||
- [ ] System [link](https://docs.octoprint.org/en/master/api/system.html)
|
||||
|
||||
4
openapi/components/schemas/Config.yaml
Normal file
4
openapi/components/schemas/Config.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
type: object
|
||||
description: >-
|
||||
OctoPrint config (Work in Progress)
|
||||
additionalProperties: true
|
||||
6
openapi/components/schemas/Templates.yaml
Normal file
6
openapi/components/schemas/Templates.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
additionProperties: true
|
||||
13
openapi/components/schemas/utils/Template.yaml
Normal file
13
openapi/components/schemas/utils/Template.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
plugin_id:
|
||||
type: string
|
||||
plugin_name:
|
||||
type: string
|
||||
13
openapi/paths/settings/apikey-post.yaml
Normal file
13
openapi/paths/settings/apikey-post.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
summary: Regenerate the system wide API key
|
||||
operation: regenerateApiKey
|
||||
description: >-
|
||||
Generates a new system wide API key.
|
||||
|
||||
Does not expect a body. Will return the generated API key as apikey property in the JSON object contained in the response body.
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
ApiKey was regenerated
|
||||
"403":
|
||||
description: >-
|
||||
No admin rights
|
||||
12
openapi/paths/settings/get.yaml
Normal file
12
openapi/paths/settings/get.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
summary: Retrieve current settings
|
||||
operation: getSettings
|
||||
description: >-
|
||||
Retrieves the current configuration of OctoPrint.
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
Current OctoPrint state
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../components/schemas/Config.yaml
|
||||
19
openapi/paths/settings/post.yaml
Normal file
19
openapi/paths/settings/post.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
summary: Update Settings
|
||||
operation: updateSettings
|
||||
description: >-
|
||||
Saves the provided settings in OctoPrint.
|
||||
|
||||
Expects a JSON object with the settings to change as request body. This can be either a full settings tree, or only a partial tree containing only those fields that should be updated.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../components/schemas/Config.yaml
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
Current OctoPrint state
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../components/schemas/Config.yaml
|
||||
14
openapi/paths/settings/templates-get.yaml
Normal file
14
openapi/paths/settings/templates-get.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
summary: Fetch template data
|
||||
operation: getTemplates
|
||||
description: >-
|
||||
Fetch data (currently only the sorting order) of all registered template components in the system.
|
||||
|
||||
Use this to get a full list of the identifiers of all UI components provided either by core OctoPrint or any currently active plugins.
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
Current OctoPrint state
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../components/schemas/Templates.yaml
|
||||
Loading…
Reference in New Issue
Block a user