Concepts

Search

Find registrations with a small query language, and page through the results.

Registrations can be searched with GET/v1/registrations/search. It is the only search of v1: events, calls for papers and papers are listed, not searched.

This search looks for a text in the names, e-mail addresses and ids of the registrations of one event:

Request

curl

curl -G https://api.masterconf.com/v1/registrations/search \
  -H "Authorization: Bearer mcf_your_key" \
  --data-urlencode "query=event:'EVT-5a1f0c2e-3b7d-4e91-9c2a-1d6e8f4b7a30' AND text~'lovelace'"

JavaScript

const params = new URLSearchParams({
  "query": "event:'EVT-5a1f0c2e-3b7d-4e91-9c2a-1d6e8f4b7a30' AND text~'lovelace'",
});

const res = await fetch(`https://api.masterconf.com/v1/registrations/search?${params}`, {
  headers: { Authorization: "Bearer mcf_your_key" },
});
const data = await res.json();

Python

import requests

res = requests.get(
    "https://api.masterconf.com/v1/registrations/search",
    params={"query": "event:'EVT-5a1f0c2e-3b7d-4e91-9c2a-1d6e8f4b7a30' AND text~'lovelace'"},
    headers={"Authorization": "Bearer mcf_your_key"},
)
data = res.json()

The query language

A query is one or more clauses joined by AND (uppercase, with a space on each side).

  • field:'value' matches when the field equals the value.
  • field~'value' matches when the field contains the value, case-insensitive. The value needs at least 3 characters other than spaces, at most 200, and may not contain %, _ or \.

A value is always between single quotes. Write a quote inside a value as \': text~'o\'brien'.

Each field appears at most once. OR, comparisons and fields not listed below answer 400 search_query_invalid, and the message gives the position of the problem.

Fields

event: equalsrequired
The event whose registrations are searched (its id). Required.
text~ containsoptional
Contains this text, case-insensitive: matches the registration's id, the first name, the last name and the e-mail address only.
status: equalsoptional
Equals this status of a registration (require_admin_validation, validated, canceled, rejected).
role: equalsoptional
Equals this role of a participant (attendee, applicant, reviewer, committee, exhibitor, sponsor, partner, guest).

The event clause is required: a search always runs within one event.

Results

A search answers a search_result object:

Response
{
  "object": "search_result",
  "url": "/v1/registrations/search",
  "has_more": true,
  "next_page": "eyJjIjoxNzk1NTIxNjAwLCJpIjoiU1VCLThjM2UyYTcxIiwicSI6IjNmOWEifQ",
  "data": [
    {
      "id": "SUB-8c3e2a71-0f4b-4d6a-b5e9-27c1d9a4e612",
      "object": "registration",
      "event": "EVT-5a1f0c2e-3b7d-4e91-9c2a-1d6e8f4b7a30",
      "status": "validated",
      "role": "attendee",
      "first_name": "Ada",
      "last_name": "Lovelace",
      "email": "ada.lovelace@example.com",
      "ticket": {
        "name": "Full pass"
      },
      "checkin": {
        "checked_in": true,
        "last_checked_in_at": 1810119600
      },
      "created": 1795521600,
      "updated": 1810119600
    }
  ]
}

Results come newest first, like lists.

The next page

Send the next_page of the answer as page, with the same query:

Request

curl

curl -G https://api.masterconf.com/v1/registrations/search \
  -H "Authorization: Bearer mcf_your_key" \
  --data-urlencode "query=event:'EVT-5a1f0c2e-3b7d-4e91-9c2a-1d6e8f4b7a30' AND text~'lovelace'" \
  --data-urlencode "page=eyJjIjoxNzk1NTIxNjAwLCJpIjoiU1VCLThjM2UyYTcxIiwicSI6IjNmOWEifQ"

JavaScript

const params = new URLSearchParams({
  "query": "event:'EVT-5a1f0c2e-3b7d-4e91-9c2a-1d6e8f4b7a30' AND text~'lovelace'",
  "page": "eyJjIjoxNzk1NTIxNjAwLCJpIjoiU1VCLThjM2UyYTcxIiwicSI6IjNmOWEifQ",
});

const res = await fetch(`https://api.masterconf.com/v1/registrations/search?${params}`, {
  headers: { Authorization: "Bearer mcf_your_key" },
});
const data = await res.json();

Python

import requests

res = requests.get(
    "https://api.masterconf.com/v1/registrations/search",
    params={"query": "event:'EVT-5a1f0c2e-3b7d-4e91-9c2a-1d6e8f4b7a30' AND text~'lovelace'", "page": "eyJjIjoxNzk1NTIxNjAwLCJpIjoiU1VCLThjM2UyYTcxIiwicSI6IjNmOWEifQ"},
    headers={"Authorization": "Bearer mcf_your_key"},
)
data = res.json()

next_page is null on the last page. It is opaque: never build or read it yourself. A page sent with another query answers parameter_invalid.

limit, expand[]=data.event and include[]=total_count work as in lists. See Pagination and Expanding responses.

A search of events or papers would reach data the API never returns, such as reviewers or authors’ e-mail addresses. It will only come with a filter limited to public fields. See Data left out.