Skip to content

Instantly share code, notes, and snippets.

@bram-atmire
Last active December 22, 2020 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bram-atmire/a926dc00492a79d884e18997afaf9f1c to your computer and use it in GitHub Desktop.
Save bram-atmire/a926dc00492a79d884e18997afaf9f1c to your computer and use it in GitHub Desktop.
Example login and item creation calls for DSpace 6 REST API
{
"info": {
"_postman_id": "b458c944-8eef-44a2-b5cd-c4bcf44bc7f2",
"name": "Demo DSpace 6",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Login",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "email",
"value": "dspacedemo+admin@gmail.com",
"type": "text"
},
{
"key": "password",
"value": "dspace",
"type": "text"
}
]
},
"url": {
"raw": "https://demo.dspace.org/rest/login",
"protocol": "https",
"host": [
"demo",
"dspace",
"org"
],
"path": [
"rest",
"login"
]
}
},
"response": []
},
{
"name": "Status",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "file",
"file": {}
},
"url": {
"raw": "https://demo.dspace.org/rest/status",
"protocol": "https",
"host": [
"demo",
"dspace",
"org"
],
"path": [
"rest",
"status"
]
}
},
"response": []
},
{
"name": "Post item",
"request": {
"auth": {
"type": "basic"
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\"metadata\":[\n{\n\"key\": \"dc.title\",\n\"value\": \"Test 20201124 REST 2\"\n},\n{\n\"key\": \"dc.contributor.author\",\n\"value\": \"Einstein, Albert\"\n},\n{\n\"key\": \"dc.description.abstract\",\n\"value\": \"ABSTRACT 2\"\n}\n]}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://demo.dspace.org/rest/collections/998c6d9d-8c36-473d-a84c-f09515b54912/items",
"protocol": "https",
"host": [
"demo",
"dspace",
"org"
],
"path": [
"rest",
"collections",
"998c6d9d-8c36-473d-a84c-f09515b54912",
"items"
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment