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

feat(filemanager): update ingest id #793

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions lib/workload/stateless/stacks/filemanager/docs/API_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,25 @@ curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/js
"https://file.dev.umccr.org/api/v1/s3?key=*202405212aecb782*" | jq
```

In addition to updating attributes, the PATCH request can also be used to update the `ingestId` for records with a null
`ingestId`. For example, update the `ingestId` on a single record:

```sh
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
--data '{ "ingestId": [ { "op": "add", "path": "/", "value": "00000000-0000-0000-0000-000000000000" } ] }' \
"https://file.dev.umccr.org/api/v1/s3/0190465f-68fa-76e4-9c36-12bdf1a1571d" | jq
```

Or, update the `ingestId` for multiple records:

```sh
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
--data '{ "ingestId": [ { "op": "add", "path": "/", "value": "00000000-0000-0000-0000-000000000000" } ] }' \
"https://file.dev.umccr.org/api/v1/s3?key=*202405212aecb782*" | jq
```

Note the extra `ingestId` key in the JSON body. The operation must be `add`, and the path must be `/`.

## Count objects

There is an API route which counts the total number of records in the database, which supports
Expand Down
Loading
Loading