You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2.0 KiB

API

CoviDok API accepts and sends JSON objects. The basic response structure is composed of three fields, as seen below;

{ "version" : "1" "status": "OK/ERR" "response" : "Description/data" }

The "response" field contains the actual content of the answer, while "status" indicates if the request was successful (value is either ERR or OK).

Accepted calls

Auth

GET /api/Auth

Login authentication. Requires account login info, returns a session ID and the ientity of the logged in entity.

Type JSON
Request {
"email" : string,
"password": string
}
Response {
"id" : SessionID,
"firstName": x.Firstname,
"lastName": x.Lastname,
"role": "Doc/Ast/Par"
}

POST /api/Auth

Registration call.

Type JSON
Request {
"firstName": string,
"lastName": string,
"email": string,
"password": string,
"role": "Doc/Ast/Par"
}
Response None

Doc

GET /api/Doc

Lists all registered doctors in the system. Might be filterable in the future.

Type JSON
Request {
"id": sessionID
}
Response {[[doc.Firstname, doc.Lastname, doc.Id], ...]}

GET /api/Doc/{id}/assistants

Lists assistants for a specific doctor.

Type JSON
Request {
"id": sessionID
}
Response {[
"firstName": Assistant.Firstname,
"lastName" : Assistant.Lastname,
"id" : Assistant.Id], ...
}

GET /api/Doc/{id}/children

Lists childern with onging or finished cases assigned to a doctor.

Type JSON
Request {
"id": sessionID
}
Response {[
"firstName": Child.Firstname,
"lastName" : Child.Lastname,
"id" : Child.Id], ...
}

Parent

POST /api/Parent/child

Adds a child to a parent. A parent can only add children to its own account (Enforced on server side).

Type JSON
Request {
"id": sessionID,
"firstName": string,
"lastName": string
}
Response {
"ChildID": Child.Id
}