-
Notifications
You must be signed in to change notification settings - Fork 0
Packages route
The /packages
route supports the following request methods: GET
, POST
.
Send the GET
request to /packages
. The query parameters are:
Name | Type | Comment |
---|---|---|
offset |
Integer, optional | Zero-based offset from the beginning of the list. |
See the package search page for additional parameters.
Status | Comment |
---|---|
200 OK |
Request | Response |
---|---|
GET /packages HTTP/1.1 ... |
HTTP/1.1 200 OK ... |
GET /packages?offset=120 HTTP/1.1 ... |
HTTP/1.1 200 OK ... |
Requires authorization. Has an ACE.
Send a POST
request to /packages
.
{"name": "The name of the package",
"description": "The description of the package",
"short_description": "The short (up to 140 characters, will be truncated if a longer string sent) description of the package.",
"authors": [
"Program author 1",
"Program author 2"
],
"owners": [
"user-1",
"user-2"
],
"license": "Package license, e.g., GPL v3",
"tags": [
"tag 1",
"tag 2",
"tag 3"
],
"versions": {
"1.0.0": {
"files": {
"http://example.com/file1": {
"path": "/usr/bin/program.lua"
},
"http://example.com/file2": {
"path": "/usr/lib/libprogram.lua"
},
...
},
"depends": {
"dependency-1": {"type": "recommended", "version": ">2,<2.3.2"},
...
}
},
...
},
"screenshots": {
"http://example.com/image-1.png": "Description of the image",
...
}
}
See the package model page for more details.
Status | Comment |
---|---|
201 Created |
Package created. |
400 Bad Request |
Bad package data. |
409 Conflict |
Name conflict: package with the given name already exists. |
Request | Response |
---|---|
POST /packages HTTP/1.1 Cookie: ... ... |
HTTP/1.1 201 Created ... |
Version | Changes |
---|---|
3.3.0 |
Deprecated dir and name . Added path . |
3.1.0 |
Now checks for JSON validity. |
3.0.0 |
Renamed data.data to data.list (Packages:GET ). |