ProjectLockdown
ProjectLockdown copied to clipboard
[PROD] Define the API for the Back End

Problem
In order to implement API v2.0 we need to first define the API Endpoints we'll need.
Objectives
Define and document the API Endpoints that we'll need for:
- MAP
- Public API access
Proposed solution
MAP
- [ ] Environments
Public API
- [ ] Territories
- [ ] DataSetLayers
- [ ] Origins
- [ ] Sources
- [ ] DataSetEntries
Note: Some of the above may be combined in one Endpoint.
Extra information
-
Must have -- Open API v3.0 format -- Use Stoplight to create the models
-
Should have -- Use Global Param and Responses definitions whenever possible.
-
Could have -- Nil
-
Won't have -- Nil
Resources
Usage documentation
https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json
Technical documentation
https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json
Figma sketches https://www.figma.com/file/8hZMv4ks9lrrl1K0uGfEKx/%5BPROD%5D-DataSet-Layers-(DSL)
Data Lifecycle: https://www.figma.com/file/8hZMv4ks9lrrl1K0uGfEKx/PROD-DataSet-Layers-DSL?node-id=262%3A4
Tests
Related Issues
MAP Environments https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json/paths/~1Environments~1%7BDSLUID%7D~1%7BModule%7D~1%7BEnvironmentUID%7D/get
Public API DataSetLayers https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json/paths/~1DataSetLayers/get
DataSetEntries https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json/paths/~1DataSetEntries/get
Territories https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json/paths/~1Territories~1%7BPLDCode%7D~1%7BDepth%7D/get
Origins https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json/paths/~1Origins/get
Sources https://theiofoundation.stoplight.io/docs/projectlockdown/API/Reference/Project-Lockdown.v1.json/paths/~1Sources/get
@ColisaNo195 @SalocinDotTEN Have you distributed who takes what?
each "object" created in mongodb comes with a unique ObjectId: https://docs.mongodb.com/manual/reference/method/ObjectId/
this unique value is referenced by _id field of the object, and should be documented to be used as the UID for each model.
for the endpoint queries, this _id value will be the default choice for use in query strings
for any case where a sequential 1,2,3.. id should be used, that should be clearly documented
@ColisaNo195 @SalocinDotTEN Have you distributed who takes what?
Yes, sort of. I deal with the endpoints starting with "Data..." and she deals with the other 3.
Agree on the distribution.
In the sample JSON generated by Stoplight, $ref is expanded into an entire object. Can anyone suggest how should references look like in sample JSON? So that for any object documented as $ref, we can replace the object in sample JSON with proper reference.
Hi, the ambiguous errors encountered in Stoplight. Have already resolved a couple ones on the branch.
Project-Lockdown.v1.json issues in Stoplight.
API/api.yaml errors in Stoplight.
DEI/api.yaml errors in Stoplight.