Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code

Description

200

OK

application/json

  • Example Value

Code Block
languagejson
{
  "cases": [
    {
      "caseId": 12,
      "state": "unpublished",
      "externalId": "an_external_id",
      "updatedAt": "2020-05-21T18:25:43.511Z",
      "expiresAt": "2020-05-30T18:25:43.511Z"
    },
    {
      "caseId": 13,
      "state": "staging",
      "externalId": "an_external_id",
      "updatedAt": "2020-05-21T18:25:43.511Z",
      "expiresAt": "2020-05-30T18:25:43.511Z"
    },
    {
      "caseId": 14,
      "state": "published",
      "externalId": "an_external_id",
      "updatedAt": "2020-05-21T18:25:43.511Z",
      "expiresAt": "2020-05-30T18:25:43.511Z"
    }
  ]
}

400

Invalid request

403

Lacks sufficient authority for operation

500

Internal Server error

...

Status
colourGreen
title

...

IMPLEMENTED:
POST /organization/case

Creates a new case, and associates it with the organization of logged in user.

...

No parameters

Request body

No prametersparameters

Responses

Code

Description

200

Created

application/json

  • Example Value

Code Block
languagejson
{
  "caseId": 1,
  "state": "unpublished",
  "externalId": "an_external_id",
  "expiresAt": "2020-05-30T18:25:43.511Z",
  "updatedAt": "2020-05-21T18:25:43.511Z",
}

400

Invalid request

403

Lacks sufficient authority for operation

500

Internal Server error

...

Status
colourGreen
title

...

IMPLEMENTED:
PUT /case

Updates a case (currently only supports updating of case’s extern id)/

...

Code

Description

200

Created

application/json

  • Example Value

Code Block
languagejson
{
  "caseId": 23,
  "state": "unpublished",
  "externalId": "an_external_id",
  "expiresAt": "2020-05-30T18:25:43.511Z",
  "updatedAt": "2020-05-21T18:25:43.511Z",
}

400

Invalid request

403

Lacks sufficient authority for operation

500

Internal Server error

...

Status
colourGreen
titleIMPLEMENTED:
DELETE /organization/case

Delete case record

See SPL UI Protype (Figma)

...

Code

Description

200

Return points of concern associated with the case.

application/json

  • Example Value

Code Block
languagejson
{
  "concernPoints": [
    {
      "pointId": 232,
      "longitude": 14.91328448,
      "latitude": 41.24060321,
      "time": "2020-05-30T18:25:43.511Z"
      "duration": 5
    }
  ]
}

400

Invalid request

403

Lacks sufficient authority for operation

500

Internal Server error

...

Code

Description

200

Returns the points of concern now associated with the case.

application/json

  • Example Value

Code Block
languagejson
{
  "concernPoints": [
    {
      "pointId": 232,
      "longitude": 14.91328448,
      "latitude": 41.24060321,
      "time": "2020-05-30T18:25:43.511Z",
      "duration": 5
    }
  ]
}

202

Upload In Progress

400

Invalid request

401

Unauthorized Client

403

Invalid Access Code

451

Consent Not Granted

500

Internal Server error

...

Code Block
{
      "caseId": 12,
      "point": {
        "longitude": 14.91328448,
        "latitude": 41.24060321,
        "time": "2020-05-30T18:25:43.511Z",
        "duration": 5
      }
}

Responses

Code

Description

200

Returns the created point of concern

application/json

  • Example Value

Code Block
languagejson
{
  concernPoint: {
    pointId: 280,
    longitude: 14.91328448,
    latitude: 41.24060321,
    time: '2020-05-01T18:25:43.511Z',
    duration: 5
  }
}

400

Invalid request

403

Lacks sufficient authority for operation

500

Internal Server error

...

Status
colourGreen
title

...

Implemented:
POST /case/consent-to-publishing

Captures user consent to having their data published in the aggregated anonymized JSON file that is available to public.

...

Code

Description

200

Code Block
languagejson
{
  cases: {
      {
      "caseId": 14,
      "updatedAt": "2020-05-21T18:25:43.511Z",
      "state": "published",
      "externalId": "an_external_id",
      "expiresAt": "2020-05-30T18:25:43.511Z"
    },
    {
      "caseId": 15,
      "updatedAt": "2020-05-21T18:25:43.511Z",
      "externalId": "an_external_id",
      "state": "published",
      "expiresAt": "2020-06-30T18:25:43.511Z"
    },
    {
      "caseId": 16,
      "updatedAt": "2020-05-21T18:25:43.511Z",
      "state": "published",
      "externalId": "an_external_id",
      "expiresAt": "2020-07-30T18:25:43.511Z"
    }
  }
}

400

Invalid request

403

Lacks sufficient authority for operation

500

Server Error

...

Status
colourGreen
titleIMPLEMENTED:
PUT /case/point

Updates an existing point of concern

...

Code Block
{
      "pointId" : 123,
      "longitude": 12.91328448,
      "latitude": 39.24060321,
      "time": "2020-05-21T18:25:43.511Z",
      "duration": 5
}

Responses

Code

Description

200

Point was updated

application/json

  • Example Value

Code Block
languagejson
{
  "point": {
    "pointId": 123,
    "longitude": 12.91328448,
    "latitude": 39.24060321,
    "time": "2020-05-21T18:25:43.511Z",
    "duration": 5
  }
}

400

Invalid request

403

Lacks sufficient authority for operation

500

Server Error

...

Status
colourGreen
titleIMPLEMENTED:
DELETE /case/point

Deletes the point of concern having the ID corresponding with the pointID param.

...