Schemas
The schema for a given resource, that is an EMu table, can be retrieved thought the resources resource (yes the terminology is a bit confusing). Schemas are returned in JSON Schema format. There is no Mason markup added to the schema when it is returned regardless of the representation setting. The schema for a given EMu table is automatically generated from the table’s insertion form the first time the table is used. The resulting schema is then cached within the shim providing fast access to it for future requests.
On the rare occasion that a table’s insertion form is modified the shim provides a method for updating the schema without the need to restart the server. The update is typically performed after a new version of EMu has been installed.
The following requests are available for the resources resource.
Update
PATCH /{tenant}/resources
PATCH /{tenant}/resources/{resource}
The PATCH method updates the schema(s) for a given EMu table(s). The first form will drop all schemas from the cache forcing each one to be reloaded the next time it is required. The second form allows a single schema to be dropped. The {resource} identifies the EMu table (e.g. eparties) to be dropped.
The conversion of an EMu table’s insertion form into a JSON Schema may take a few seconds before completing, so a small delay should be expected the first time a table is used. There must be no payload send with this request.
An empty payload with a 204
status is returned if the request is successful.
Example URI
PATCH /museum/resources
Headers
Authorization: Bearer {token}
Response 204
Response Headers
Authorization: Bearer {token}
Retrieve
GET /{tenant}/resources
GET /{tenant}/resources/{resource}
The GET method returns the schema for a given EMu table. The first form returns the schemas for all the EMu tables. The request may take some time the first time it is invoked as each table’s schema may need to be built. Subsequent calls will use the cached version and be fast. The second form returns a JSON Schema for the specified {resource} table. The schema for an EMu table may be quite large as it contains all fields in the insertion form, even those that may not be used by the client.
The response payload contains the schema and a 200
status is returned for a successful request.
Example URI
GET /museum/resources/eparties
Headers
Authorization: Bearer {token}
Response 200
{
"id": "emu:/shared/tenants/museum",
"version": 1,
"data": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "emu:/museum/resources/eparties",
"title": "eparties",
"type": "object",
"properties": {
"AddEmail": {
"type": "string"
},
"AddEmuUserId": {
"type": "string"
},
"AddMailList_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"AddPhysCity": {
"type": "string"
},
"AddPhysCountry": {
"type": "string"
},
"AddPhysPost": {
"type": "string"
},
"AddPhysState": {
"type": "string"
},
"AddPhysStreet": {
"type": "string"
},
"AddPostCity": {
"type": "string"
},
"AddPostCountry": {
"type": "string"
},
"AddPostPost": {
"type": "string"
},
"AddPostState": {
"type": "string"
},
"AddPostStreet": {
"type": "string"
},
"AddWeb": {
"type": "string"
},
"AdmDateInserted": {
"type": "string",
"format": "partial-date"
},
"AdmDateModified": {
"type": "string",
"format": "partial-date"
},
"AdmGUIDIsPreferred_grp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"AdmGUIDIsPreferred": {
"type": "string",
"$comment": "AdmGUIDIsPreferred_tab"
},
"AdmGUIDType": {
"type": "string",
"$comment": "AdmGUIDType_tab"
},
"AdmGUIDValue": {
"type": "string",
"$comment": "AdmGUIDValue_tab"
}
},
"additionalProperties": false
}
},
"AdmGUIDPreferredType": {
"type": "string"
},
"AdmGUIDPreferredValue": {
"type": "string"
},
"AdmImportIdentifier": {
"type": "string"
},
"AdmInsertedBy": {
"type": "string"
},
"AdmModifiedBy": {
"type": "string"
},
"AdmOriginalData": {
"type": "string"
},
"AdmPublishWebNoPassword": {
"type": "string"
},
"AdmPublishWebNoPasswordFlag": {
"type": "string"
},
"AdmPublishWebPassword": {
"type": "string"
},
"AdmPublishWebPasswordFlag": {
"type": "string"
},
"AdmSystemIdentifier": {
"type": "string"
},
"AdmTimeInserted": {
"type": "string",
"format": "partial-time"
},
"AdmTimeModified": {
"type": "string",
"format": "partial-time"
},
"AdmWebMetadata": {
"type": "string"
},
"AssAssociation_grp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"AssAssociationRef": {
"type": "string",
"format": "uri",
"pattern": "^emu:/museum/eparties/[^/]+$",
"$comment": "AssAssociationRef_tab"
},
"AssEndDate": {
"type": "string",
"format": "partial-date",
"$comment": "AssEndDate0, fake"
},
"AssRole": {
"type": "string",
"$comment": "AssRole_tab"
},
"AssStartDate": {
"type": "string",
"format": "partial-date",
"$comment": "AssStartDate0, fake"
}
},
"additionalProperties": false
}
},
"BioBirthDate": {
"type": "string"
},
"BioBirthEarliestDate": {
"type": "string",
"format": "partial-date"
},
"BioBirthEarliestDateOrig": {
"type": "integer"
},
"BioBirthLatestDate": {
"type": "string",
"format": "partial-date"
},
"BioBirthLatestDateOrig": {
"type": "integer"
},
"BioBirthPlace": {
"type": "string"
},
"BioCommencementDate": {
"type": "string",
"format": "partial-date"
},
"BioCommencementNotes": {
"type": "string"
},
"BioCompletionDate": {
"type": "string",
"format": "partial-date"
},
"BioCulturalInfluences_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"BioDeathDate": {
"type": "string"
},
"BioDeathEarliestDate": {
"type": "string",
"format": "partial-date"
},
"BioDeathEarliestDateOrig": {
"type": "integer"
},
"BioDeathLatestDate": {
"type": "string",
"format": "partial-date"
},
"BioDeathLatestDateOrig": {
"type": "integer"
},
"BioDeathPlace": {
"type": "string"
},
"BioEthnicity": {
"type": "string"
},
"BioLabel": {
"type": "string"
},
"BioLocation_grp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"BioLocation": {
"type": "string",
"$comment": "BioLocation_tab"
},
"BioMovementEndDate": {
"type": "string",
"format": "partial-date",
"$comment": "BioMovementEndDate0, fake"
},
"BioMovementNotes": {
"type": "string",
"$comment": "BioMovementNotes_tab"
},
"BioMovementStartDate": {
"type": "string",
"format": "partial-date",
"$comment": "BioMovementStartDate0, fake"
}
},
"additionalProperties": false
}
},
"BioMovementDetails": {
"type": "string"
},
"BioNationality": {
"type": "string"
},
"ColCollaborationName": {
"type": "string"
},
"ColCollaborators_grp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ColCollaboratorsRef": {
"type": "string",
"format": "uri",
"pattern": "^emu:/museum/eparties/[^/]+$",
"$comment": "ColCollaboratorsRef_tab"
},
"ColRole": {
"type": "string",
"$comment": "ColRole_tab"
}
},
"additionalProperties": false
}
},
"ExtendedData": {
"type": "string",
"readOnly": true
},
"HisBeginDateNotes": {
"type": "string"
},
"HisBeginEarliestDate": {
"type": "string",
"format": "partial-date"
},
"HisBeginEarliestDateOrig": {
"type": "integer"
},
"HisBeginLatestDate": {
"type": "string",
"format": "partial-date"
},
"HisBeginLatestDateOrig": {
"type": "integer"
},
"HisCommenced": {
"type": "string"
},
"HisCompleted": {
"type": "string"
},
"HisEndDateNotes": {
"type": "string"
},
"HisEndEarliestDate": {
"type": "string",
"format": "partial-date"
},
"HisEndEarliestDateOrig": {
"type": "integer"
},
"HisEndLatestDate": {
"type": "string",
"format": "partial-date"
},
"HisEndLatestDateOrig": {
"type": "integer"
},
"IhhAlternateCity": {
"type": "string"
},
"IhhAlternateCountry": {
"type": "string"
},
"IhhAssociatedHerbaria": {
"type": "string"
},
"IhhCites": {
"type": "string"
},
"IhhCollectionFirstName_grp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"IhhCollectionFirstName": {
"type": "string",
"$comment": "IhhCollectionFirstName_tab"
},
"IhhCollectionLastName": {
"type": "string",
"$comment": "IhhCollectionLastName_tab"
}
},
"additionalProperties": false
}
},
"IhhContinent": {
"type": "string"
},
"IhhExchange": {
"type": "string"
},
"IhhGeography": {
"type": "string"
},
"IhhIncorporatedHerbaria_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"IhhInstitutionType": {
"type": "string"
},
"IhhJournalsRef_tab": {
"type": "array",
"items": {
"type": "string",
"format": "uri",
"pattern": "^emu:/museum/ebibliography/[^/]+$"
}
},
"IhhLoans": {
"type": "string"
},
"IhhRegion": {
"type": "string"
},
"IhhStatus": {
"type": "string"
},
"IhhTotal": {
"type": "integer"
},
"IhhTotals": {
"type": "string"
},
"IhpCorrespondent": {
"type": "string"
},
"IhpCorrespondentRank": {
"type": "integer"
},
"IhpDepartment": {
"type": "string"
},
"IhpDivision": {
"type": "string"
},
"IhpHerbariumRef": {
"type": "string",
"format": "uri",
"pattern": "^emu:/museum/eparties/[^/]+$"
},
"IhpPosition": {
"type": "string"
},
"IhpRank": {
"type": "integer"
},
"IhpSection": {
"type": "string"
},
"MulMultiMediaRef_tab": {
"type": "array",
"items": {
"type": "string",
"format": "uri",
"pattern": "^emu:/museum/emultimedia/[^/]+$"
}
},
"NamAutomatic": {
"type": "string"
},
"NamBranch": {
"type": "string"
},
"NamBriefName": {
"type": "string"
},
"NamBusiness_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"NamCitedName": {
"type": "string"
},
"NamContact": {
"type": "string"
},
"NamDepartment": {
"type": "string"
},
"NamDialect": {
"type": "string"
},
"NamFax": {
"type": "string"
},
"NamFirst": {
"type": "string"
},
"NamFullName": {
"type": "string"
},
"NamHome": {
"type": "string"
},
"NamLast": {
"type": "string"
},
"NamMiddle": {
"type": "string"
},
"NamMobile": {
"type": "string"
},
"NamOrganisation": {
"type": "string"
},
"NamOrganisationAcronym": {
"type": "string"
},
"NamOrganisationOtherNames_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"NamOtherNames_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"NamPartyType": {
"type": "string"
},
"NamPosition": {
"type": "string"
},
"NamPrimaryLanguage": {
"type": "string"
},
"NamRoles_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"NamSalutation": {
"type": "string"
},
"NamSection": {
"type": "string"
},
"NamSex": {
"type": "string"
},
"NamSource": {
"type": "string"
},
"NamSpecialities_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"NamSuffix": {
"type": "string"
},
"NamTaxonomicName": {
"type": "string"
},
"NamTitle": {
"type": "string"
},
"NotNotes": {
"type": "string"
},
"SecCanDelete_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"SecCanDisplay_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"SecCanEdit_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"SecDepartment_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"SecRecordStatus": {
"type": "string"
},
"SummaryData": {
"type": "string",
"readOnly": true
},
"SynSynonymyLocal_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"SynSynonymyRef_tab": {
"type": "array",
"items": {
"type": "string",
"format": "uri",
"pattern": "^emu:/museum/eparties/[^/]+$"
}
},
"UlaBiog_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"UlaDateEntered": {
"type": "string",
"format": "partial-date"
},
"UlaDescriptiveContributor_grp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"UlaDescriptiveContributor": {
"type": "string",
"$comment": "UlaDescriptiveContributor_tab"
},
"UlaDescriptiveNote": {
"type": "string",
"$comment": "UlaDescriptiveNote_tab"
}
},
"additionalProperties": false
}
},
"UlaName": {
"type": "string"
},
"UlaOldUlanIdNo": {
"type": "string"
},
"UlaRecordStatus": {
"type": "string"
},
"UlaRelationshipDate_grp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"UlaRelationshipDate": {
"type": "string",
"$comment": "UlaRelationshipDate_tab"
},
"UlaRelationshipName": {
"type": "string",
"$comment": "UlaRelationshipName_tab"
},
"UlaRelationshipType": {
"type": "string",
"$comment": "UlaRelationshipType_tab"
}
},
"additionalProperties": false
}
},
"UlaSourceNf_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"UlaSource_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"UlaUlanIdNo": {
"type": "string"
},
"UlaVar_tab": {
"type": "array",
"items": {
"type": "string"
}
},
"UlaVersion": {
"type": "string"
},
"irn": {
"type": "string",
"format": "uri",
"pattern": "^emu:/museum/eparties/[^/]+$"
}
},
"additionalProperties": false
}
}
Response Headers
Content-Type: application/json
Authorization: Bearer {token}