team-genny / genny

0 stars 1 forks source link

Add API Endpoint to get previously generated data (depends on #6) #7

Closed fergcb closed 4 months ago

fergcb commented 4 months ago

Depends on #6

GET /api/data/{idOrSlug}

Request Body

N/A

Responses

404 Not Found

If the ID or slug provided doesn't correspond to a previously generated dataset.

200 OK

{
  "_id": "<mongodb ObjectId>"
  "slug": "<slug for data (if present)>"
  "schema": {
    "_id": "<schema mongodb ObjectId>"
    "slug": "<schema slug>"
  },
  "data": [
    // List of data
  ]
}