/api-schema

A DSL definition of StepWeb API using JSON Schema.

api-schema

A DSL definition of StepWeb API using JSON Schema.

Person

Properties

  • start (integer) - Starting index to offset results from.
  • count (integer) - Maximum number of results to return.
  • expand (boolean) - false (default) returns summary profiles, true returns complete profiles.
  • query (object) - Definition of the query. See below for examples.

Query Examples

Basic Leaf Query

{
  "start": 0,
  "count": 10,
  "query": {
    "entity": "experience",
    "criteria": {
      "company": "My Corporation",
      "start": {
        "from": "2014-03-15T16:44:53+01:00"
      },
      "end": {
        "to": "2016-04-08T16:44:53+01:00"
      }
    }
  }
}

Basic 'Has Field' Query

{
  "start": 0,
  "count": 10,
  "query": {
    "entity": "email",
    "criteria": {
      "exists": true
    }
  }
}

Basic AND Query

{
  "start": 0,
  "count": 10,
  "query": {
    "AND": [
      {
        "entity": "experience",
        "criteria": {
          "company": "My Corporation",
          "start": {
            "from": "2014-03-15T16:44:53+01:00"
          },
          "end": {
            "to": "2016-04-08T16:44:53+01:00"
          }
        }
      },
      {
        "entity": "education",
        "criteria": {
          "establishment": "Oxford University"
        }
      }
   ]
  }
}

Basic OR Query

{
  "start": 0,
  "count": 10,
  "query": {
    "OR": [
      {
        "entity": "experience",
        "criteria": {
          "company": "My Corporation"
        }
      },
      {
        "entity": "experience",
        "criteria": {
          "company": "ACME"
        }
      }
    ]
  }
}

Nested Query

{
  "start": 0,
  "count": 10,
  "query": {
    "OR": [
      {
        "entity": "experience",
        "criteria": {
          "company": "My Corporation",
          "start": {
            "from": "2014-03-15T16:44:53+01:00"
          },
          "end": {
            "to": "2016-04-08T16:44:53+01:00"
          }
        }
      },
      {
        "AND": [
          {
            "entity": "experience",
            "criteria": {
              "company": "ACME"
            }
          },
          {
            "entity": "education",
            "criteria": {
              "establishment": "Oxford University"
            }
          }
        ]
      }
    ]
  }
}

Date Range Query

{
  "start": 0,
  "count": 10,
  "query": {
    "entity": "experience",
    "criteria": {
      "company": "My Corporation",
      "start": {
        "from": "2014-03-15T16:44:53+01:00",
        "to": "2014-09-15T16:44:53+01:00"
      },
      "end": {
        "from": "2016-01-08T16:44:53+01:00",
        "to": "2016-04-08T16:44:53+01:00"
      }
    }
  }
}