Skip to content

Commit

Permalink
Merge branch 'master' into DS-4107_Metadata_as_map
Browse files Browse the repository at this point in the history
  • Loading branch information
cwilper committed Jan 2, 2019
2 parents 8a60a4e + ed49aa9 commit b8d14e2
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 2 deletions.
75 changes: 75 additions & 0 deletions items.md
Expand Up @@ -70,6 +70,70 @@ Exposed links:
* owningCollection: the collection where the item belong to
* templateItemOf: the collection that have the item as template

## Creating an archived item

**POST /api/core/items?owningCollection:<:uuid>**

Administrators can directly create an archived item (bypassing the workflow). An example JSON can be seen below:

```
{
"name": "Practices of research data curation in institutional repositories: A qualitative view from repository staff",
"metadata": [
{
"key": "dc.contributor.author",
"value": "Stvilia, Besiki",
"language": "en"
},
{
"key": "dc.title",
"value": "Practices of research data curation in institutional repositories: A qualitative view from repository staff",
"language": "en"
},
{
"key": "dc.type",
"value": "Journal Article",
"language": "en"
}
],
"inArchive": true,
"discoverable": true,
"withdrawn": false,
"type": "item"
}
```

## Updating item metadata

**PUT /api/core/items/<:uuid>**

Provide updated metadata information for an item, when the update is completed the updated object will be returned. The JSON to update can be found below.

```
{
"id": "a8ba963f-d9c9-4198-b5a4-3f74e2ab6fb9",
"uuid": "a8ba963f-d9c9-4198-b5a4-3f74e2ab6fb9",
"name": "Test new title",
"handle": "123456789/60636",
"metadata": [
{
"key": "dc.contributor.author",
"value": "Velasco, Mercedes",
"language": "en"
},
{
"key": "dc.title",
"value": "Test new title",
"language": "pt_BR"
}
],
"inArchive": true,
"discoverable": true,
"withdrawn": false,
"type": "item"
}
```

## Patch operations

### Replace
Expand Down Expand Up @@ -156,3 +220,14 @@ It returns the collection where the item belong to
Example: to be provided

It returns the collection that have the item as template

## Deleting a collection

**DELETE /api/core/items/<:uuid>**

Delete an item.

* 204 No content - if the operation succeed
* 401 Forbidden - if you are not authenticated
* 403 Unauthorized - if you are not logged in with sufficient permissions
* 404 Not found - if the item doesn't exist (or was already deleted)
43 changes: 42 additions & 1 deletion metadatafields.md
Expand Up @@ -45,4 +45,45 @@ Example: <https://dspace7.4science.it/dspace-spring-rest/#https://dspace7.4scien

The supported parameters are:
* **(mandatory)** schema, the prefix of the metadata schema (i.e. "dc", "dcterms", "eperson, etc.)
* page, size [see pagination](README.md#Pagination)
* page, size [see pagination](README.md#Pagination)

## Creating a Metadata Field

**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"
}
```

## Updating a Metadata Field

**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"
}
```

## Deleting a Metadata Field

**DELETE /api/core/metadatafields/<:id>**

Delete a metadata field.

* 204 No content - if the operation succeed
* 401 Forbidden - if you are not authenticated
* 403 Unauthorized - if you are not logged in with sufficient permissions
* 404 Not found - if the metadata field doesn't exist (or was already deleted)
41 changes: 40 additions & 1 deletion metadataschemas.md
Expand Up @@ -26,4 +26,43 @@ Provide detailed information about a specific metadata schema. The JSON response
}
```

Exposed links: none
Exposed links: none

## Creating a Metadata Schema

**POST /api/core/metadataschemas**

To create a metadata schema, perform a post with the JSON below when logged in as admin.

```
{
"prefix": "example",
"namespace": "http://dublincore.org/documents/example/",
"type": "metadataschema"
}
```

## Updating a Metadata Schema

**PUT /api/core/metadataschemas/<:id>**

Provide updated information about a specific metadata schema, when the update is completed the updated object will be returned. The JSON to update can be found below.
```
{
"id": 7,
"prefix": "exampleUpdated",
"namespace": "http://dublincore.org/documents/exampleUpdated/",
"type": "metadataschema"
}
```

## Deleting a Metadata Schema

**DELETE /api/core/metadataschemas/<:id>**

Delete a metadata schema.

* 204 No content - if the operation succeed
* 401 Forbidden - if you are not authenticated
* 403 Unauthorized - if you are not logged in with sufficient permissions
* 404 Not found - if the metadata schema doesn't exist (or was already deleted)

0 comments on commit b8d14e2

Please sign in to comment.