Closed JackVCurtis closed 8 months ago
This looks good, am I adding this to the importer script..?
I don't think so, when we need to use this endpoint we can just use a simple curl request:
curl -H "x-api-user: importer" -H "x-api-key: super_secret" -X DELETE localhost:8000/api/v1/import/data/day
why do we want to drop the entire collection? Are there concerns that someone could make a request from the app to drop the collection?
We want to drop the collection because we don't have any other way to remove a number of duplicate documents that crept into staging somehow. Justin is also looking to use a slightly more prod-like data set. You can check out this thread in Slack for the details.
As to the second point, there's no way for a regular user to drop the collection. This endpoint is only accessible if you have the API key we use to import data, it's a separate authentication setup from the cookie-based auth we use for the app-facing API.
Got it. That makes sense, thanks for the explanation!
On Fri, Mar 15, 2024 at 7:55 AM Jack Curtis @.***> wrote:
why do we want to drop the entire collection? Are there concerns that someone could make a request from the app to drop the collection?
We want to drop the collection because we don't have any other way to remove a number of duplicate documents that crept into staging somehow. Justin is also looking to use a slightly more prod-like data set. You can check out this thread https://gnardog.slack.com/archives/C03KGHSSTNC/p1710424204490899 in Slack for the details.
As to the second point, there's no way for a regular user to drop the collection. This endpoint is only accessible if you have the API key we use to import data, it's a separate authentication setup from the cookie-based auth we use for the app-facing API.
— Reply to this email directly, view it on GitHub https://github.com/AMP-SCZ/dpdash/pull/686#issuecomment-1999501474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWFIOJE3QGP3FHNFQYFJ5TYYLOUHAVCNFSM6AAAAABEWRPQD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJZGUYDCNBXGQ . You are receiving this because you commented.Message ID: @.***>
I think that we want to reimport the data with the new updates that were done to both the metadata and assessmentDayData collection