{"openapi":"3.0.3","info":{"title":"OpenRiC Reference API","description":"Reference implementation of the OpenRiC Viewing + Write API.\n\nThe same surface any OpenRiC-conformant server is expected to provide. See the spec at https:\/\/openric.org\/.\n\nAll read endpoints are public. Write endpoints require `X-API-Key` with the appropriate scope (`write` \/ `delete`).","version":"1.0.0","license":{"name":"AGPL-3.0-or-later","url":"https:\/\/www.gnu.org\/licenses\/agpl-3.0.html"},"contact":{"name":"OpenRiC","url":"https:\/\/openric.org\/"}},"servers":[{"url":"https:\/\/ric.theahg.co.za\/api\/ric\/v1","description":"This server"}],"security":[[],{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Issued by the server admin. Three scopes: `write`, `delete`, implicit `read`."}},"schemas":{"Health":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"service":{"type":"string"},"version":{"type":"string"}}},"ProblemDetails":{"type":"object","description":"RFC 7807 Problem Details. Every error response from the \/api\/ric\/v1 surface returns this shape with Content-Type: application\/problem+json. Implementations MAY emit additional fields alongside the base set.","required":["type","title","status","detail","instance"],"properties":{"type":{"type":"string","format":"uri","description":"Stable error-type URI. Clients SHOULD dispatch on this. All types live under https:\/\/openric.org\/errors\/.","example":"https:\/\/openric.org\/errors\/not-found","enum":["https:\/\/openric.org\/errors\/not-found","https:\/\/openric.org\/errors\/bad-request","https:\/\/openric.org\/errors\/validation-failed","https:\/\/openric.org\/errors\/authentication-required","https:\/\/openric.org\/errors\/forbidden","https:\/\/openric.org\/errors\/conflict","https:\/\/openric.org\/errors\/payload-too-large","https:\/\/openric.org\/errors\/unsupported-media-type","https:\/\/openric.org\/errors\/internal-error"]},"title":{"type":"string","description":"Short, human-readable summary. Localised freely. Clients SHOULD NOT dispatch on this.","example":"Not Found"},"status":{"type":"integer","description":"HTTP status code, matching the Response status line.","example":404},"detail":{"type":"string","description":"Human-readable explanation specific to this occurrence.","example":"Agent not found"},"instance":{"type":"string","description":"The request path (with query string, if any) that produced the error.","example":"\/api\/ric\/v1\/agents\/missing-id"}},"additionalProperties":true},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"integer"}}},"CreateResponse":{"type":"object","properties":{"id":{"type":"integer"},"slug":{"type":"string","nullable":true},"type":{"type":"string"},"href":{"type":"string"}}},"JsonLd":{"type":"object","description":"JSON-LD document. See https:\/\/www.ica.org\/standards\/RiC\/ontology.","additionalProperties":true},"Subgraph":{"type":"object","properties":{"@context":{"type":"object"},"@type":{"type":"string","example":"openric:Subgraph"},"openric:root":{"type":"string"},"openric:depth":{"type":"integer"},"openric:nodes":{"type":"array","items":{"type":"object"}},"openric:edges":{"type":"array","items":{"type":"object"}}}},"UploadResponse":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string","format":"uri"},"thumbnail_url":{"type":"string","format":"uri","nullable":true,"description":"Non-null when the upload was an image and a default-size thumbnail was generated on write."},"mime":{"type":"string"},"size":{"type":"integer"},"filename":{"type":"string"},"path":{"type":"string"}}},"ImportResponse":{"type":"object","properties":{"type":{"type":"string"},"dry_run":{"type":"boolean"},"total":{"type":"integer"},"succeeded":{"type":"integer"},"failed":{"type":"integer"},"duration_ms":{"type":"integer"},"created":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"id":{"type":"integer"},"slug":{"type":"string"},"label":{"type":"string"}}}},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"error":{"type":"string"},"label":{"type":"string"}}}}}},"RevisionList":{"type":"object","properties":{"@type":{"type":"string","example":"openric:RevisionList"},"entity":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"integer"}}},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"action":{"type":"string","enum":["create","update","delete"]},"actor":{"type":"string"},"ip":{"type":"string"},"payload":{"type":"object","nullable":true},"created_at":{"type":"string","format":"date-time"}}}}}},"AgentCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Authorised form of name"},"entity_type_id":{"type":"integer","description":"Term id \u2014 Person \/ CorporateBody \/ Family"},"description_identifier":{"type":"string"},"parent_id":{"type":"integer"},"dates_of_existence":{"type":"string"},"history":{"type":"string"},"places":{"type":"string"},"legal_status":{"type":"string"},"functions":{"type":"string"},"mandates":{"type":"string"},"general_context":{"type":"string"},"sources":{"type":"string"}}},"AgentUpdate":{"$ref":"#\/components\/schemas\/AgentCreate"},"RecordCreate":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"identifier":{"type":"string"},"level_of_description_id":{"type":"integer"},"repository_id":{"type":"integer"},"parent_id":{"type":"integer"},"scope_and_content":{"type":"string"},"extent_and_medium":{"type":"string"},"archival_history":{"type":"string"},"acquisition":{"type":"string"},"arrangement":{"type":"string"},"access_conditions":{"type":"string"},"reproduction_conditions":{"type":"string"},"physical_characteristics":{"type":"string"},"finding_aids":{"type":"string"}}},"RecordUpdate":{"$ref":"#\/components\/schemas\/RecordCreate"},"PlaceCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"type_id":{"type":"integer"},"latitude":{"type":"number"},"longitude":{"type":"number"},"authority_uri":{"type":"string","format":"uri"},"parent_id":{"type":"integer"},"address":{"type":"string"},"description":{"type":"string"}}},"PlaceUpdate":{"$ref":"#\/components\/schemas\/PlaceCreate"},"RuleCreate":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"type_id":{"type":"integer"},"jurisdiction":{"type":"string"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"authority_uri":{"type":"string","format":"uri"},"description":{"type":"string"},"legislation":{"type":"string"},"sources":{"type":"string"}}},"RuleUpdate":{"$ref":"#\/components\/schemas\/RuleCreate"},"ActivityCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"type_id":{"type":"integer"},"date_display":{"type":"string"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"place_id":{"type":"integer"},"description":{"type":"string"}}},"ActivityUpdate":{"$ref":"#\/components\/schemas\/ActivityCreate"},"InstantiationCreate":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"carrier_type":{"type":"string"},"mime_type":{"type":"string"},"extent_value":{"type":"number"},"extent_unit":{"type":"string"},"record_id":{"type":"integer"},"content_url":{"type":"string","format":"uri"},"description":{"type":"string"},"technical_characteristics":{"type":"string"}}},"InstantiationUpdate":{"$ref":"#\/components\/schemas\/InstantiationCreate"},"RepositoryCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Authorised form of name"},"identifier":{"type":"string"},"upload_limit":{"type":"number"},"history":{"type":"string"},"geocultural_context":{"type":"string"},"collecting_policies":{"type":"string"},"buildings":{"type":"string"},"holdings":{"type":"string"},"finding_aids":{"type":"string"},"opening_times":{"type":"string"},"access_conditions":{"type":"string"},"disabled_access":{"type":"string"},"research_services":{"type":"string"},"reproduction_services":{"type":"string"},"public_facilities":{"type":"string"}}},"RepositoryUpdate":{"$ref":"#\/components\/schemas\/RepositoryCreate"},"FunctionCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Authorised form of name"},"type_id":{"type":"integer"},"classification":{"type":"string"},"dates":{"type":"string"},"description":{"type":"string"},"history":{"type":"string"},"legislation":{"type":"string"},"institution_identifier":{"type":"string"},"sources":{"type":"string"}}},"FunctionUpdate":{"$ref":"#\/components\/schemas\/FunctionCreate"},"RelationCreate":{"type":"object","required":["subject_id","object_id","relation_type"],"properties":{"subject_id":{"type":"integer"},"object_id":{"type":"integer"},"relation_type":{"type":"string","example":"hasInstantiation"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"certainty":{"type":"string","enum":["certain","probable","possible","uncertain","unknown"]},"evidence":{"type":"string"}}},"RelationUpdate":{"$ref":"#\/components\/schemas\/RelationCreate"},"ValidateRequest":{"type":"object","properties":{"graph":{"type":"object","description":"JSON-LD graph to validate against SHACL shapes"},"shapes":{"type":"string","description":"Optional: named shape set; defaults to openric.shacl.ttl"}}},"KeyRequest":{"type":"object","required":["email","intended_use"],"properties":{"email":{"type":"string","format":"email","description":"Where the issued key will be emailed."},"organization":{"type":"string","description":"Institution or project name (optional)."},"intended_use":{"type":"string","minLength":20,"description":"What will you use this key for? Read by a human admin."},"scopes":{"type":"string","example":"read,write,delete","description":"Comma-separated subset of [read, write, delete]. Defaults to \"read,write\"."}}},"KeyRequestAccepted":{"type":"object","properties":{"success":{"type":"boolean"},"request_id":{"type":"integer"},"message":{"type":"string"},"status_url":{"type":"string","format":"uri"}}},"KeyRequestStatus":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string","enum":["pending","approved","denied","revoked"]},"email":{"type":"string","description":"Masked \u2014 only prefix visible."},"requested_scopes":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"reviewed_at":{"type":"string","format":"date-time","nullable":true}}}}},"tags":[{"name":"Discovery","description":"API info, health, vocabulary, OpenAPI spec, conformance badge."},{"name":"Agents","description":"rico:Agent \/ Person \/ CorporateBody \/ Family (ISAAR-CPF)."},{"name":"Records","description":"rico:Record \/ RecordSet (ISAD archival descriptions)."},{"name":"Places","description":"rico:Place \u2014 geographic \/ topographical entities."},{"name":"Rules","description":"rico:Rule \u2014 mandates, legislation, policies."},{"name":"Activities","description":"rico:Activity \u2014 production \/ accumulation events."},{"name":"Instantiations","description":"rico:Instantiation \u2014 carriers of bitstreams (files, images)."},{"name":"Repositories","description":"rico:Repository \/ Custodian (ISDIAH)."},{"name":"Functions","description":"rico:Function (ISDF)."},{"name":"Relations","description":"rico:Relation \u2014 typed links between entities."},{"name":"Graph","description":"Subgraph walks + full SPARQL."},{"name":"Uploads","description":"Multipart file upload."},{"name":"Harvest","description":"OAI-PMH v2.0 harvester endpoint."},{"name":"Keys","description":"Self-service API key request flow (no auth required)."},{"name":"profile: core-discovery","description":"Read-only access to records, agents, repositories; vocabulary; autocomplete. The minimum OpenRiC conformance target."},{"name":"profile: authority-context","description":"Places, Rules, Activities \u2014 the contextual entities that qualify records."},{"name":"profile: digital-object-linkage","description":"Instantiations and Functions \u2014 carriers and activity types linked to records."},{"name":"profile: graph-traversal","description":"Subgraph walks, relation types, experimental SPARQL."},{"name":"profile: export-only","description":"OAI-PMH harvester verbs."},{"name":"profile: round-trip-editing","description":"Create \/ update \/ delete across every writable entity. Requires X-API-Key with the `write` or `delete` scope."}],"paths":{"\/":{"get":{"tags":["Discovery"],"summary":"API root","parameters":[],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/activities":{"get":{"tags":["Activities","profile: authority-context"],"summary":"List Activities","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Activities","profile: round-trip-editing"],"summary":"Create a Activity","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ActivityCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/activities\/{id}":{"get":{"tags":["Activities","profile: authority-context"],"summary":"Get Activity by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"patch":{"tags":["Activities","profile: round-trip-editing"],"summary":"Update Activity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ActivityUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Activities","profile: round-trip-editing"],"summary":"Delete Activity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/agents":{"get":{"tags":["Agents","profile: core-discovery"],"summary":"List agents","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"type","in":"query","schema":{"type":"string","enum":["person","corporate body","family"]}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Agents","profile: round-trip-editing"],"summary":"Create an Agent","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AgentCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/agents\/{id}":{"patch":{"tags":["Agents","profile: round-trip-editing"],"summary":"Update agent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AgentUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Agents","profile: round-trip-editing"],"summary":"Delete agent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/agents\/{slug}":{"get":{"tags":["Agents","profile: core-discovery"],"summary":"Get agent by slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/autocomplete":{"get":{"tags":["Discovery","profile: core-discovery"],"summary":"Cross-entity label autocomplete","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"types","in":"query","schema":{"type":"string","example":"place,agent,record"}},{"name":"limit","in":"query","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/conformance\/badge":{"get":{"tags":["Discovery"],"summary":"Shields.io-compatible conformance badge. No `profile` param = overall spec version summary. With `?profile=<id>` = declaration state for that profile (brightgreen\/lightgrey). See openric-spec conformance\/badge.md.","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string"},"description":"Profile id to check \u2014 e.g. core-discovery, authority-context, graph-traversal."}],"responses":{"200":{"description":"shields.io endpoint schema v1","content":{"application\/json":{"schema":{"type":"object","required":["schemaVersion","label","message","color"],"properties":{"schemaVersion":{"type":"integer","const":1},"label":{"type":"string"},"message":{"type":"string"},"color":{"type":"string","enum":["brightgreen","yellow","lightgrey","blue"]}}}}}}}}},"\/docs":{"get":{"tags":["Discovery"],"summary":"Swagger UI explorer","parameters":[],"responses":{"200":{"description":"HTML page"}}}},"\/entities\/{id}":{"delete":{"tags":["Discovery"],"summary":"Type-agnostic delete by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/entities\/{id}\/info":{"get":{"tags":["Discovery"],"summary":"Minimal entity info card","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/functions":{"get":{"tags":["Functions","profile: digital-object-linkage"],"summary":"List functions","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Functions","profile: round-trip-editing"],"summary":"Create a Function","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/FunctionCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/functions\/{id}":{"get":{"tags":["Functions","profile: digital-object-linkage"],"summary":"Get function by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"patch":{"tags":["Functions","profile: round-trip-editing"],"summary":"Update function","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/FunctionUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Functions","profile: round-trip-editing"],"summary":"Delete function","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/graph":{"get":{"tags":["Graph","profile: graph-traversal"],"summary":"Subgraph walk","parameters":[{"name":"uri","in":"query","required":true,"schema":{"type":"string"},"description":"Seed URI (an @id returned by any list endpoint)"},{"name":"depth","in":"query","schema":{"type":"integer","default":1,"maximum":3}}],"responses":{"200":{"description":"openric:Subgraph","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Subgraph"}}}}}}},"\/health":{"get":{"tags":["Discovery"],"summary":"Health probe","parameters":[],"responses":{"200":{"description":"{\"status\":\"ok\"}","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Health"}}}}}}},"\/hierarchy\/{id}":{"get":{"tags":["Records","profile: core-discovery"],"summary":"Hierarchy walk","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"include","in":"query","schema":{"type":"string","example":"parent,children,siblings"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/import":{"post":{"tags":["Uploads"],"summary":"Bulk-create entities from CSV or JSON","parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["places","rules","activities","instantiations","agents","records","repositories","functions"]}},{"name":"format","in":"query","schema":{"type":"string","enum":["csv","json"]}},{"name":"dry_run","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"201":{"description":"Per-row report","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ImportResponse"}}}},"413":{"description":"Too many rows (default 10 000)"}},"security":[{"ApiKeyAuth":[]}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}},"application\/json":{"schema":{"oneOf":[{"type":"array","items":{"type":"object"}},{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}}}}]}}}}}},"\/instantiations":{"get":{"tags":["Instantiations","profile: digital-object-linkage"],"summary":"List Instantiations","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Instantiations","profile: round-trip-editing"],"summary":"Create a Instantiation","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InstantiationCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/instantiations\/{id}":{"get":{"tags":["Instantiations","profile: digital-object-linkage"],"summary":"Get Instantiation by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"patch":{"tags":["Instantiations","profile: round-trip-editing"],"summary":"Update Instantiation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InstantiationUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Instantiations","profile: round-trip-editing"],"summary":"Delete Instantiation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/keys\/request":{"get":{"tags":["Keys"],"summary":"Key request form (HTML)","parameters":[],"responses":{"200":{"description":"HTML form for requesting an API key."}}},"post":{"tags":["Keys"],"summary":"Submit a key request","parameters":[],"responses":{"201":{"description":"Accepted","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/KeyRequestAccepted"}}}},"429":{"description":"Rate-limited \u2014 too many requests from your IP in the last 24h."}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/KeyRequest"}}}}}},"\/keys\/request\/{id}":{"get":{"tags":["Keys"],"summary":"Check request status (no secret revealed)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/KeyRequestStatus"}}}},"404":{"description":"Not found"}}}},"\/oai":{"get":{"tags":["Harvest","profile: export-only"],"summary":"OAI-PMH v2.0 endpoint","parameters":[{"name":"verb","in":"query","required":true,"schema":{"type":"string","enum":["Identify","ListMetadataFormats","ListSets","ListIdentifiers","ListRecords","GetRecord"]}},{"name":"metadataPrefix","in":"query","schema":{"type":"string","enum":["oai_dc","rico_ld"]}},{"name":"identifier","in":"query","schema":{"type":"string","example":"oai:ric.theahg.co.za:1"}},{"name":"set","in":"query","schema":{"type":"string","example":"fonds:1"}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"until","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"resumptionToken","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OAI-PMH XML envelope","content":{"application\/xml":{"schema":{"type":"string"}}}}}}},"\/openapi.json":{"get":{"tags":["Discovery"],"summary":"This document","parameters":[],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/places":{"get":{"tags":["Places","profile: authority-context"],"summary":"List Places","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Places","profile: round-trip-editing"],"summary":"Create a Place","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PlaceCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/places\/flat":{"get":{"tags":["Places","profile: authority-context"],"summary":"Flat name+id list for parent-picker","parameters":[{"name":"exclude_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/places\/{id}":{"get":{"tags":["Places","profile: authority-context"],"summary":"Get Place by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"patch":{"tags":["Places","profile: round-trip-editing"],"summary":"Update Place","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PlaceUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Places","profile: round-trip-editing"],"summary":"Delete Place","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/records":{"get":{"tags":["Records","profile: core-discovery"],"summary":"List records","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"level","in":"query","schema":{"type":"string","enum":["fonds","series","file","item"]}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Records","profile: round-trip-editing"],"summary":"Create a Record","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RecordCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/records\/{id}":{"patch":{"tags":["Records","profile: round-trip-editing"],"summary":"Update record","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RecordUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Records","profile: round-trip-editing"],"summary":"Delete record (refuses if has descendants)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}},"409":{"description":"Has descendants \u2014 delete\/re-parent them first."}},"security":[{"ApiKeyAuth":[]}]}},"\/records\/{id}\/entities":{"get":{"tags":["Records","profile: core-discovery"],"summary":"Linked RiC entities for a record","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"types","in":"query","schema":{"type":"string","example":"place,rule,activity,instantiation"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/records\/{slug}":{"get":{"tags":["Records","profile: core-discovery"],"summary":"Get record by slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/records\/{slug}\/export":{"get":{"tags":["Records","profile: core-discovery"],"summary":"Export full record set as JSON-LD","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/relation-types":{"get":{"tags":["Relations","profile: graph-traversal"],"summary":"Relation type catalog","parameters":[{"name":"domain","in":"query","schema":{"type":"string"}},{"name":"range","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/relations":{"get":{"tags":["Relations","profile: graph-traversal"],"summary":"List relations","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Relations","profile: round-trip-editing"],"summary":"Create a relation","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RelationCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/relations-for\/{id}":{"get":{"tags":["Relations","profile: graph-traversal"],"summary":"Relations for one entity, grouped by direction","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/relations\/{id}":{"patch":{"tags":["Relations","profile: round-trip-editing"],"summary":"Update relation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RelationUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Relations","profile: round-trip-editing"],"summary":"Delete relation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/repositories":{"get":{"tags":["Repositories","profile: core-discovery"],"summary":"List repositories","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Repositories","profile: round-trip-editing"],"summary":"Create a Repository","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RepositoryCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/repositories\/{id}":{"patch":{"tags":["Repositories","profile: round-trip-editing"],"summary":"Update repository","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RepositoryUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Repositories","profile: round-trip-editing"],"summary":"Delete repository (refuses if owns records)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}},"409":{"description":"Repository owns information_objects \u2014 re-assign first."}},"security":[{"ApiKeyAuth":[]}]}},"\/repositories\/{slug}":{"get":{"tags":["Repositories","profile: core-discovery"],"summary":"Get repository by slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/rules":{"get":{"tags":["Rules","profile: authority-context"],"summary":"List Rules","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"post":{"tags":["Rules","profile: round-trip-editing"],"summary":"Create a Rule","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RuleCreate"}}}},"security":[{"ApiKeyAuth":[]}]}},"\/rules\/{id}":{"get":{"tags":["Rules","profile: authority-context"],"summary":"Get Rule by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}},"patch":{"tags":["Rules","profile: round-trip-editing"],"summary":"Update Rule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RuleUpdate"}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Rules","profile: round-trip-editing"],"summary":"Delete Rule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SuccessResponse"}}}},"404":{"description":"Not found \u2014 RFC 7807 problem+json","content":{"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ProblemDetails"}}}}},"security":[{"ApiKeyAuth":[]}]}},"\/sparql":{"get":{"tags":["Graph","profile: graph-traversal"],"summary":"\u26a0 EXPERIMENTAL \u2014 SPARQL query endpoint","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}},"description":"Experimental and optional. The reference implementation currently returns a stub response. Not part of the conformance-required surface. May be removed or replaced with a proper triplestore-backed endpoint in a future release.","deprecated":false}},"\/thumbnail\/{id}":{"get":{"tags":["Uploads"],"summary":"Derivative thumbnail for a digital_object id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"w","in":"query","schema":{"type":"integer","enum":[150,300,600,1200],"default":300}},{"name":"h","in":"query","schema":{"type":"integer","enum":[150,300,600,1200]}}],"responses":{"302":{"description":"Redirect to the cached thumbnail file URL"},"404":{"description":"Digital object or source file not found"},"415":{"description":"Source is not an image"}}}},"\/upload":{"post":{"tags":["Uploads"],"summary":"Upload a file (multipart)","parameters":[],"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UploadResponse"}}}},"413":{"description":"File too large"}},"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}}}},"\/validate":{"post":{"tags":["Graph","profile: round-trip-editing"],"summary":"SHACL validation","parameters":[],"responses":{"200":{"description":"Validation report","content":{"application\/json":{"schema":{"type":"object"}}}}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidateRequest"}}}}}},"\/vocabulary":{"get":{"tags":["Discovery","profile: core-discovery"],"summary":"Ontology classes + properties","parameters":[],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/vocabulary\/{taxonomy}":{"get":{"tags":["Discovery","profile: core-discovery"],"summary":"Single dropdown taxonomy","parameters":[{"name":"taxonomy","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/JsonLd"}}}}}}},"\/{type}\/{id}\/revisions":{"get":{"tags":["Discovery"],"summary":"Audit-log entries for one entity","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["places","rules","activities","instantiations","agents","records","repositories","functions","relations"]}},{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"Revision list","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RevisionList"}}}}}}}}}