Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[comapeo] Add script to POST alerts #28

Open
rudokemper opened this issue Dec 11, 2024 · 0 comments · May be fixed by #60
Open

[comapeo] Add script to POST alerts #28

rudokemper opened this issue Dec 11, 2024 · 0 comments · May be fixed by #60
Assignees
Labels
connectors Connector scripts for ETL from upstream data sources feature New specs for new behavior

Comments

@rudokemper
Copy link
Member

We can create alerts like this:

curl -X POST \
  'https://my-comapeo-server.example/projects/MY_PROJECT_ID/remoteDetectionAlerts' \
  -H 'Authorization: Bearer YOUR_BEARER_TOKEN' \
  -H 'Content-Type: application/json' \
  --data '{
    "detectionDateStart": "2024-11-03T04:20:69Z",
    "detectionDateEnd": "2024-11-04T04:20:69Z",
    "sourceId": "abc123",
    "metadata": { "foo": "bar" },
    "geometry": {
      "type": "Point",
      "coordinates": [12, 34]
    }
  }'
# => HTTP 201, no response body

In doing so, we can use a future endpoint (WIP) to get an existing list of alerts stored by the server:

curl -X GET \
  'https://my-comapeo-server.example/projects/MY_PROJECT_ID/remoteDetectionAlerts' \
  -H 'Authorization: Bearer YOUR_BEARER_TOKEN' 
``` => HTTP 201, `{}` (containing alerts)

Using that list, we can determine which unique alerts to post.
@rudokemper rudokemper added the feature New specs for new behavior label Dec 11, 2024
@rudokemper rudokemper self-assigned this Dec 11, 2024
@rudokemper rudokemper changed the title [comapeo] Add Mapeo flow to POST alerts [comapeo] Add script to POST alerts Dec 11, 2024
@rudokemper rudokemper changed the title [comapeo] Add script to POST alerts [frizzle/comapeo] Add script to POST alerts Dec 11, 2024
@rudokemper rudokemper changed the title [frizzle/comapeo] Add script to POST alerts [connectors/comapeo] Add script to POST alerts Dec 16, 2024
@rudokemper rudokemper added the connectors Connector scripts for ETL from upstream data sources label Jan 3, 2025
@rudokemper rudokemper changed the title [connectors/comapeo] Add script to POST alerts [comapeo] Add script to POST alerts Jan 3, 2025
@rudokemper rudokemper linked a pull request Jan 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connectors Connector scripts for ETL from upstream data sources feature New specs for new behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant