Back to the list of all defined endpoints
/api/core/metadatafields
Provide access to the metadata fields defined in the registry (DBMS based). It returns the list of existent metadata fields.
Example: http://dspace7.4science.it/dspace-spring-rest/#/dspace-spring-rest/api/core/metadatafields
/api/core/metadatafields/<:id>
Provide detailed information about a specific metadata schema. The JSON response document is as follow
{
"id": 8,
"element": "contributor",
"qualifier": "advisor",
"scopeNote": "Use primarily for thesis advisor.",
"type": "metadatafield",
"_links": {...},
"_embedded": {...}
}
Exposed links:
- schema: the metadata schema to which the item belongs
/api/core/metadatafields/<:id>/schema
It returns the metadata schema which the metadata field belongs. See the Metadata Schema endpoint for more info](metadataschemas.md#Single Metadata Schema)
/api/core/metadatafields/search/bySchema?schema=<:prefix>
The supported parameters are:
- (mandatory) schema, the prefix of the metadata schema (i.e. "dc", "dcterms", "eperson, etc.)
- page, size see pagination
Return codes:
- 200 OK - if the operation succeed
/api/core/metadatafields/search/byFieldName
This endpoint supports the parameters (any combination of parameters is allowed):
- schema, an exact match of the prefix of the metadata schema (e.g. "dc", "dcterms", "eperson")
- element, an exact match of the field's element (e.g. "contributor", "title")
- qualifier, an exact match of the field's qualifier (e.g. "author", "alternative")
- query, part of the fully qualified field, should start with the start of the schema, element or qualifier (e.g. "dc.ti", "contributor", "auth", "contributor.ot")
- page, size see pagination
Examples:
- /api/core/metadatafields/search/byFieldName?schema=dc&query=author
- /api/core/metadatafields/search/byFieldName?query=id&qualifier=uri
Return codes:
- 200 OK - if the operation succeed
POST /api/core/metadatafields?schemaId=<:schemaId>
To create a metadata field, perform a post with the JSON below when logged in as admin.
{
"element": "contributor",
"qualifier": "tester",
"scopeNote": "An agent which provided illustrations for the resource",
"type": "metadatafield"
}
PUT /api/core/metadatafields/<:id>
Provide updated information about a specific metadata field, when the update is completed the updated object will be returned. The JSON to update can be found below.
{
"id": 7,
"element": "coverageUpdated",
"qualifier": "spatialUpdated",
"scopeNote": null,
"type": "metadatafield"
}
DELETE /api/core/metadatafields/<:id>
Delete a metadata field.
- 204 No content - if the operation succeed
- 401 Unauthorized - if you are not authenticated
- 403 Forbidden - if you are not logged in with sufficient permissions
- 404 Not found - if the metadata field doesn't exist (or was already deleted)