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:
- Download the JSON file
- Import the JSON file into your Postman
- Set the values of your test users and data under Variables
- 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:
- Data custodian logs into the platform and receives an authentication token
- Data custodian creates a data source from "creditcard_transactions" table in a PostgreSQL database
- Data custodian creates a policy that allows its organization to see partial data from the data source
- Data custodian can download the full set of data
- Data custodian invites a user (data recipient) into his/her organization
- The data recipient registers and logs in
- The data recipient subscribes to the policy
- 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:
- Data custodian logs into the platform and receives an authentication token
- Data custodian creates a data source by manually uploading the "OC One Pager" pdf document
- Data custodian creates a policy that allows its organization to see the document for 1 hour
- Data custodian can download the PDF document at any time
- Data custodian invites a user (data recipient) into his/her organization
- The data recipient registers and logs in
- The data recipient subscribes to the policy
- 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:
- Data custodian logs into the platform and receives an authentication token
- Data custodian creates a data source from "citizen_data" excel sheet in a AWS S3 bucket
- Data custodian creates a policy that allows its organization to see partial data from the data source
- Data custodian can download the full set of data
- Data custodian invites a user (data recipient) into his/her organization
- The data recipient registers and logs in
- The data recipient subscribes to the policy
- The data recipient can download partial data
Example 4 - Publish a consent campaign to collect data owners' consent to use 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
- Download and unzip the Consent.zip file
- 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)
- Import the json file into your postman
- In postman, go to CreateDS POST request, select the SampleDataOwnersData.xlsx as "file"
- Enter the values of the variables in the collection
Workflow
- Data custodian logs into the platform and receives an authentication token
- Data custodian creates a data source by uploading the "SampleDataOwnersData" Excel sheet
- 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
- Data custodian publishes the campaign
- Data owners receive the campaign by email and accept/declines the consent request
- 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