ProjectLockdown icon indicating copy to clipboard operation
ProjectLockdown copied to clipboard

[PROD] Define the API for the Back End

Open daphnecys opened this issue 5 years ago • 6 comments

logo

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

daphnecys avatar Oct 02 '20 01:10 daphnecys

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

JFQueralt avatar Jan 16 '21 06:01 JFQueralt

@ColisaNo195 @SalocinDotTEN Have you distributed who takes what?

JFQueralt avatar Jan 16 '21 12:01 JFQueralt

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

jeff-knurek avatar Jan 16 '21 14:01 jeff-knurek

@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.

SalocinDotTEN avatar Jan 20 '21 01:01 SalocinDotTEN

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.

ColisaNo195 avatar Jan 23 '21 16:01 ColisaNo195

Hi, the ambiguous errors encountered in Stoplight. Have already resolved a couple ones on the branch.

image.png Project-Lockdown.v1.json issues in Stoplight.

image.png API/api.yaml errors in Stoplight.

image.png DEI/api.yaml errors in Stoplight.

SalocinDotTEN avatar Feb 22 '21 14:02 SalocinDotTEN