Melalogic API (1)

Decreasing the mortality rate of black patients with Melanoma by 50%.

Introduction

This is a ReST API that interacts with melalogic.com user resources. Specifically, this api

  • enables a user account to be created
  • enables a user to record their checkins

This API is documented in OpenAPI format, provided by swagger.io team.

Security

Cross-Origin Resource Sharing (CORS)

Requests sent to this api must contain an origin header value that has been approved and stored by a Melalogic Administrator.

JSON Web Token (JWT API Key)

This api must receive a jwt standard web token, as provided to you by a Melalogic Administrator. The jwt api key should be sent as a header, for example:

curl --header"Host: https://my-origin.com/" --header"Authorization: Bearer MY_JWT_API_KEY" --request GET --url https://melalogic.com/api/1/user --verbose

JwtAuth0Authorizer

Security scheme type: API Key
Header parameter name: Authorization

Get a User

get the user's record

Authorizations:

Responses

200

Success

Response Schema: application/json
Count
number
ScannedCount
number
Items
Array of objects
get /user
https://melalogic.com/api/1/user

Response samples

application/json
Copy
Expand all Collapse all
{
  • "Count": 0,
  • "ScannedCount": 0,
  • "Items":
    [
    ]
}

Create a User

create one user record

Authorizations:
Request Body schema: application/json

user email

email
string

user email

Responses

200

success

Response Schema: application/json
principalId
string
contactId
string
409

resource already exists

post /user
https://melalogic.com/api/1/user

Request samples

application/json
Copy
Expand all Collapse all
{
  • "email": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "principalId": "string",
  • "contactId": "string"
}

Update a User

update one user record

Authorizations:
Request Body schema: application/json

user email

email
string

user email

Responses

200

success

Response Schema: application/json
principalId
string
contactId
string
put /user
https://melalogic.com/api/1/user

Request samples

application/json
Copy
Expand all Collapse all
{
  • "email": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "principalId": "string",
  • "contactId": "string"
}

Delete a User

delete one user record

Authorizations:

Responses

204

success

Response Schema: application/json
principalId
string
id
string
delete /user
https://melalogic.com/api/1/user

Response samples

application/json
Copy
Expand all Collapse all
{
  • "principalId": "string",
  • "id": "string"
}

Get All Checkins

get all user checkin records

Authorizations:
query Parameters
limit
number

The max number of items to return.

Responses

200

success

Response Schema: application/json
Count
number
ScannedCount
number
Items
Array of objects
get /checkins
https://melalogic.com/api/1/checkins

Response samples

application/json
Copy
Expand all Collapse all
{
  • "Count": 0,
  • "ScannedCount": 0,
  • "Items":
    [
    ]
}

Create a Checkin

create one checkin record

Authorizations:
Request Body schema: application/json

checkin id

id
string

checkin id

timestamp
number

checkin timestamp

streak
number

how many months in a row a user checked in

Responses

200

success

Response Schema: application/json
principalId
string
contactId
string
post /checkins
https://melalogic.com/api/1/checkins

Request samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "timestamp": 0,
  • "streak": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "principalId": "string",
  • "contactId": "string"
}

Update a Checkin

update one checkin record

Authorizations:
Request Body schema: application/json

checkin object

id
string

checkin id

timestamp
number

checkin timestamp

streak
number

how many months in a row a user checked in

Responses

200

success

Response Schema: application/json
principalId
string
contactId
string
404

resource not found

put /checkins
https://melalogic.com/api/1/checkins

Request samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "timestamp": 0,
  • "streak": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "principalId": "string",
  • "contactId": "string"
}

Delete a Checkin

delete one checkin record

Authorizations:
Request Body schema: application/json

checkin id

id
string

Responses

204

success

delete /checkins
https://melalogic.com/api/1/checkins

Request samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string"
}