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

update hierarchical IIIF collection creation to use PUT and POST #75

Open
1 task
JackLewis-digirati opened this issue Oct 11, 2024 · 0 comments
Open
1 task

Comments

@JackLewis-digirati
Copy link
Collaborator

JackLewis-digirati commented Oct 11, 2024

Currently, collections work like the following:

POST /collection1/collectionChild
{
  "@context":  "standard iiif context",
   "(my vanilla collection)"
}

but it needs to work like this on the hierarchical URL:

/// slug is explicitly provided but requires non-standard property
// TODO - Disallow this? Only vanilla IIIF on hierarchical URLs?
POST /collection1/
{
  "@context":  [
        "standard iiif context",
        "dlcs context
   ],
   "(my not completely vanilla collection)"
   "slug": "collectionChild"
}

// recognise id as one of our own, slug is implied by last path element of id
POST /collection1/
{
  "id": "https://dlc.services/iiif/collection1/collectionChild,
  "@context":  "standard iiif context",
   "(my vanilla collection)"
}

// recognise id is not one of ours, but what's the slug?
400 Bad Request - you need to do a PUT to get this one in because we can't work out what the slug should be
POST /collection1/
{
  "id": "https://bl.uk/gary-collection",
  "@context":  "standard iiif context",
   "(my vanilla completely external collection)"
}

// (no id, or ignore id) - don't need it
PUT /collection1/collectionChild
{
  "@context": "standard iiif context",
   "(my vanilla collection)"
} 

// This is fine, parent and slug defined by PUT URL
PUT /collection1/collectionChild
{
  "id": "https://bl.uk/gary-collection",
  "@context":  "standard iiif context",
   "(my vanilla completely external collection)"
} 
  • Any id property on the resource supplied in either PUT or POST is ignored - the URL PUT to, or the URL POSTed to + slug, tells us what the id will be in the hierarchy.

https://deploy-preview-2--dlcs-docs.netlify.app/api-doc/iiif#example-create-a-iiif-collection-within-a-storage-collectionhierarchical

@tomcrane tomcrane changed the title update hierarchical collection creation to use PUT and POST update hierarchical IIIF collection creation to use PUT and POST Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant