Skip to content
maximelkin edited this page Apr 19, 2018 · 11 revisions

All prefixed with /api

  • /authentication

    • GET /local {username: string, password: string}
    • GET /test => 401 or 200
    • GET /logout
  • /user

    • GET /:username => User
    • POST / {username: string, password: string}
    • PUT / {password?: string, body?: string, email?: string}
  • /project

    • GET / {from?: number, limit?: number} => Project[]
    • GET /:projectId => Project
    • POST / {header: string, text: string} => id (number)
    • PUT /:projectId {header?: string, text?: string}
    • DELETE /:projectId
  • /placement/project/:projectId

    • POST / string[] (placement names)
    • PUT / PlacementUpdate[]
    • DELETE / number[] (placement ids)
interface PlacementUpdate {
    accept?: number     // id of participationRequest
    decline?: number[]  // ids of participationRequests
    name?: string
    id: number          // placement id
}
  • /comment
    • POST /project/:projectId {message: string, parentCommentId?: number | null} => number (id)
    • GET /project/:projectId => CommentExtended[]
    • GET /user/:username => {limit?:number,offset?: number} => Comment[]
interface CommentExtended extends Comment {
    children: CommentExtended[]
}
  • /participation
    • POST /placement/:placementId => number (id)
    • DELETE /:participationRequestId
Clone this wiki locally