Below is an example of creating a Journal Article, presented on the left in the E-Link 1 241.1 XML API, and on the right using the E-Link 2 JSON. Note that whereas both insert and update operations in E-Link 1 use the HTTP POST method, the E-Link 2 JSON REST APIs support POST for inserting new records, and PUT operation for updating existing records. The JSON schema is the same, but the differing operation "verbs" reduce the ambiguity as to the intention. More details are available in the online documentation.
Hovering over tag fields in the XML on the left will highlight equivalent JSON on the right. Many of the XML tag names to JSON fields were preserved where feasible, but note that various persons, organizations, and identifiers have been grouped together with types in JSON in order to consolidate metadata information. Note that these fields in XML are no longer applicable or have been deprecated.
POST /elink/2411api
<?xml version="1.0" encoding="UTF-8"?>
<records>
<record>
<title>Title of the record</title>
<access_limitation>
<unl/>
</access_limitation>
<journal_name>Journal of Journal Names</journal_name>
<journal_type>AM</journal_type>
<doi>10.5072/0007</doi>
<product_size>p. 12-55</product_size>
<journal_serial_id>ISSN 1464-4266</journal_serial_id>
<journal_issue>7</journal_issue>
<journal_volume>3</journal_volume>
<authors>
<authors_detail>
<first_name>Author</first_name>
<last_name>One</last_name>
<private_email>oneguy@private.email.com</private_email>
</authors_detail>
<authors_detail>
<first_name>Author</first_name>
<last_name>Two</last_name>
</authors_detail>
<authors_detail>
<first_name>Author</first_name>
<last_name>Three</last_name>
</authors_detail>
</authors>
<related_doc_info>Related Resource information</related_doc_info>
<report_nos>product-001</report_nos>
<product_type>JA</product_type>
<doe_contract_nos>DOE-CONTRACT-001</doe_contract_nos>
<other_identifying_nos>01234</other_identifying_nos>
<originating_research_org>A Research University (United States)</originating_research_org>
<availability>Direct paper publishing information</availability>
<publication_date>2014</publication_date>
<language>English</language>
<country_publication_code>US</country_publication_code>
<site_input_code>OSTI</site_input_code>
<sponsor_org>USDOE Office of Science (SC)</sponsor_org>
<subject_category_code>Testing; Final Report</subject_category_code>
<keywords>Data Sources; Measuring; Scientific Method</keywords>
<description>A simple abstract description of the data set and its research
information.</description>
<relidentifiersblock>
<relidentifier_detail>
<related_identifier>10.5072/0007</related_identifier>
<related_identifier_type>DOI</related_identifier_type>
<relation_type>IsPreviousVersionOf</relation_type>
</relidentifier_detail>
<relidentifier_detail>
<related_identifier>10.5072/journal.2007.01529.x</related_identifier>
<related_identifier_type>DOI</related_identifier_type>
<relation_type>IsCompiledBy</relation_type>
</relidentifier_detail>
</relidentifiersblock>
<file_format>xls</file_format>
<software_needed>Excel or other spreadsheet software</software_needed>
<medium_code>ED</medium_code>
<released_by>Mark Releaser</released_by>
<released_by_email>releaserm@osti.gov</released_by_email>
<released_by_phone>888-241-5926</released_by_phone>
<released_date>2019-10-01</released_date>
</record>
</records>
PUT /elink2api/records/1318659
{
"title": "Title of the record",
"access_limitations": [
"UNL"
],
"journal_name": "Journal of Journal Names",
"journal_type": "AM",
"doi": "10.5072/007",
"product_size": "p. 12-55",
"issue": "7",
"volume": "3" ,
"persons": [
{
"first_name": "Author",
"last_name": "One",
"email": [
"oneguy@private.email.com"
],
"type": "AUTHOR"
},
{
"first_name": "Author",
"last_name": "Two",
"type": "AUTHOR"
},
{
"first_name": "Author",
"last_name": "Three",
"type": "AUTHOR"
},
{
"first_name": "Mark",
"last_name": "Releaser",
"type": "RELEASE",
"phone":"888-241-5926",
"email": [
"releaserm@osti.gov"
]
}
],
"product_type": "JA",
"identifiers": [
{
"type": "RN",
"value": "product-001"
},
{
"type": "ISSN",
"value": "1464-4266"
},
{
"type": "OTHER_ID",
"value": "01234"
}
],
"organizations": [
{
"type": "RESEARCHING",
"name": "A Research University (United States)"
},
{
"type": "SPONSOR",
"name": "USDOE Office of Science (SC)",
"identifiers": [
{
"type": "CN_DOE",
"value": "DOE-CONTRACT-001"
}
]
}
],
"availability": "Direct paper publishing information",
"publication_date": "2014",
"languages": [
"English"
],
"country_publication_code": "US",
"site_unique_id": "123456789",
"site_ownership_code": "OSTI",
"keywords": [
"Data Sources",
"Measuring",
"Scientific Method"
],
"description": "A simple abstract description of the data set and its research information.",
"related_doc_info": "Related Resource information",
"related_identifiers": [
{
"value": "10.5072/0007",
"relation": "IsPreviousVersionOf",
"type": "DOI"
},
{
"value": "10.5072/journal.2007.01529.x",
"type": "DOI",
"relation": "IsCompiledBy"
}
],
"released_to_osti_date": "2019-10-01"
}