Delete Structures Web Service
Contents
Overview
Fusion Metadata Registry provides a web service for deleting structural metadata.
Deletion always concerns one maintainable artefact or one item in the case of Codelists and other item schemes:
- A fully identified Maintainable Artefact, for example
codelist/SDMX/CL_FREQ/1.0 - A fully identified Item, for example
codelist/SDMX/CL_FREQ/1.0/M
Method
Delete an artefact using the HTTP DELETE method, the /ws/secure/sdmxapi/rest/ REST API entry point and by specifying the type and identity of the artefact to the delete on the URL path.
Examples:
- DELETE
http://registry.mydomain.org/ws/secure/sdmxapi/rest/codelist/SDMX/CL_FREQ/1.0 - DELETE
http://registry.mydomain.org/ws/secure/sdmxapi/rest/codelist/SDMX/CL_FREQ/1.0/M
curl example
curl -X DELETE -u "root:password" "http://localhost:8080/ws/secure/sdmxapi/rest/codelist/SDMX/CL_FREQ/1.0"
Artefact types
When constructing the URL, the artefact type is the same as those for the SDMX v2 structure query, and can be one of the following:
datastructure, metadatastructure, categoryscheme, conceptscheme, codelist, hierarchy, hierarchyassociation, valuelist, agencyscheme, dataproviderscheme, metadataproviderscheme, dataconsumerscheme, organisationunitscheme, dataflow, metadataflow, reportingtaxonomy, provisionagreement, metadataprovisionagreement, structuremap, representationmap, conceptschememap, categoryschememap, organisationschememap, reportingtaxonomymap, process, categorisation, dataconstraint, metadataconstraint, transformationscheme, rulesetscheme, userdefinedoperatorscheme, customtypescheme, namepersonalisationscheme, vtlmappingscheme
Deleting artefacts referenced by others
Artefacts can only be deleted if they are not referenced by others.
If an artefact is referenced, a delete request will be rejected with HTTP status 400. In these cases, referencing artefacts must be deleted first.
Response
An SDMX-ML Submit Structure Response Message is returned as the response. For example:
<?xml version='1.0' encoding='UTF-8'?> <message:RegistryInterface xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message" xmlns:com="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common" xmlns:reg="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/registry"> <message:Header> <message:ID>IREF971813</message:ID> <message:Test>false</message:Test> <message:Prepared>2022-07-28T10:06:25Z</message:Prepared> <message:Sender id="Unknown"/> </message:Header> <message:SubmitStructureResponse> <reg:SubmissionResult> <reg:SubmittedStructure action="Delete"> <reg:MaintainableObject> <URN>urn:sdmx:org.sdmx.infomodel.codelist.Codelist=SDMX:CL_FREQ(1.0)</URN> </reg:MaintainableObject> </reg:SubmittedStructure> <reg:StatusMessage status="Success"/> </reg:SubmissionResult> </message:SubmitStructureResponse> </message:RegistryInterface>
Summary
| Entry Point | /ws/secure/sdmxapi/rest/ |
| Access | Secure Agency and Admin only |
| Authentication | HTTP Basic Authentication |
| Http Method | DELETE |
| Accepts | None - the request must have no content |
| Content-Type | None - the request must have no content |
| Response Format | SDMX-ML Submit Structure Response Message (XML) |
| Response Statuses | 200 - Deletion success 400 - Deletion unsuccessful 401 - Unauthorized (if access has been restricted) 500 - Server Error |