Difference between revisions of "INGe REST API Documentation"

From MPDLMediaWiki
Jump to: navigation, search
(POST {base_url}/rest/items)
(POST {base_url}/rest/staging/{component name})
 
(3 intermediate revisions by the same user not shown)
Line 161: Line 161:
  
 
===POST {base_url}/rest/staging/{component name}===
 
===POST {base_url}/rest/staging/{component name}===
<b>Files (Full Texts)</b> that should be attached to a certain item have to be staged before the creation of the item concerned.<br>
+
<b>Files (Full Texts)</b> that should be attached to a certain item have to be staged before the creation/update of the item concerned.<br>
 
The file name in the URL may differ from the original one. It will be included in the PubMan metadata.<br>
 
The file name in the URL may differ from the original one. It will be included in the PubMan metadata.<br>
 
Please make sure to include the (correct) file extension at the end of the file name!<br>
 
Please make sure to include the (correct) file extension at the end of the file name!<br>
Line 173: Line 173:
 
::<nowiki />*File in binary Base64 encoding
 
::<nowiki />*File in binary Base64 encoding
 
:CURL EXAMPLE
 
:CURL EXAMPLE
<syntaxhighlight lang="bash">curl -X POST "https://qa.pure.mpdl.mpg.de/rest/staging/123456xyz.pdf"  
+
<syntaxhighlight lang="bash">curl -X POST -F "data=@{file path - if your process is not already running within the file directory}123456xyz.pdf" "https://qa.pure.mpdl.mpg.de/rest/staging/123456xyz.pdf"  
 
-H "Authorization: {your_token_from_login}"</syntaxhighlight>
 
-H "Authorization: {your_token_from_login}"</syntaxhighlight>
 
<br><br>
 
<br><br>

Latest revision as of 09:27, 13 June 2019

The RESTRepresentational State Transfer APIApplication Programming Interface is reachable under:
{base_url}/rest/{endpoint} (e.g. the "items" section of the MPG.PuReMPG Publication Repository api: https://pure.mpg.de/rest/items/)

To get an overview over all endpoints you can call:
{base_url}/rest/swagger-ui.html (e.g. the MPG.PuReMPG Publication Repository overview: https://pure.mpg.de/rest/swagger-ui.html) - Be aware that the examples are not correct!

The documentation will lead youu through all the endpoints available in INGeInfrastructure Next Generation

Mandatory fields are marked with *

LOGIN - {base_url}

User authentication

POST {base_url}/login

Login with your credentials

HEADER
"Content-Type" - text/plain
BODY
{your_login_name}:{your_password}
CURL EXAMPLE
curl -X POST "https://dev.inge.mpdl.mpg.de/rest/login" -H 'Content-Type: text/plain' -d 
'mustermann:123456'


GET {base_url}/logout

HEADER
* "Authorization" - authorization token
CURL EXAMPLE
curl -X GET "https://dev.inge.mpdl.mpg.de/rest/login" -H "Authorization: {your_token_from_login}"


ITEMS - {base_url}/rest/items

Retrieve

Please note that you may receive more (or different versions) of the sought-after items, if you choose to apply a login at this point - depending on the status/visibility of those items/versions.

GET {base_url}/rest/items/{publication_id}

Retrieve one single publication with a specific id

HEADER
"Authorization" - authorization token
PARAMETER
-
CURL EXAMPLE
curl -X GET "https://dev.inge.mpdl.mpg.de/rest/items/item_123" -H "Authorization: {your_token_from_login}"


GET {base_url}/rest/items/{publication_id}/history

Retrieve version history for a single publication with a specific id

HEADER
"Authorization" - authorization token
PARAMETER
-
CURL EXAMPLE
curl -X GET "https://dev.inge.mpdl.mpg.de/rest/items/item_123/history" -H "Authorization: {your_token_from_login}"


GET {base_url}/rest/items/{publication_id}/component/{file_id}/content

Retrieve a file content with a specific file id belonging to a specific publication id

HEADER
"Authorization" - authorization token
PARAMETER
-
CURL EXAMPLE
curl -X GET "https://dev.inge.mpdl.mpg.de/rest/items/item_123/component/file_123/content" -H "Authorization: {your_token_from_login}"


GET {base_url}/rest/items/{publication_id}/component/{file_id}/metadata

Retrieve a file content with a specific file id belonging to a specific publication id

HEADER
"Authorization" - authorization token
PARAMETER
-
CURL EXAMPLE
curl -X GET "https://dev.inge.mpdl.mpg.de/rest/items/item_123/component/file_123/metadata" -H "Authorization: {your_token_from_login}"


POST {base_url}/rest/items/search

Search for publications with the possibility to retrieve different formats and citations.
If you are calling the APIApplication Programming Interface to fill your homepage with larger amounts of publications, please read the scrolling section. If you are logged in then you can retrieve all your publications including pending and submitted publications. This can lead to duplicates because in our search engine the latest version and the latest released version is present.

HEADER
* "Content-Type" - application/json
"Authorization" - authorization token
PARAMETER
"format" - json (DEFAULT), eSciDocEnhanced Scientific Documentation_Itemlist_Xml, BibTexReference Management Software for Lists of References, Endnote, Marc_Xml, pdfPortable Document Format (citation expected), docx (citation expected), html_plain (citation expected), html_linked (citation expected), json_citation (citation expected), escidoc_snippet (citation expected)
"citation" - (for formats "(citation expected)" this parameter is required) - CSL (requires cslConeId), APAAmerican Psychological Association, APAAmerican Psychological Association(CJK), AJPApache JServ Protocol, JUS
"cslConeId" - if citation "CSL" is chosen, this parameter is required - z.B. http://pubman.mpdl.mpg.de/cone/citation-styles/resource/citation-styles186418
"scroll" - true/false - enables scrolling -> if enabled following scrolling results can be retrieved via {base_url}/rest/items/search/scroll
BODY
an Elasticserach query
{
    "query": {
        // filter all items within the context of the MPDLMax Planck Digital Library Publikations Context
        "term": {
            "context.objectId": {
                "value": "ctx_28054",
                "boost": 1.0
            }
        }
    },
    "sort": [
        {
            // define a sort criteria
            "metadata.title.keyword": {
                "order": "ASC"
            }
        }
    ],
    // limit the number of records which will be returned
    "size": "50",
    // define a start record (offset)
    "from": "0"
}
CURL EXAMPLE
curl -X POST "https://dev.inge.mpdl.mpg.de/rest/items/search?format=json_citation&citation=CSL&cslConeId=https://dev.inge.mpdl.mpg.de/cone/citation-styles/resource/citation-styles186418" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
    "query": {
        "term": {
            "context.objectId": {
                "value": "ctx_28054",
                "boost": 1.0
            }
        }
    },
    "sort": [
        {
            "metadata.title.keyword": {
                "order": "ASC"
            }
        }
    ],
    "size": "50",
    "from": "0"
}'


SCROLLING
When doing requests with a high count of response publications, it is highly recommended to use scrolling. Scrolling will deliver the response in smaller packages (Default = 10 items) but you do not have to care about new entries, or the sorting, as you will get a saved response (server site) devided in smaller parts. You can define the number of items per package by using "size".


GET {base_url}/rest/items/search/scroll

Parameters are exaclty the same as for "POST {base_url}/rest/items/search" with the difference that you have no option to enable scrolling. Instead you can retrieve further scrolling results by adding the previous retrieved scrollId from a call to "POST {base_url}/rest/items/search".

HEADER
"Authorization" - authorization token
PARAMETER
"format" - json (DEFAULT), eSciDocEnhanced Scientific Documentation_Itemlist_Xml, BibTexReference Management Software for Lists of References, Endnote, Marc_Xml, pdfPortable Document Format (citation expected), docx (citation expected), html_plain (citation expected), html_linked (citation expected), json_citation (citation expected), escidoc_snippet (citation expected)
"citation" - (refer to formats "(citation expected)") CSL (requires cslConeId), APAAmerican Psychological Association, APAAmerican Psychological Association(CJK), AJPApache JServ Protocol, JUS
"cslConeId" - z.B. http://pubman.mpdl.mpg.de/cone/citation-styles/resource/citation-styles186418
"scrollId" - the scrollId you can retrieve via "POST {base_url}/rest/items/search", when you enable "scroll"
CURL EXAMPLE
curl -X GET "https://dev.inge.mpdl.mpg.de/rest/items/search?format=json_citation&citation=CSL&cslConeId=https://dev.inge.mpdl.mpg.de/cone/citation-styles/resource/citation-styles186418&scrollId=1A2B3C" 
-H "Authorization: {your_token_from_login}"


Ingest

POST {base_url}/rest/staging/{component name}

Files (Full Texts) that should be attached to a certain item have to be staged before the creation/update of the item concerned.
The file name in the URLUniform Resource Locator may differ from the original one. It will be included in the PubManPublication Management metadata.
Please make sure to include the (correct) file extension at the end of the file name!
The retrieved file IDIdentifier then can be included in the item metadata (see example in the "create" paragraph)

HEADER
* "Authorization" - authorization token
PARAMETER
-
BODY
*File in binary Base64 encoding
CURL EXAMPLE
curl -X POST  -F "data=@{file path - if your process is not already running within the file directory}123456xyz.pdfPortable Document Format" "https://qa.pure.mpdl.mpg.de/rest/staging/123456xyz.pdfPortable Document Format" 
-H "Authorization: {your_token_from_login}"


POST {base_url}/rest/items

Create a new item in the PubManPublication Management repository. Item status will be 'pending'.

HEADER
* "Authorization" - authorization token
* "Content-Type" - application/json
PARAMETER
-
BODY
* Item metadata in Json format. The Context-IDIdentifier needs to be provided.
{
 
        "context" : {
        "objectId" : "ctx_123456",
        "name" : "",
        "lastModificationDate" : "",
        "creationDate" : "",
        "creator" : {
          "objectId" : ""
        },
        "modifier" : {
          "objectId" : ""
        }
      },
      "localTags" : [ "Department1", "Website" ],
      "metadata" : {
        "title" : "Eigenvalue Outliers of Non-Hermitian Random Matrices with a Local Tree Structure",
        "creators" : [ {
          "person" : {
            "givenName" : "Izaak",
            "familyName" : "Neri",
            "organizations" : [ {
              "identifier" : "ou_2117288",
              "name" : "Max Planck Institute for the Physics of Complex Systems, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons184805",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "Fernando Lucas",
            "familyName" : "Metz",
            "organizations" : [ {
              "identifier" : "ou_persistent22",
              "name" : "external",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        } ],
        "datePublishedInPrint" : "2016-11-25",
        "datePublishedOnline" : "2016-11-23",
        "genre" : "ARTICLE",
        "identifiers" : [ {
          "id" : "000388630000013",
          "type" : "ISIInstitute for Scientific Information"
        }, {
          "id" : "10.1103/PhysRevLett.117.224101",
          "type" : "DOIDigital Object Identifier"
        } ],
        "sources" : [ {
          "title" : "Physical Review Letters",
          "alternativeTitles" : [ {
            "value" : "Phys. Rev. Lett.",
            "type" : "ABBREVIATION"
          } ],
          "volume" : "117",
          "issue" : "22",
          "sequenceNumber" : "224101",
          "publishingInfo" : {
            "place" : "Woodbury, N.Y.",
            "publisher" : "American Physical Society"
          },
          "identifiers" : [ {
            "id" : "0031-9007",
            "type" : "ISSNInternational Standard Serial Number"
          }, {
            "id" : "/journals/resource/954925433406_1",
            "type" : "CONEControl of Named Entities"
          } ],
          "genre" : "JOURNAL"
        } ],
        "subjects" : [ {
          "value" : "Stochastic processes",
          "type" : "MPIPKSMax-Planck-Institut für Physik komplexer Systeme"
        } ],
        "abstracts" : [ {
          "value" : "Spectra of sparse non-Hermitian random matrices determine the dynamics of complex processes on graphs. Eigenvalue outliers in the spectrum are of particular interest, since they determine the stationary state and the stability of dynamical processes. We present a general and exact theory for the eigenvalue outliers of random matrices with a local tree structure. For adjacency and Laplacian matrices of oriented random graphs, we derive analytical expressions for the eigenvalue outliers, the first moments of the distribution of eigenvector elements associated with an outlier, the support of the spectral density, and the spectral gap. We show that these spectral observables obey universal expressions, which hold for a broad class of oriented random matrices."
        } ]
      },
      "files" : [ {
        "objectId" : "",
        "name" : "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.117.224101",
        "lastModificationDate" : "",
        "creationDate" : "",
        "creator" : {
          "objectId" : ""
        },
        "visibility" : "PUBLIC",
        "content" : "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.117.224101",
        "storage" : "EXTERNAL_URLUniform Resource Locator",
        "checksum" : "",
        "checksumAlgorithm" : "MD5",
        "size" : 0,
        "metadata" : {
          "title" : "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.117.224101",
          "contentCategory" : "publisher-version",
          "size" : 0
        }
      } ]
    }
CURL EXAMPLE
curl -X POST "https://qa.pure.mpdl.mpg.de/rest/items" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
        "context" : {
        "objectId" : "ctx_persistent3",
        "name" : "",
        "lastModificationDate" : "",
        "creationDate" : "",
        "creator" : {
          "objectId" : ""
        },
        "modifier" : {
          "objectId" : ""
        }
      },
      "localTags" : [ ],
      "metadata" : {
        "title" : "Das ist ein Test",
        "creators" : [ {
          "person" : {
            "givenName" : "Laura",
            "familyName" : "Schmidt",
            "organizations" : [ {
              "identifier" : "ou_3015476",
              "name" : "Max Planck Institute for Mathematics in the Sciences, Max Planck Society",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        } ],
        "datePublishedInPrint" : "2019",
        "genre" : "BOOK",
        "identifiers" : [ {
          "id" : "978-123-4567-9809-3",
          "type" : "ISBNInternational Standard Book Number"
        }, {
          "id" : "10.1007/21435/45999",
          "type" : "DOIDigital Object Identifier"
        } ],
        "publishingInfo" : {
          "place" : "Teubner",
          "publisher" : "Leipzig"
        },
        "sources" : [ {
          "title" : "Lecture notes",
          "genre" : "SERIES"
        } ],
        "totalNumberOfPages" : "723"
      }
    }'
EXAMPLE of an item including a previously staged FILE
The file IDIdentifier received after successfully staging a file needs to be included (example IDIdentifier: 123456)
"files" : [ {
        "objectId" : "",
        "name" : "",
        "lastModificationDate" : "",
        "creationDate" : "",
        "creator" : {
          "objectId" : ""
        },
        "visibility" : "PUBLIC",
        "pid" : "",
        "content" : "123456",
        "storage" : "INTERNAL_MANAGED",
        "checksum" : "",
        "checksumAlgorithm" : "MD5",
        "mimeType" : "",
        "size" : 0,
        "metadata" : {
          "title" : "",
          "contentCategory" : "pre-print",
          "description" : "File downloaded from arXiv",
          "formats" : [ {
            "value" : "",
            "type" : ""
          } ],
          "size" : 0,
          "license" : "http://arxiv.org/licenses/nonexclusive-distrib/1.0/"
        }
      } ]

PUT {base_url}/rest/items/{itemId}

Update an existing item. This operation will create a new version of an existing item. The status of new version depends on the workflow and the former status of the item (could be: 'pending' or 'submitted').
It is recommended to fetch the actual version of the item from the repository in a first step to use it as a template. Thus, all data regarding time stamps, versions and status information should be correct. You can leave the complete (technical) system metadata in the head of the Json unchanged. PubManPublication Management will just ignore all unnecessary/redundant information in this part.
Just include the desired changes in the publication metadata and start the update via RESTRepresentational State Transfer.
When using the export function of PubManPublication Management, just make sure to remove the initial lines on top:

  "numberOfRecords" : 1,
  "records" : [ {
    "data" : {


HEADER
* "Authorization" - authorization token
* "Content-Type" - application/json
PARAMETER
-
BODY
* Updated item metadata in Json format. Some mandataory system information (e.g. last modification date) need to be provided (see example below).
{
      "objectId" : "item_3015660",
      "versionNumber" : 2,
      "modificationDate" : "2019-04-10T08:06:34.452+0000",
      "versionState" : "RELEASED",
      "versionPid" : "",
      "modifier" : {
        "objectId" : ""
      },
      "lastModificationDate" : "2019-04-10T08:06:34.452+0000",
      "publicState" : "RELEASED",
      "objectPid" : "",
      "creator" : {
        "objectId" : ""
      },
      "localTags" : [ ],
      "metadata" : {
        "title" : "Damage-free single-mode transmission of deep-UV light in hollow-core PCF",
        "creators" : [ {
          "person" : {
            "givenName" : "F.",
            "familyName" : "Gebert",
            "organizations" : [ {
              "identifier" : "ou_persistent22",
              "name" : "external",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "M. H.",
            "familyName" : "Frosz",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            }, {
              "address" : "Staudtstraße 2, 91058 Erlangen, DE",
              "identifier" : "ou_2364724",
              "name" : "Fibre Fabrication and Glass Studio, Technology Development and Service Units, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201064",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "T.",
            "familyName" : "Weiss",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201231",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "Y.",
            "familyName" : "Wan",
            "organizations" : [ {
              "identifier" : "ou_persistent22",
              "name" : "external",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "A.",
            "familyName" : "Ermolov",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201055",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "N. Y.",
            "familyName" : "Joly",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201100",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "P. O.",
            "familyName" : "Schmidt",
            "organizations" : [ {
              "identifier" : "ou_persistent22",
              "name" : "external",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "P. St. J.",
            "familyName" : "Russell",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201171",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        } ],
        "datePublishedInPrint" : "2014",
        "genre" : "ARTICLE",
        "identifiers" : [ {
          "id" : "000338055900026",
          "type" : "ISIInstitute for Scientific Information"
        }, {
          "id" : "10.1364/OE.22.015388",
          "type" : "DOIDigital Object Identifier"
        }, {
          "id" : "1234567",
          "type" : "OTHER"
        } ],
        "languages" : [ "eng" ],
        "sources" : [ {
          "title" : "OPTICS EXPRESS",
          "volume" : "22",
          "issue" : "13",
          "startPage" : "15388",
          "endPage" : "15396",
          "publishingInfo" : {
            "place" : "2010 MASSACHUSETTS AVE NW, WASHINGTON, DCDublin Core 20036 USA",
            "publisher" : "OPTICAL SOC AMER"
          },
          "identifiers" : [ {
            "id" : "1094-4087",
            "type" : "ISSNInternational Standard Serial Number"
          } ],
          "genre" : "JOURNAL",
          "totalNumberOfPages" : "999"
        } ],
        "freeKeywords" : "PHOTONIC CRYSTAL FIBER; TRAPPED IONS; DESIGN; SILICA; WAVE; NMOptics; ",
        "totalNumberOfPages" : "9",
        "abstracts" : [ {
          "value" : "Transmission of UV light with high beam quality and pointing stability is desirable for many experiments in atomic, molecular and optical physics. In particular, laser cooling and coherent manipulation of trapped ions with transitions in the UV require stable, single-mode light delivery. Transmitting even similar to 2 mW CW light at 280 nm through silica solid-core fibers has previously been found to cause transmission degradation after just a few hours due to optical damage. We show that photonic crystal fiber of the kagome type can be used for effectively single-mode transmission with acceptable loss and bending sensitivity. No transmission degradation was observed even after >100 hours of operation with 15 mW CW input power. In addition it is shown that implementation of the fiber in a trapped ion experiment increases the coherence time of the internal state transfer due to an increase in beam pointing stability. (C) 2014 Optical Society of America"
        } ]
      }
    }
CURL EXAMPLE
curl -X PUT "https://qa.pure.mpdl.mpg.de/rest/items/item_3015660" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
      "objectId" : "item_3015660",
      "versionNumber" : 2,
      "modificationDate" : "2019-04-10T08:06:34.452+0000",
      "versionState" : "RELEASED",
      "versionPid" : "",
      "modifier" : {
        "objectId" : ""
      },
      "lastModificationDate" : "2019-04-10T08:06:34.452+0000",
      "publicState" : "RELEASED",
      "objectPid" : "",
      "creator" : {
        "objectId" : ""
      },
      "localTags" : [ ],
      "metadata" : {
        "title" : "Damage-free single-mode transmission of deep-UV light in hollow-core PCF",
        "creators" : [ {
          "person" : {
            "givenName" : "F.",
            "familyName" : "Gebert",
            "organizations" : [ {
              "identifier" : "ou_persistent22",
              "name" : "external",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "M. H.",
            "familyName" : "Frosz",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            }, {
              "address" : "Staudtstraße 2, 91058 Erlangen, DE",
              "identifier" : "ou_2364724",
              "name" : "Fibre Fabrication and Glass Studio, Technology Development and Service Units, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201064",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "T.",
            "familyName" : "Weiss",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201231",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "Y.",
            "familyName" : "Wan",
            "organizations" : [ {
              "identifier" : "ou_persistent22",
              "name" : "external",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "A.",
            "familyName" : "Ermolov",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201055",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "N. Y.",
            "familyName" : "Joly",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201100",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "P. O.",
            "familyName" : "Schmidt",
            "organizations" : [ {
              "identifier" : "ou_persistent22",
              "name" : "external",
              "identifierPath" : [ "" ]
            } ]
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        }, {
          "person" : {
            "givenName" : "P. St. J.",
            "familyName" : "Russell",
            "organizations" : [ {
              "identifier" : "ou_2364721",
              "name" : "Russell Division, Max Planck Institute for the Science of Light, Max Planck Society",
              "identifierPath" : [ "" ]
            } ],
            "identifier" : {
              "id" : "/persons/resource/persons201171",
              "type" : "CONEControl of Named Entities"
            }
          },
          "role" : "AUTHOR",
          "type" : "PERSON"
        } ],
        "datePublishedInPrint" : "2014",
        "genre" : "ARTICLE",
        "identifiers" : [ {
          "id" : "000338055900026",
          "type" : "ISIInstitute for Scientific Information"
        }, {
          "id" : "10.1364/OE.22.015388",
          "type" : "DOIDigital Object Identifier"
        }, {
          "id" : "1234567",
          "type" : "OTHER"
        } ],
        "languages" : [ "eng" ],
        "sources" : [ {
          "title" : "OPTICS EXPRESS",
          "volume" : "22",
          "issue" : "13",
          "startPage" : "15388",
          "endPage" : "15396",
          "publishingInfo" : {
            "place" : "2010 MASSACHUSETTS AVE NW, WASHINGTON, DCDublin Core 20036 USA",
            "publisher" : "OPTICAL SOC AMER"
          },
          "identifiers" : [ {
            "id" : "1094-4087",
            "type" : "ISSNInternational Standard Serial Number"
          } ],
          "genre" : "JOURNAL",
          "totalNumberOfPages" : "999"
        } ],
        "freeKeywords" : "PHOTONIC CRYSTAL FIBER; TRAPPED IONS; DESIGN; SILICA; WAVE; NMOptics; ",
        "totalNumberOfPages" : "9",
        "abstracts" : [ {
          "value" : "Transmission of UV light with high beam quality and pointing stability is desirable for many experiments in atomic, molecular and optical physics. In particular, laser cooling and coherent manipulation of trapped ions with transitions in the UV require stable, single-mode light delivery. Transmitting even similar to 2 mW CW light at 280 nm through silica solid-core fibers has previously been found to cause transmission degradation after just a few hours due to optical damage. We show that photonic crystal fiber of the kagome type can be used for effectively single-mode transmission with acceptable loss and bending sensitivity. No transmission degradation was observed even after >100 hours of operation with 15 mW CW input power. In addition it is shown that implementation of the fiber in a trapped ion experiment increases the coherence time of the internal state transfer due to an increase in beam pointing stability. (C) 2014 Optical Society of America"
        } ]
      }
    }'

DELETE {base_url}/rest/items/{itemID}

Completely erase items from the repository. Only possible for items in status 'pending' (which haven't been released yet).

HEADER
* "Authorization" - authorization token
* "Content-Type" - application/json
PARAMETER
*lastModificationDate
BODY
Last modification date
{
  "lastModificationDate": "2018-11-19T09:22:01.035+0000"
}
CURL EXAMPLE
curl -X DELETE "https://qa.pure.mpdl.mpg.de/rest/items/item_3005911" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
  "lastModificationDate": "2018-11-19T09:22:01.035+0000"
}'


PUT {base_url}/rest/items/{itemID}/submit

Change the item status to 'submitted'.
Only possible, if the context attached to the item is set to 'standard workflow'.

HEADER
* "Authorization" - authorization token
* "Content-Type" - application/json
PARAMETER
* lastModificationDate
comment
BODY
{
  "comment": "Item Submitted by MPDLMax Planck Digital Library Administrator",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}
CURL EXAMPLE
curl -X PUT "https://qa.pure.mpdl.mpg.de/rest/items/item_3005906/submit" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
  "comment": "Item Submitted by MPDLMax Planck Digital Library Administrator",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}'


PUT {base_url}/rest/items/{itemID}/release

Release an existing items in status 'pending' (simple workflow) or 'submitted' (standard workflow).
Please note: Once released, an item cannot be completely erased, but only discarded (=> withdraw).

HEADER
* "Authorization" - authorization token
* "Content-Type" - application/json
PARAMETER
* lastModificationDate
comment
BODY
{
  "comment": "Item Released by MPDLMax Planck Digital Library Administrator",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}
CURL EXAMPLE
curl -X PUT "https://qa.pure.mpdl.mpg.de/rest/items/item_3005906/release" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
  "comment": "Item Released by MPDLMax Planck Digital Library Administrator",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}'


PUT {base_url}/rest/items/{itemID}/withdraw

Discard an item in status 'released'. Cannot be undone!
The item metadata will be cut, it will be erased from the seacrh index of your repository and will not be newly indexed my search engines.

HEADER
*"Authorization" - authorization token
* "Content-Type" - application/json
PARAMETER
* lastModificationDate
* comment
BODY
{
  "comment": "Duplicate discarded by MPDLMax Planck Digital Library Administrator",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}
CURL EXAMPLE
curl -X PUT "https://qa.pure.mpdl.mpg.de/rest/items/item_3005906/withdraw" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
  "comment": "Duplicate discarded by MPDLMax Planck Digital Library Administrator",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}'


PUT {base_url}/rest/items/{itemID}/revise

Only possible for items in status 'submitted' (standard workflow) which haven't been released yet.
The item will be set back to status 'pending' and thus can be deleted.

HEADER
* "Authorization" - authorization token
* "Content-Type" - application/json
PARAMETER
* lastModificationDate
comment
BODY
{
  "comment": "Please add Page Numbers",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}
CURL EXAMPLE
curl -X PUT "https://qa.pure.mpdl.mpg.de/rest/items/item_3005906/revise" 
-H "Authorization: {your_token_from_login}" -H 'Content-Type: application/json' -d 
'{
  "comment": "Please add Page Numbers",
  "lastModificationDate": "2018-11-19T09:21:59.313+0000"
}'