Skip to main content

Source code file content

Revision: 2911

15824872 SUNBT7206345 pkg update on machine with a NGZ fails
» Project Revision History

» Checkout URL

pkg-gate / doc / rest.txt

Size: 909 bytes, 1 line
Use of REST

We use REST over HTTP as the primary networking API between client and
server.  That choice means that

- the client can be reimplemented,

- the server can be reimplemented, and

- decorations on a transaction, like authentication, encryption, and
  redirection, can be handled using the enormous technology set around

The first two are true of any well-defined protocol, but we benefit in
this case from the wide availability of HTTP client and server
implementation starting points.

Installer API:

GET /catalog
GET /version/pkg_name
GET /depend/pkg_name
GET /data/pkg_name[/from[/to]]

Packager API:

POST /trans/pkg_name
	Returning a transaction ID
POST /add/trans_id/type
	Plus metadata in submitted headers and contents as file body.
GET /summary/trans_id
POST /meta/trans_id/require
	Dependency metadata in submitted headers.
POST /commit/trans_id
	Returning package URL.

Please Confirm