USACE / instrumentation

Instrumentation project issue tracking and project planning
MIT License
5 stars 1 forks source link

API: New Endpoint for Batch Plot Configurations #37

Closed KevinJJackson closed 3 years ago

KevinJJackson commented 3 years ago

Create new endpoint and DB table for GET (all/single) / POST / PUT / DELETE batch plot configurations.

Required relationships: 1-to-1: project 1-to-many: timeseries


Example GET responses:

GET /{project_id}/plot-configurations/12345678-1234-1234-1234-123456789012:

{
  "id": "12345678-1234-1234-1234-123456789012",
  "name": "Plot Configuration 1",
  "project_id": "12345678-1234-1234-1234-123456789012",
  "timeseries_id": [
    "12345678-1234-1234-1234-123456789012",
    "12341234-1234-1234-1234-123412341234",
    "11111111-2222-3333-4444-555555555555",
  ],
  "created_date": "2021-01-29T12:00:00.000000Z",
  "updated_date": null,
  "created_by": "00000000-0000-0000-0000-000000000000",
  "updated_by": null
}

GET /{project_id}/plot-configurations:

[
  {
    "id": "12345678-1234-1234-1234-123456789012",
    "name": "Plot Configuration 1",
    "project_id": "12345678-1234-1234-1234-123456789012",
    "timeseries_id": [
      "12345678-1234-1234-1234-123456789012",
      "12341234-1234-1234-1234-123412341234",
      "11111111-2222-3333-4444-555555555555",
    ],
    "created_date": "2021-01-29T12:00:00.000000Z",
    "updated_date": null,
    "created_by": "00000000-0000-0000-0000-000000000000",
    "updated_by": null
  },
  {
    "id": "87654321-4321-4321-4321-210987654321",
    "name": "Plot Configuration 2",
    "project_id": "12345678-1234-1234-1234-123456789012",
    "timeseries_id": [
      "12345678-1234-1234-1234-123456789012",
      "12341234-1234-1234-1234-123412341234",
      "11111111-2222-3333-4444-555555555555",
    ],
    "created_date": "2021-01-29T12:00:00.000000Z",
    "updated_date": null,
    "created_by": "00000000-0000-0000-0000-000000000000",
    "updated_by": null
  }
]

cc: @brettpalmberg

KevinJJackson commented 3 years ago

@brettpalmberg any update on this?