Versions Compared

Key

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

Getting Data into Safe Places

We use Postman to get data into SafePlaces as below:

  1. Install Postman from https://www.postman.com/downloads/

  2. Install Import the SafePlaces Ingest API.postman_collection.json file attached belowto this page

  3. Once installedimported, click on SafePlaces Ingest API

    1. Click on the icon

    2. Click “Edit”

    3. Click “Variables”

    4. Set Create, and then set the ingest URL ingesturl to https://ingest.staging.safeplaces.extremesolution.com

  4. Go to https://staging.spl.extremesolution.com/trace

    1. Click “Add new record” and copy the 6 digit code

  5. In Postman, click “Access Code Valid”

    1. Change the POST url to {{ingesturl}}/access-code/valid, you can also watch the video attached to this page as an example Setting up SafePlaces Ingest API

    2. Now select the header tab “Body”

      1. You should see "accessCode": 149369”

      2. Enter the new 6 digit code overwriting 149369

      3. Click “Send”

      4. Should return TRUE

  6. In Postman, click “Content”“Consent”

    1. Change the POST url to {{ingesturl}}/consent

    2. Select the header tab “Body”

      1. You should see "accessCode": 149369, "consent": true

      2. Enter the 6 digit code as before

      3. Click “Send”

      4. Should return TRUEa 200 with an empty response body

  7. In Postman, click “Consent”“Upload”

    1. Change the POST url to {{ingesturl}}/upload

    2. Select the header tab “Body”

      1. Again enter the 6 digit code as before, request body should look something like;

      2. Click “Send”

      3. Should return 1
        Code Block
        {
            "accessCode": 149369,  
            "concernPoints" : [
              {
                "id": 30601,
                "publishDate": null,
                "caseId": 150,
                "pointId": 30601,
                "longitude": 42.21576848894619,
                "latitude": 13.925577559640354,
                "duration": 5,
                "nickname": null,
                "time": "2020-07-16T22:35:00.000Z"
              }
            ]
        }
      4. Click “Send”

      5. You should now see something like "uploadId": "fdf2b23a-d29c-489d-b79e-53c53e014383"

  8. Go back to SafePlaces browser

    1. Check data upload of this record id

Getting 14d Data into Safe Places

In order to test the boundaries of 14d worth of data you can edit the “concernPoints” to define the data you want to see in Staging https://staging.spl.extremesolution.com/publish

See test.json attached below for a larger example of data set

Code Block
{
    "accessCode": 149369,  
    "concernPoints" : [
      {
        "id": 30601,
        "publishDate": null,
        "caseId": 150,
        "pointId": 30601,
        "longitude": 42.21576848894619,
        "latitude": 13.925577559640354,
        "duration": 5,
        "nickname": null,
        "time": "2020-07-16T22:35:00.000Z"
      }
    ]
}

Attachments