This commit is contained in:
Roger Rutishauser 2024-10-12 22:37:01 +02:00
parent bbe06ee3b5
commit 83228b0bb9

View File

@ -137,20 +137,42 @@ Physical Storage
php symfony csv:physicalobject-import /path/to/storage.csv php symfony csv:physicalobject-import /path/to/storage.csv
``` ```
## Update CSV
- Export of https://adchio2941.xyz.org/index.php/x5cp-w5q6-9z53 as CSV using the clipboard
- Adding/changing fields, like scope and content
- Import CSV using "update" and checking "skip unmatched records".
- So far, we did not have a match for the top element "Mihaiela test", and the following link tells us why: https://www.accesstomemory.org/de/docs/2.7/user-manual/import-export/csv-import/#csv-descriptions-match-criteria
### Matching criteria 1: legacyID and source_name.===
- legacyID was there in the CSV
- source_name was not. This is because `x5cp-w5q6-9z53` / Mihaiela test was not imported from an external source but originally created in AtoM.
so then the next matching criteria would be used.
### Matching criteria 2: title, repository, identifier===
- title was there in the CSV.
- repository was not in the CSV, because `x5cp-w5q6-9z53` was not bound to a repository. I added it to "Test area for import"
- identifier was not in the CSV, because it had none. I added random number `8805` to this field.
After my changes, I exported the CSV again, now with the nescessary data. Then changed "scope and content" and imported/updated as described before, and now it worked.
So you should make sure, one of the 2 matching criteria groups are given.
There is a `--roundtrip` version of the import command, which only checks for the `legacyID` to be a match. But this is only available on command line, not in the GUI.
## Regenerate Derivatives ## Regenerate Derivatives
``` ```
sudo -u www-data php symfony digitalobject:regen-derivatives sudo -u www-data php symfony digitalobject:regen-derivatives
``` ```
## create login cookie ## curl
### create login cookie and query using the API
``` ```
curl -k -c "cookie066.txt" -u "aarau:Fle8.CH" -X POST -d "email=support@docuteam.ch" -d "password=diCGi3-d13" https://066atom-cosmos.docuteam.cloud/user/login curl -k --max-time 30 --retry 50 --retry-delay 5 -c cookie_atom55555.txt -u "uuu:xxx" -X POST -d "email=support@docuteam.ch" -d "password=xxx" https://55555atom-cosmos.docuteam.cloud/user/login
```
## API
``` curl -k --max-time 30 --retry 50 --retry-delay 5 -o result.txt -b cookie_atom55555.txt -u "uuu:xxx" --get -d "sq0=_c8434040-f2aa-4b6d-bc63-453e63bf5af7" https://55555atom-cosmos.docuteam.cloud/api/informationobjects
curl -k -b "cookie066.txt" -u "aarau:Fle8.CH" --get -d "sq0=_33424c68-97c1-4be6-9676-fd29a58ee08f" https://066atom-cosmos.docuteam.cloud/api/informationobjects
``` ```