From f10bcb49d17234dc52c8b67a7b7fd1796ab6f435 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 20 Sep 2018 12:40:12 -0700 Subject: work in progress on guide (mdbook) --- guide/src/cookbook.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 guide/src/cookbook.md (limited to 'guide/src/cookbook.md') diff --git a/guide/src/cookbook.md b/guide/src/cookbook.md new file mode 100644 index 00000000..74bffe59 --- /dev/null +++ b/guide/src/cookbook.md @@ -0,0 +1,37 @@ +# Cookbook + +### Updating an Existing Entity + +1. Fetch (GET) the existing entity +2. Create (POST) a new editgroup +3. Update (PUT) the entity, with the current revision number in the `prev` edit + field, and the editgroup id set +4. Submit (POST? TBD) the editgroup for review + +### Merging Duplicate Entities + +1. Fetch (GET) both entities +2. Decide which will be the "primary" entity (the other will redirect to it) +3. Create (POST) a new editgroup +4. Update (PUT) the "primary" entity with any updated metadata merged from the + other entity (optional), and the editgroup id set +5. Update (PUT) the "other" entity with the redirect flag set to the primary's + identifier, with the current revision id (of the "other" entity) in the + `prev` field, and the editgroup id set +4. Submit (POST? TBD) the editgroup for review + +### Lookup Fulltext URLs by DOI + +1. Use release lookup endpoint (GET) with the DOI a query parameter, with + `expand=files` +2. If a release hit is found, iterate over the linked `file` entities, and + create a ranked list of URLs based on mimetype, URL "rel" type, file size, + or host domain. + +### Batch Insert New Entities (Bootstrapping) + +When bootstrapping a blank catalog, we need to insert 10s or 100s of millions +of entities as fast as possible. + +1. Create (POST) a new editgroup, with progeny information included +2. Batch create (POST) entities -- cgit v1.2.3