PlaceOS/build

API

Closed this issue · 0 comments

A simple Spider-Gazelle API layered over the PlaceOS build tool.
This API will be a good use-case for the new OpenAPI generator for spider-gazelle

Routes

/repository

Routes to query git metadata.

GET /repository?url=[repository url]&count=[commit count: 50]

Returns the commits for a repository.

GET /repository/<file>?url=[repository url]&count=[commit count: 50]

Returns the commits for a file.

/build

Routes trigger builds and query the resulting artefacts.

POST /build/<file>?url=<repository url>&commit=<commit hash>

Triggers a build of an object with as the entrypoint
Returns…

  • 200 if compiled
  • 500 if the object failed to compile
  • 404 if entrypoint was not found

GET /build/<file>/metadata?url=<repository url>&commit=<commit hash>

Returns the metadata extracted from the built artefact.

GET /build/<file>/docs?url=<repository url>&commit=<commit hash>

Returns the docs extracted from the artefact.
This can be built independently of the artefact's compilation, so if not present, try to build the docs.

GET /build/<file>/compiled?url=<repository url>&commit=<commit hash>

  • 200 if compiled
  • 404 not compiled