Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

API URLs

Tom Wiesing edited this page Sep 26, 2017 · 6 revisions

This page lists a tree of the URLs we will have, and a detailed description for each endpoint further below.

URL structure

  • /v1 -- API version 1
    • /users -- Namespace for getting information about users.
      • GET ?tl=<expression> -- Filters the user list by the given expression
      • GET /me -- Gets information about the currently authenticated user (or a 404)
      • GET /<name> -- Single user record, by username
        • GET /image -- Returns the users' image

Search format

The search format is based on the following abstract grammar. Everything starting with // is a comment.

EXPRESSION       = BOOLEAN                           // true or false
                 | UNARY_OP                          // a unary operation (which takes one expression)
                 | BINARY_OP                         // a binary operation (which takes two expressions)
                 | BINARY_FILTER                     // a filter (which takes a field and a value)
UNARY_OP         = "not" EXPRESSION                  // inverts expression
BINARY_OP        = EXPRESSION "and" EXPRESSION       // is TRUE iff both expressions are TRUE
                 | EXPRESSION "or" EXPRESSION        // is TRUE iff at least one expression is TRUE
                 | EXPRESSION "nand" EXPRESSION      // is TRUE iff not both expressions are TRUE
                 | EXPRESSION "xor" EXPRESSION       // is TRUE iff exactly one expression is TRUE
BINARY_FILTER    = STRING "equals" STRING            // check if one field equals to a fixed value
                 | STRING "less" NUMBER              // check if one field is less than some value
                 | STRING "less or equal" NUMBER     // check if one field is less or equal than some value
                 | STRING "greater" NUMBER           // check if one field is bigger than some value
                 | STRING "greater or equal" NUMBER  // check if one field is bigger or equal than some value
                 | STRING "contains" STRING          // check if one field contains a string
                 | STRING "matches" REGEX            // check if one field matches a regular expression

JSON search syntax

(TODO)

TEXT search syntax

(TODO)

Clone this wiki locally