JSONRPC

This URL implements the JSON-RPC 2.0 Specification.

To call one of the methods below, send a POST request to this URL containing JSON formatted according to the specification.

Test Call

Enter JSON below and click Send to call a RPC method





Method Documentation


Methods

  • greet
    renders a greeting
auth
package

Error Codes

code name meaning
0 ok No error (not used)
1 no_user No such user on the system
2 password_failed Password does not match
3 auth_failed Auth token was not valid
4 no_access You don't have access to this resource
5 no_organization No such organization
6 no_package No such package
7 no_release No such package version
8 lib_invalid Library data is invalid
9 organization_create_error Unable to get/create organization
10 version_invalid The version spec was not in the correct format

greet renders a greeting

This method will greet you, using the name of your choice. Use this method to test access.

Parameters
name description type required? default
who This parameter should be the name of the person you wish to greet. If not given, the name will default to "World" string No null

Top


auth.get-token get an authorization token

Authorize a user with a username + password. Returns a dictionary containing a value called token, which should be given as a parameter to methods that require authentication.

Parameters
name description type required? default
password User's password string Yes
username User's username string Yes

Top


package.get-download-info get download information

Parameters
name description type required? default
package Library long name string Yes
version Library version string Yes

Top


package.get-upload-info get upload URL

Get a URL to upload a new package or docs.

No parameters

Top


package.list-releases list releases

Lists all releases for a package

Parameters
name description type required? default
package Package name (.e.g moya.package) string Yes

Top


package.register register a new package

Create a new packages

Parameters
name description type required? default
auth Auth code anything Yes
lib Object containing values from the [lib] section of lib.ini object Yes

Top


package.select select a release

Select a release that matches a version specification.

Returns a dict containing version, notes, and download (url of release).

If no version matches the specification, version will be null.

Parameters
name description type required? default
package Package and version spec (e.g. moya.package==0.5.1, moya.package>= 1.0.0) string Yes

Top

moya.jsonrpc 1.0.0