Skip to content

Initial machine API

Piotr Kira requested to merge machine_api into master

Simple refactor of add_machine script + initial API for importing machines (It works in similar manner as add_machine.py script)

Honestly I don't know where to put this endpoint as it's not "pure" POST/PUT/PATCH because it does much more, eg creates non existing tags, vet/suppress machine, updates fields, assign tags etc. I thought I could create separate API endpoint just for "importing" feature, eg POST "/api/machine/import/" instead of POST "/api/machine/"

Schema:

{	
        "name": "name",
        "description": "description",
	"public": true,
        "vetted": false,
        "alias": "alias_name",
	"tags": ["a1", "a2"]
}

To access API endpoint one has to be logged or use API Token which is possible to create via Django Admin panel.

Relates-to: #176 (closed)

Edited by Piotr Kira

Merge request reports