Skip to content
rasta edited this page Oct 3, 2023 · 2 revisions

POST https://services.phaidra-sandbox.univie.ac.at/object/o:123/metadata

Param Value
metadata See JSON-LD example

Request example:

curl -X POST -u username:password -F [email protected] https://services.phaidra-sandbox.univie.ac.at/api/object/o:123/metadata

The whole metadata record must be posted. You can get it first simply by calling GET instead of POST on api/object/o:123/metadata.

You can also send metadata as form param "metadata" (instead of sending it as a file).

JSON-LD example:

{
  "metadata": {
    "json-ld": {
      "dcterms:type": [
        {
          "@type": "skos:Concept",
          "skos:exactMatch": [
            "https://pid.phaidra.org/vocabulary/44TN-P1S0"
          ],
          "skos:prefLabel": [
            {
              "@language": "eng",
              "@value": "image"
            }
          ]
        }
      ],
      "edm:hasType": [
        {
          "@type": "skos:Concept",
          "skos:exactMatch": [
            "https://pid.phaidra.org/vocabulary/Q4Q5-3554"
          ],
          "skos:prefLabel": [
            {
              "@language": "eng",
              "@value": "postcard"
            }
          ]
        }
      ],
      "dce:title": [
        {
          "@type": "bf:Title",
          "bf:mainTitle": [
            {
              "@value": "Ein besseres Titel",
              "@language": "deu"
            }
          ]
        }
      ],
      "role:aut": [
        {
          "@type": "schema:Person",
          "schema:familyName": [
            {
              "@value": "Max"
            }
          ],
          "schema:givenName": [
            {
              "@value": "Mustermann"
            }
          ]
        }
      ],
      "dce:subject": [
        {
          "@type": "skos:Concept",
          "skos:prefLabel": [
            {
              "@value": "war",
              "@language": "eng"
            }
          ]
        },
        {
          "@type": "skos:Concept",
          "skos:prefLabel": [
            {
              "@value": "Krieg",
              "@language": "deu"
            }
          ]
        },
        {
          "@type": "skos:Concept",
          "skos:prefLabel": [
            {
              "@value": "Marine",
              "@language": "deu"
            }
          ]
        }
      ],
      "bf:note" : [
        {
           "skos:prefLabel" : [
              {
                 "@value" : "Eine Feldpostkarte der 1.Marine Division.",
                 "@language" : "deu"
              }
           ],
           "@type" : "bf:Summary"
        }
      ],
      "vra:hasInscription": [
        {
          "@type": "vra:Inscription",
          "skos:prefLabel": [
            {
              "@value": "Briefstempel / Kaiserliche Marine / Divisionsboot D 7",
              "@language": "deu"
            }
          ]
        }
      ],
      "dcterms:language" : [
        "deu"
      ],
      "ebucore:filename": [
        "feldpostkarte.jpg"
      ],
      "ebucore:hasMimeType": [
        "image/jpeg"
      ],
      "edm:rights": [
        "http://rightsstatements.org/vocab/InC/1.0/"
      ]
    }
  }
}

There are other datastreams which can be sent as main metadata (UWMETADATA, MODS) or additional metadata (GEO, ANNOTATIONS, ...), examples of which you can find here.