DPLA Metadata upload using Python Requests

Using this example:
File upload via REST API??
(From my understanding, the three lines with “ingester”, “file_index”, and “o:item” are required.)
I want to upload metadata from the DPLA API.
To acquire the metadata, I am using DPyLA and and the resulting data for one is a multidimensional dictionary:
(In the original output, there were no linebreaks and I replaced large parts with “. . .” for length and ‘originalRecord’ included repeated data.)


{‘id’: ‘335d4334c69819050e1dcce07b7333a4’,
@context’: ‘http://dp.la/api/items/context’,
@id’: ‘http://dp.la/api/items/335d4334c69819050e1dcce07b7333a4’,
. . .
‘object’: ‘http://dpanther.fiu.edu/sobek/content/FI/SP/00/42/57/00001/FISP004257_00001_EvergladesScan_091212_061_00056thm.jpg’,
‘originalRecord’: {‘stringValue’: ‘{
\n “@context” : “http://api.dp.la/items/context”,
. . .
\n}’},
‘provider’: {’@id’: ‘http://dp.la/api/contributor/florida’,
‘name’: ‘Sunshine State Digital Network’},
‘sourceResource’: {’@id’: ‘http://dp.la/api/items/335d4334c69819050e1dcce07b7333a4#SourceResource’,
. . .
‘subject’: [{‘name’: ‘Florida–Everglades National Park’}],
‘title’: [‘Everglades’],
‘type’: [‘image’]},
@type’: ‘ore:Aggregation’}


Can this be my JSON payload or do I need to format/ cherry-pick the data for upload? If I do need to format it, does it have to be done manually?
Are there any Data Types or Resource Templates I could use/ make and how could I use those?

Thank you for your time, any information helps! : )

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.