Skip to content
ZEF WEB SERBER IN PFIVE
Perl CSS Perl 6 JavaScript Shell SQLPL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
public
script
templates
upstreams/ecosystem
.gitignore
README.md
bootstrap.sql
changes.sql
daemon.sh
pod2htmd.tmp
zef.template.conf

README.md

#RESTful API

##/login ###Expects

Content-Type: application/json

{
  "username": "<username>",
  "password": "<password>"
}

###Returns ####Success

{
  "success": 1,
  "newkey" : "<user token>" 
}

####Failure

{
  "failure": 1,
  "reason" : "<some reason>"
}

##/register See /login

##/push ###Expects

Content-Type: application/json

{
  "key":     "<a valid user token>",
  "majorvs": "1", /* necessary ONLY to inc major version */
  "minorvs": "1", /* necessary ONLY to inc minor version */
  "meta":    {
    "name"      : "<package's name>",
    "repository": "<a git repository>"
  }
}

###Returns ####Success

{
  "latestcommit": "<commit ID that the version corresponds to>",
  "version"     : "<version # as far as ZEF is concerned>"
}

####Failure

error

##/search ###Expects

Content-Type: application/json

{
  "query": "<search term>",
  "page" : #   /* This is an optional argument */
}

####Success

[
  { 
    "package"  : "<package name>",
    "author"   : "<author>",
    "version"  : "<ZEF version>",
    "submitted": "<date/time submitted>"
  },
  { 
    "package": "<package name>",
    "author" : "<author>",
    "version": "<ZEF version>"
  }
]

####Failure

[ ]

##/download ###Expects

Content-Type: application/json

{
  "name":    "<package name>",
  "author":  "<package author>",   /* This is an optional argument */
  "version": "<package version>",   /* This is an optional argument */
}

####Success

[
  { 
    "repo":    "<package repo>",
    "commit" : "<commit id to download to>",
    "version": "<ZEF version>",
    "author":  "<package author>"
  }
]

####Failure

[ ]
You can’t perform that action at this time.