Debian New Member - API documentation

Authentication

If you are using a browser Debian SSO authentication works as usual. If you are using a script and public access is not enough for you, you can use API keys. For example:

curl -H "Api-Key: YourAPIKeyValue" /api/status/

/api/people/

Lists people known to the system.

GET parameters can be used to filter results:

keyvalue
cnFirst name
mnMiddle name
snLast name
emailE-Mail
uidDebian account name
fprOpenPGP key fingerprint
statusStatus in the project (as a tag like 'dd_u' or 'dm')
fd_commentFD comments (ignored unless authenticated as FD member or DAM)

All matches are case insensitive full string matches, except for 'status' which matches exactly, and 'fpr' which matches case insensitively at the end of the fingerprint.

For cn, mn, sn, email and uid, you can use /value/ to match with a case insensitive regular expression.

Results will only contain an 'email' field if the request is made by authenticated people.

Example:

$ curl https://nm.debian.org/api/people?cn=/nric/
{
 "r": [
  {
   "status": "dd_u", 
   "uid": "gareuselesinge", 
   "created": "1136678400", 
   "url": "/public/person/gareuselesinge", 
   "mn": null, 
   "sn": "Tassi", 
   "fpr": "60D04388E3853643807B9507EE491C3E0123F2F2", 
   "status_changed": "1136678400", 
   "fullname": "Enrico Tassi", 
   "cn": "Enrico"
  }, 
  {
   "status": "dd_u", 
   "uid": "enrico", 
   "created": "1003968000", 
   "url": "/public/person/enrico", 
   "mn": null, 
   "sn": "Zini", 
   "fpr": "66B4DFB68CB24EBBD8650BC4F4B4B0CC797EBFAB", 
   "status_changed": "1003968000", 
   "fullname": "Enrico Zini", 
   "cn": "Enrico"
  }
 ]
}

/api/status/

Query the status of one, many or all people in the database

GET parameters can be used to control the results:

Auth requiredkeyvalue
yesstatus Get a list of all the people with the given status. You can use a comma-separated list of statuses, like dd_nu,dd_u.
noperson Get the status of the person with the given SSO username. You can use a comma-separated list of SSO usernames.

If no parameter is specified, it returns a list of all known people. This requires authentication.

Alternatively, you can POST a JSON list of SSO usernames, and get a reply with the status of those people. This does not require authentication.

Example:

$ curl https://nm.debian.org/api/status --data '["enrico@debian.org","example-guest@users.alioth.debian.org"]'
{
 "people": {
  "enrico@debian.org": {
   "status": "dd_u", 
   "is_am": true
  },
  "example-guest@users.alioth.debian.org": {
   "status": "dm", 
  }
 }
}