-
Notifications
You must be signed in to change notification settings - Fork 0
Package route
Send a GET
request to /package/:name
.
Status | Comment |
---|---|
200 OK |
|
404 Not Found |
Request | Response |
---|---|
GET /packages/abc HTTP/1.1 ... |
HTTP/1.1 200 OK ... |
GET /package/no-such-package HTTP/1.1 ... |
HTTP/1.1 404 Not Found ... |
Requires authorization. Has an ACE.
Send a DELETE
request to /packages/:name
.
Status | Comment |
---|---|
204 No Content |
Deleted successfully. |
404 Not Found |
Request | Response |
---|---|
DELETE /packages/package HTTP/1.1 Cookie: ... ... |
HTTP/1.1 204 No Content ... |
DELETE /packages/no-such-package HTTP/1.1 Cookie: ... ... |
HTTP/1.1 404 Not Found ... |
Requires authorization. Has an ACE
Send a PATCH
request to /packages/:name
. The body should contain the parts of package to update. See the package model for details.
Set the value to null
to remove a version, file, dependency, or screenshot.
Sending unexisting version, file, dependency, or screenshot keys is treated as creating a new version, file, dependency, or screenshot, respectively. Note that when creating a new version, you must provide all version fields (depends
, files
, changes
).
Status | Comment |
---|---|
204 No Content |
Package successfully updated. |
400 Bad Request |
The data is malformed. See message for more details on the error. |
404 Not Found |
Request | Response |
---|---|
PATCH /package/package HTTP/1.1 Cookie: ... ... |
HTTP/1.1 204 No Content ... |
PATCH /packages/package HTTP/1.1 Cookie: ... |
HTTP/1.1 400 Bad Request ... |
PATCH /packages/no-such-package HTTP/1.1 Cookie: ... ... |
HTTP/1.1 404 Not Found ... |
Version | Changes |
---|---|
3.1.0 |
PATCH and DELETE now check for JSON validity and package existence. |
3.0.3 |
Refactored the code of package update route a bit. |