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

Add information for creating the batch named query #224

Merged
merged 1 commit into from
Jan 15, 2025
Merged
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
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,30 @@ if you would like to view the SQL the migration will produce, you can use the fo
```bash
dotnet ef migrations script -i -o .\migrate.sql -p Repository -s API
```

### DLCS Named Query

As part of handling assets in canvas paintings, items are ingested via the DLCS. In order to track items that have been ingested, a new global named query needs to be added to the DLCS to track batches. This can be done in 2 ways, as follows:

1. POST to the named query endpoint:

**NOTE:** This is required to be done as the admin customer using the DLCS API

```
POST {{baseUrl}}/customers/1/namedQueries

{
"name": "batch-query",
"template": "batch=p1",
"global": true
}
```

2. Directly into the DLCS database

```sql
INSERT INTO "NamedQueries" ("Id", "Customer", "Name", "Global", "Template")
VALUES (gen_random_uuid(), 1, 'batch-query', true, 'batch=p1')
```

**NOTE:** the presentation API assumes the name of this named query is `batch-query` by default, so if this is changed the presentation will need an updated setting to track.
Loading