Skip to content

Swagger

Here are the swager pages for each environment:

https://api-staging.one-creation.com/ https://api.one-creation.com/
Staging User Management Live User Management
Staging Consent Broker Live Consent Broker
Staging Policy Management Live Policy Management
Staging Encryption Live Encryption

Postman Examples

The following are example Postman collections with pre-made API requests as well as test data that are used for each collection. These example datasets and policies are automatically created when you register and logs into the sandbox environment, where you can check out how they look like in the GUI. To use a collection:

  1. Download the JSON file
  2. Import the JSON file into your Postman
  3. Set the values of your test users and data under Variables
  4. Start running the endpoints!

Example 1 - Share partial PostgreSQL data with organization users

In this example, a data custodian shares partial data from a PostgreSQL table with all users in the same organization. Any user from the data custodian's organization may make a request for data and will only receive the authorized partial data. The workflow of this collection is as follows:

  1. Data custodian logs into the platform and receives an authentication token
  2. Data custodian creates a data source from "creditcard_transactions" table in a PostgreSQL database
  3. Data custodian creates a policy that allows its organization to see partial data from the data source
  4. Data custodian can download the full set of data
  5. Data custodian invites a user (data recipient) into his/her organization
  6. The data recipient registers and logs in
  7. The data recipient subscribes to the policy
  8. The data recipient can download partial data

Example 2 - Share PDF document with organization users for 1 hour

In this example, a data custodian shares a PDF document with all users in the same organization for 1 hour. Any user from the data custodian's organization may make a request for data within 1 hour. The workflow of this collection is as follows:

  1. Data custodian logs into the platform and receives an authentication token
  2. Data custodian creates a data source by manually uploading the "OC One Pager" pdf document
  3. Data custodian creates a policy that allows its organization to see the document for 1 hour
  4. Data custodian can download the PDF document at any time
  5. Data custodian invites a user (data recipient) into his/her organization
  6. The data recipient registers and logs in
  7. The data recipient subscribes to the policy
  8. The data recipient can only view or download the PDF document within 1 hour period from the subscription time

Example 3 - Share partial excel sheet data from AWS S3 with organization users

In this example, data custodian shares partial data from a Excel file in AWS S3 bucket with any users in the same organization. Any users from the data custodian's organization may make a request for data and will only receive the authorized partial data. The workflow of this collection is as follows:

  1. Data custodian logs into the platform and receives an authentication token
  2. Data custodian creates a data source from "citizen_data" excel sheet in a AWS S3 bucket
  3. Data custodian creates a policy that allows its organization to see partial data from the data source
  4. Data custodian can download the full set of data
  5. Data custodian invites a user (data recipient) into his/her organization
  6. The data recipient registers and logs in
  7. The data recipient subscribes to the policy
  8. The data recipient can download partial data

In this example, data custodian already collected a list of data owner's bank transaction data (SampleDataOwnersData.xlsx in the zip file). Data custodian publishes a consent campaign to the list of all data owners in the sample file to request for consent in order to use their data.

Setup

  1. Download and unzip the Consent.zip file
  2. Open the SampleDataOwnersData.xlsx and put data owner's email address in the EMAIL column and save it (you can put your own email address here to receive the consent campaign as a data owner)
  3. Import the json file into your postman
  4. In postman, go to CreateDS POST request, select the SampleDataOwnersData.xlsx as "file"
  5. Enter the values of the variables in the collection

Workflow

  1. Data custodian logs into the platform and receives an authentication token
  2. Data custodian creates a data source by uploading the "SampleDataOwnersData" Excel sheet
  3. Data custodian creates a consent campaign which requests consent from the data owners to use the data internally by any users in the organization for 1 hour. Any data owner who consents will receive rewards
  4. Data custodian publishes the campaign
  5. Data owners receive the campaign by email and accept/declines the consent request
  6. Data custodian can download a consent status report to check on data owners' consent status

If you encounter any errors or need assistance don't hesitate to reach out to One Creation Support Team


Last update: April 11, 2024