Skip to content

ROUTES [PLEASE READ] #4

@dli357

Description

@dli357

Current available API endpoints:

Authentication and Sponsor Login

Endpoint Description Request Type Input Output
/user Add a user PUT {email: <string>, password: <string>, sponsorName: <string>, apiKey: <string>} {status: <int>, message: <string>}
/user/login Login POST {email: <string>, password: <string>} {jwt: <string>, sponsor_name: <string>, logo_url: <string>}
/user/renew Renew JWT GET Valid JWT in header {jwt: <string>}

Participant Information

Endpoint Description Request Type Input Output
/participant/tag Sets a participant tag POST {registration_id: <string>, tag: <string>} with valid JWT {tags: <string[]>}
/participant/untag Removes a participant tag POST {registration_id: <string>, tag: <string>} with valid JWT {tags: <string[]>}
/participant/all Gets all participants GET valid JWT {participants: <Participant[]>}
/participant/search Gets the participant objects from a postgres full-text search POST {search: <string>} with valid JWT {participants: <Participant[]>}
/participant/search/byids Gets the participant objects from the database by ID POST {registration_ids: <string[]>} with valid JWT {participants: <Participant[]>}
/participant/search/bytag Gets the participant objects from the database by tag POST {tag: <string>} with valid JWT {participants: <Participant[]>}
/participant/confirm Sets the opted-in status for a participant POST {registration_id: <string>, opt_in: <boolean>, apiKey: <string>} with either valid JWT or valid API Key {status: <int>, message: <status>}
/participant/checkin Sends the participant's sponsor tag to CheckIn (should be only invoked upon NFC) POST {registration_id: <string>} with valid JWT {status: <int>, message: <status>}

Resume Operations (Download, Bulk download, Status)

Endpoint Description Request Type Input Output
/resume Get a temporary signed URL to download a resume POST {registration_id: <string>} with valid JWT {resumeUrl: <string>}
/resume/bulk/prepare Prepare a zip file containing all resumes specified POST {registration_ids: <string[]>} {downloadId: <string>}
/resume/bulk/status Get the status of a downloading zip file POST {downloadId: <string>} {zipStatus: <ENUM("PREPARING", "READY", "FAILED", "EXPIRED")>, zipUrl: <string>}

Postgres Table Definitions:

participant: {
  id SERIAL PRIMARY KEY,
  registration_id CHAR(50) NOT NULL,
  resume TEXT NOT NULL,
  blob JSON NOT NULL,
  tags JSONB NOT NULL,
  opted_in BOOLEAN
}
sponsor: {
  name text PRIMARY KEY,
  logo_url text NOT NULL
}
user: {
  id SERIAL PRIMARY KEY,
  email TEXT UNIQUE NOT NULL,
  password TEXT NOT NULL,
  sponsor_name TEXT REFERENCES sponsor(name)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions