Skip to content

ContractForPostingData

Tyler Danstrom edited this page Aug 15, 2017 · 1 revision

About sending POST data

The ldr metadata storage has the functionality to allow clients to add new collections to the system.

The following endpoint accepts POST data

  • /collection/[collection identifier]

The POST request will accept a submission that includes the following

  • MANDATORY core metadata
  • OPTIONAL proxy metadata

The POST submission data must conform to the following

  • have a root field named input
  • output will have the following namespaces
    • http://lib.uchicago.edu/ldr which this document refers to with the shorthand ldr
    • http://www.w3.org/2001/XMLSchema-instance which this document refers to with the shorthand xsi
    • http://purl.org/dc/elements/1.1/ which this document refers to with the shorthand dc
    • http://purl.org/dc/terms/ which this document refers to with the shorthand dcterms
  • have a field core which contains metadata that follows the instructions for a /collection/[collection identifier]/core
  • may have a field proxies which contains at least one proxy field which must a field data
  • field data MUST contain base64 representation of a proxy metadata
  • a proxy field may have a field dc:description
<?xml version="1.0" encoding="utf-8"?>
<input xmlns="http://lib.uchicago.edu/ldr"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       xmlns:dcterms="http://purl.org/dc/terms/">
    <request>/collections/campub</request>
    <requestSentTimeStamp>2017-07-02T11:14:55-06:00<requestSentTimeStamp>
    <core>
        <metadata>
            <dc:title>Campus Publications Digital Collection</dc:title>
            <dc:identifier>campub</dc:identifier>
            <dc:description>This is a digital collection consisting of campus publications</dc:description>
        </metadata>
    </core>
</input>
<?xml version="1.0" encoding="utf-8"?>
<input xmlns="http://lib.uchicago.edu/ldr"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       xmlns:dcterms="http://purl.org/dc/terms/">
    <request>/collection/remote-collection-book1</request>
    <requestSentTimeStamp>2017-07-02T11:14:55-06:00<requestSentTimeStamp>
    <core>
        <metadata>
            <dc:title>This is a title</dc:title>
            <dc:creator>Doe, John</dc:title>
            <dc:date>1980-02-16</dc:date>
            <dc:identifier>remote-collection-book1</dc:identifier>
            <dc:isPartOf xsi:type="URI">/collections/remote/book1</dc:isPartOf>
        </metadata>
    </core>
</input>
<?xml version="1.0" encoding="utf-8"?>
<input xmlns="http://lib.uchicago.edu/ldr"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       xmlns:dcterms="http://purl.org/dc/terms/">
    <request>/collection/speculum-01204</request>
    <requestSentTimeStamp>2017-07-02T11:14:55-06:00<requestSentTimeStamp>
    <core>
        <metadata>
            <dc:title>This is a title</dc:title>
            <dc:creator>John Doe</dc:title>
            <dc:date>1980-02-16</dc:date>
            <dc:identifier>mvol-0001-0002-0004</dc:identifier>
            <dc:isPartOf xsi:type="dcterms:URI">/collection/mvol/0001/0002/0004</dc:relation>
            <dc:hasPart xsi:type:URL="dcterms:URL">http://digcollretriever.lib.uchicago/mvol-0001-0002-0004/pdf</dc:hasPart>
            <dc:hasPart xsi:type:URL="dcterms:URL">http://digcollretriever.lib.uchicago/mvol-0001-0002-0004_0001/jpg</dc:hasPart>
            <dc:hasPart xsi:type:URL="dcterms:URL">http://digcollretriever.lib.uchicago/mvol-0001-0002-0004_0002/jpg</dc:hasPart>
            <dc:hasPart xsi:type:URL="dcterms:URL">http://digcollretriever.lib.uchicago/mvol-0001-0002-0004_0003/jpg</dc:hasPart>
            <dc:hasPart xsi:type:URL="dcterms:URL">http://digcollretriever.lib.uchicago/mvol-0001-0002-0004_0004/jpg</dc:hasPart>
        </metadata>
    </core>
</input>
<?xml version="1.0" encoding="utf-8"?>
<input xmlns="http://lib.uchiago.edu/ldr"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       xmlns:dcterms="http://purl.org/dc/terms/">
    <request>/unit/mvol-0001-0002-0004</request>
    <requestSentTimeStamp>2017-07-02T11:14:55-06:00<requestSentTimeStamp>
    <core>
        <metadata>
            <dc:title>This is a title</dc:title>
            <dc:creator>John Doe</dc:title>
            <dc:date>1980-02-16</dc:date>
            <dc:identifier xsi:type="dcterms:URI">/mvol-0001-0002-0004</dc:identifier>
            <dc:relation xsi:type="dcterms:URI">/collections/campub</dc:relation>
        </metadata>
    </core>
    <proxies>
        <proxy>
            <dc:description>[insert some description of how this proxy metadata is relevant to the core metadata that it is a proxy for]
            <data>
                <!-- insert base64 content here -->
            </data>
        </proxy>
    </proxies>
</input>