{"lab": {"correspondence": [{"contact_email": "cGV0ZXJfcGFya0BobXMuaGFydmFyZC5lZHU=", "@id": "/users/fb287a31-e765-41c5-8c1d-665f8e9f025b/", "display_title": "Peter Park"}], "status": "current", "display_title": "4DN DCIC, HMS", "uuid": "828cd4fe-ebb0-4b36-a94a-d2e3a36cc989", "title": "4DN DCIC, HMS", "@type": ["Lab", "Item"], "@id": "/labs/4dn-dcic-lab/", "pi": {"error": "no view permissions"}, "principals_allowed": {"view": ["system.Everyone"], "edit": ["group.admin", "role.lab_submitter", "submits_for.828cd4fe-ebb0-4b36-a94a-d2e3a36cc989"]}}, "body": "Overview\n========\n\nThe 4DN-DCIC metadata database can be accessed using a Hypertext-Transfer-Protocol-(HTTP)-based, Representational-state-transfer (RESTful) application programming interface (API) - aka the REST API. In fact, this API is used by the ``import_data`` script used to submit metadata entered into excel spreadsheets as described `on this page </help/submitter-guide/spreadsheet-submission>`_. This API was developed by the `ENCODE`_ project so if you have experience retrieving data from or submitting data to ENCODE, use of the 4DN-DCIC API should be familiar to you. The REST API can be used both for data submission and data retrieval, typically using scripts written in your language of choice. Data objects exchanged with the server conform to the standard JavaScript Object Notation (JSON) format. Libraries written for use with your chosen language are typically used for the network connection, data transfer, and parsing of data (for example, requests and json, respectively for Python). For a good introduction to scripting data retrieval (using GET requests) you can refer to `this page <https://www.encodeproject.org/help/rest-api/>`_ on the `ENCODE`_ web site that also has a good introduction to viewing and understanding JSON formatted data.\n\n.. _ENCODE: https://www.encodeproject.org/\n\nConnecting to the server\n========================\n\nYour script will need to use an access key and secret that you can obtain by following `these instructions </help/submitter-guide/getting-started-with-submissions#getting-connection-keys-for-the-4dn-dcic-servers>`_ to connect to the server. Exactly how you format and pass the connection information to the server depends on your scripting language and the libraries that you use with it.\n\n**Base URL for submitting and fetching data are:** `<https://data.4dnucleome.org/>`_\n\nYou can refer to the ``FDN_key`` and ``FDN_connection`` classes in `the get_field_info.py library <https://github.com/4dn-dcic/Submit4DN/blob/master/wranglertools/get_field_info.py>`_ in Submit4DN for an example of how to generate the necessary information that will be passed to the server with each request.\n\nIdentifying specific items\n==========================\n\nYour script will need to add a uniquely identifying token to the Base URL in order to GET, POST or PATCH metadata for that item. IDs that can be used include: uuids, accessions, certain type specific identifiers and aliases. See the sections on `'Using Aliases' and 'Referencing existing items' </help/submitter-guide/getting-started-with-submissions#referencing-existing-objects>`_ for the types of identifiers that can be used in your requests.\n\nOrdering of POST requests\n=========================\n\nBecause in many cases fields in one Item may refer to another Item, e.g., the ``biosample`` field in the ``experiment_hi_c`` schema, it is necessary to POST the referenced item prior to POSTing the item that refers to it. A sensible POSTing order is specified in the ``sheet_order`` array located around line 228 in the `get_field_info.py <https://github.com/4dn-dcic/Submit4DN/blob/master/wranglertools/get_field_info.py>`_ library.\n\nJSON formatting\n===============\n\nThe most important component of your submission is the proper formatting of the data into json so it will map correctly onto the 4DN metadata schemas. The details of the schemas for all object types in the database can be viewed at `<https://data.4dnucleome.org/profiles/>`_. Individual schemas can be viewed and/or retrieved via GET by appending the schema file name to the above URL (e.g., for the Hi-C experiment schema `<https://data.4dnucleome.org/profiles/experiment_hi_c.json>`_). For a listing of all schema files and associated resource names see `this table </help/submitter-guide/getting-started-with-submissions#schema-information>`_, which should be up to date with the current schemas in the database.\n\nDepending on the Item type that you are submitting there may be fields that require values (e.g., *experiment_type* for experiments), fields for which values should never be submitted (e.g., \u2018date_created\u2019 as this is an automatically generated value) and fields with specific formatting and fields that accept values of specific types. In many cases, the values must be selected from a list of constrained choices. The documentation on field values `described in detail here </help/submitter-guide/spreadsheet-submission#preparing-excel-workbooks>`_ and the annotated json document below can be used as a guide on formatting your json. In addition, the unordered and unfiltered excel workbooks produced by ``get_field_info`` can be a useful reference for determining exactly what fields are associated with what object types. The processed workbook that is actually used for data submission does not reflect the exact schema structure **should not** be used as a direct reference for API submission.\n\n**JSON for an ExperimentHiC POST request** ::\n\n    {\n        \"lab\": \"4dn-dcic-lab\",\n        \"award\": \"/awards/OD008540-01/\",\n        \"aliases\": [\"dcic:myalias\"]\n        \"experiment_type\": \"in situ Hi-C\",\n        \"biosample\":\"4DNBS1NUPXMH\",\n        \"biosample_quantity\": 2000000,\n        \"biosample_quantity_units\": \"cells\",\n        \"dbxrefs\": [\"SRA:SRX764985\", \"GEO:GSM1551599\"],\n        \"description\": \"A useful description of this experiment\",\n        \"documents\": [\"dcf15d5e-40aa-43bc-b81c-32c70c9afb01\"],\n        \"experiment_relation\":[{\"relationship_type\":\"controlled by\",\"experiment\":\"4DNEX067APU1\"}],\n        \"experiment_sets\":[\"431106bc-8535-4448-903e-854af460b260\"],\n        \"files\": [\"4DNFI067APU1\", \"4DNFI067APU2\", \"4DNFI067APA1\"],\n        \"filesets\": [\"4d6ecff9-7c67-4096-bca8-515246767feb\"],\n        \"follows_sop\": \"Yes\",\n        \"crosslinking_method\": \"1% Formaldehyde\",\n        \"crosslinking_time\": 30,\n        \"crosslinking_temperature\": 37,\n        \"digestion_enzyme\": \"MboI\",\n        \"enzyme_lot_number\": \"123456\",\n        \"digestion_temperature\": 37,\n        \"digestion_time\": 30,\n        \"ligation_time\": 30,\n        \"ligation_temperature\": 37,\n        \"ligation_volume\": 1,\n        \"tagging_method\": \"Biotinylated ATP\",\n        \"fragmentation_method\": \"chemical\",\n        \"average_fragment_size\": 100,\n        \"notes\": \"sample dcic notes\",\n        \"protocol\": \"131106bc-8535-4448-903e-854af460b244\"\n    }\n\n**Field specification - how to find out what fields need what format, when to provide values and other useful tips**\n\nThe three fields below are common to every Item - you don't always need to include aliases but they will make some things a lot easier.::\n\n    \"lab\": \"4dn-dcic-lab\",  # required for POST with value of an existing lab identifier - this is an alias\n    \"award\": \"/awards/OD008540-01/\", # required for POST with value of an existing award identifier - this a specific item type identifier\n    \"aliases\": [\"dcic:myalias\", \"dcic:myotheralias\"], # POST or PATCH an array with values that can be used as identifiers\n\nAccession and uuid are automatically assigned during initial posting so can only be used as identifiers to PATCH existing Items - not for POSTing. Note that all item types have a uuid but not all items have accessions.::\n\n    \"accession\":\"4DNEX067APU1\", # PATCH ONLY can be used as an identifier - automatically assigned on POST\n    \"uuid\": \"75041e2f-3e43-4388-8bbb-e861f209c444\", # PATCH ONLY can be used as an identifier - automatically assigned on POST\n\nWhile we encourage you to submit as many fields as possible there are some fields that are absolutely required to post an item. These required fields are identified in the \"required\" field of the schema.::\n\n    \"required\": [\n        \"experiment_type\",\n        \"award\",\n        \"lab\",\n        \"biosample\"\n    ],\n\nIf they are left out of a POST request will cause an error. You don't need to include required fields if you are PATCHing an existing Item.::\n\n    \"experiment_type\": \"in situ Hi-C\", # required for POST string field\n    \"biosample\":\"231111bc-8535-4448-903e-854af460b254\", # required for POST with value of an alias used in Biosample sheet or previously existing biosample identifier\n\nThere are number fields and string fields - the field type can be found by referring to the schema directly or the workbook templates produced by ``get_field_info``. ::\n\n   \"biosample_quantity_units\": {\n        \"title\": \"Quantity Units\",\n        \"description\": \"The units that go along with the biological sample quantity\",\n        \"enum\": [\n            \"g\",\n            \"mg\",\n            \"cells\",\n            \"\u00b5l\",\n            \"ml\",\n            \"ng/\u00b5l\",\n            \"nM\"\n        ],\n        \"type\": \"string\"\n    },\n\nAs you can see the specific field can be found by searching through the schema. If the field is an enum type (sometimes the choices are referred to as controlled vocabularies) your value must match one of the possible entries exactly.::\n\n   \"crosslinking_method\": {\n        \"title\": \"Crosslinking Method\",\n        \"description\": \"The method by which the sample was crosslinked\",\n        \"enum\": [\n            \"3% Formaldehyde\",\n            \"1% Formaldehyde\",\n            \"Fresh Frozen\"\n        ],\n        \"type\": \"string\"\n    },\n\nDates should be submitted in a standard way. Here's an example of an automatically generated date ::\n\n    \"date_created\": \"2017-06-27T16:12:02.601238+00:00\"\n\nA full list of the Item types and their fields is also presented in `this table </help/submitter-guide/getting-started-with-submissions#field-tips>`__. Note that the list below is not complete, but is focused on the most commonly used fields.\n", "name": "help.user-guide.rest-api.rest-api", "award": {"description": "DCIC: The goals of the 4D Nucleome (4DN) Data Coordination and Integration Center (DCIC) are to collect, store, curate, display, and analyze data generated in the 4DN Network. We have assembled a team of investigators, staff scientists, and developers with a strong track record in analysis of chromatin interaction data, image processing, data visualization, integrative analysis of genomic and epigenomic data, data portal development, large-scale computing, and development of secure and \ufb02exible cloud technologies. In the \ufb01rst phase of the 4DN Project, we have developed the 4DN Data Portal as a central resource with tools for data submission, curation, analysis and quality control, visualization, exploration, and download. The portal provides an easy-to-navigate interface for accessing raw and intermediate data \ufb01les, allows for programmatic access via APIs, and incorporates novel analysis and visualization tools developed by DCIC as well as other Network members. In the second phase of the 4DN Project, we will continue to support the research activities by the 4DN Network, and to lead the creation of a well curated 4DN data resource for the scienti\ufb01c community. At the same time, we propose to enhance the utility of the 4DN Scienti\ufb01c Data and the Data Portal in multiple ways: i. We will create a platform to integrate imaging and sequencing data and support the creating of reference nuclear maps in a common coordinate system; ii. We will provide support for 4DN Projects on Human Health and Disease with customized ontology applications and protected data management; iii. We will develop new cloud platform capabilities to bring user analyses to the 4DN Data Portal, and apply cost-ef\ufb01ciency improvements to support increasing data volumes; iv. We will perform regular outreach activities to raise awareness about the data and tools generated by the Network and DCIC. Overall, we will ensure that the data generated in 4DN will have maximal impact for the scienti\ufb01c community.", "uuid": "71171a4e-dca1-44cb-8375-fafd896c6923", "display_title": "4D NUCLEOME NETWORK DATA COORDINATION AND INTEGRATION CENTER - PHASE II", "@type": ["Award", "Item"], "status": "current", "name": "2U01CA200059-06", "@id": "/awards/2U01CA200059-06/", "center_title": "DCIC - Park", "project": "4DN", "pi": {"error": "no view permissions"}, "principals_allowed": {"view": ["system.Everyone"], "edit": ["group.admin"]}}, "title": "REST API", "status": "released", "aliases": ["dcic:help.user-guide.rest-api.rest-api"], "options": {"filetype": "rst", "collapsible": true, "default_open": false, "convert_ext_links": true}, "date_created": "2018-02-07T14:55:43.650268+00:00", "section_type": "Page Section", "submitted_by": {"error": "no view permissions"}, "last_modified": {"modified_by": {"error": "no view permissions"}, "date_modified": "2024-08-19T22:06:56.082039+00:00"}, "schema_version": "2", "@id": "/static-sections/442c8aa0-dc6c-43d7-814a-854af460b020/", "@type": ["StaticSection", "UserContent", "Item"], "uuid": "442c8aa0-dc6c-43d7-814a-854af460b020", "principals_allowed": {"view": ["system.Everyone"], "edit": ["group.admin", "role.owner", "userid.986b362f-4eb6-4a9c-8173-3ab267307e3a"]}, "display_title": "REST API", "external_references": [], "content": "Overview\n========\n\nThe 4DN-DCIC metadata database can be accessed using a Hypertext-Transfer-Protocol-(HTTP)-based, Representational-state-transfer (RESTful) application programming interface (API) - aka the REST API. In fact, this API is used by the ``import_data`` script used to submit metadata entered into excel spreadsheets as described `on this page </help/submitter-guide/spreadsheet-submission>`_. This API was developed by the `ENCODE`_ project so if you have experience retrieving data from or submitting data to ENCODE, use of the 4DN-DCIC API should be familiar to you. The REST API can be used both for data submission and data retrieval, typically using scripts written in your language of choice. Data objects exchanged with the server conform to the standard JavaScript Object Notation (JSON) format. Libraries written for use with your chosen language are typically used for the network connection, data transfer, and parsing of data (for example, requests and json, respectively for Python). For a good introduction to scripting data retrieval (using GET requests) you can refer to `this page <https://www.encodeproject.org/help/rest-api/>`_ on the `ENCODE`_ web site that also has a good introduction to viewing and understanding JSON formatted data.\n\n.. _ENCODE: https://www.encodeproject.org/\n\nConnecting to the server\n========================\n\nYour script will need to use an access key and secret that you can obtain by following `these instructions </help/submitter-guide/getting-started-with-submissions#getting-connection-keys-for-the-4dn-dcic-servers>`_ to connect to the server. Exactly how you format and pass the connection information to the server depends on your scripting language and the libraries that you use with it.\n\n**Base URL for submitting and fetching data are:** `<https://data.4dnucleome.org/>`_\n\nYou can refer to the ``FDN_key`` and ``FDN_connection`` classes in `the get_field_info.py library <https://github.com/4dn-dcic/Submit4DN/blob/master/wranglertools/get_field_info.py>`_ in Submit4DN for an example of how to generate the necessary information that will be passed to the server with each request.\n\nIdentifying specific items\n==========================\n\nYour script will need to add a uniquely identifying token to the Base URL in order to GET, POST or PATCH metadata for that item. IDs that can be used include: uuids, accessions, certain type specific identifiers and aliases. See the sections on `'Using Aliases' and 'Referencing existing items' </help/submitter-guide/getting-started-with-submissions#referencing-existing-objects>`_ for the types of identifiers that can be used in your requests.\n\nOrdering of POST requests\n=========================\n\nBecause in many cases fields in one Item may refer to another Item, e.g., the ``biosample`` field in the ``experiment_hi_c`` schema, it is necessary to POST the referenced item prior to POSTing the item that refers to it. A sensible POSTing order is specified in the ``sheet_order`` array located around line 228 in the `get_field_info.py <https://github.com/4dn-dcic/Submit4DN/blob/master/wranglertools/get_field_info.py>`_ library.\n\nJSON formatting\n===============\n\nThe most important component of your submission is the proper formatting of the data into json so it will map correctly onto the 4DN metadata schemas. The details of the schemas for all object types in the database can be viewed at `<https://data.4dnucleome.org/profiles/>`_. Individual schemas can be viewed and/or retrieved via GET by appending the schema file name to the above URL (e.g., for the Hi-C experiment schema `<https://data.4dnucleome.org/profiles/experiment_hi_c.json>`_). For a listing of all schema files and associated resource names see `this table </help/submitter-guide/getting-started-with-submissions#schema-information>`_, which should be up to date with the current schemas in the database.\n\nDepending on the Item type that you are submitting there may be fields that require values (e.g., *experiment_type* for experiments), fields for which values should never be submitted (e.g., \u2018date_created\u2019 as this is an automatically generated value) and fields with specific formatting and fields that accept values of specific types. In many cases, the values must be selected from a list of constrained choices. The documentation on field values `described in detail here </help/submitter-guide/spreadsheet-submission#preparing-excel-workbooks>`_ and the annotated json document below can be used as a guide on formatting your json. In addition, the unordered and unfiltered excel workbooks produced by ``get_field_info`` can be a useful reference for determining exactly what fields are associated with what object types. The processed workbook that is actually used for data submission does not reflect the exact schema structure **should not** be used as a direct reference for API submission.\n\n**JSON for an ExperimentHiC POST request** ::\n\n    {\n        \"lab\": \"4dn-dcic-lab\",\n        \"award\": \"/awards/OD008540-01/\",\n        \"aliases\": [\"dcic:myalias\"]\n        \"experiment_type\": \"in situ Hi-C\",\n        \"biosample\":\"4DNBS1NUPXMH\",\n        \"biosample_quantity\": 2000000,\n        \"biosample_quantity_units\": \"cells\",\n        \"dbxrefs\": [\"SRA:SRX764985\", \"GEO:GSM1551599\"],\n        \"description\": \"A useful description of this experiment\",\n        \"documents\": [\"dcf15d5e-40aa-43bc-b81c-32c70c9afb01\"],\n        \"experiment_relation\":[{\"relationship_type\":\"controlled by\",\"experiment\":\"4DNEX067APU1\"}],\n        \"experiment_sets\":[\"431106bc-8535-4448-903e-854af460b260\"],\n        \"files\": [\"4DNFI067APU1\", \"4DNFI067APU2\", \"4DNFI067APA1\"],\n        \"filesets\": [\"4d6ecff9-7c67-4096-bca8-515246767feb\"],\n        \"follows_sop\": \"Yes\",\n        \"crosslinking_method\": \"1% Formaldehyde\",\n        \"crosslinking_time\": 30,\n        \"crosslinking_temperature\": 37,\n        \"digestion_enzyme\": \"MboI\",\n        \"enzyme_lot_number\": \"123456\",\n        \"digestion_temperature\": 37,\n        \"digestion_time\": 30,\n        \"ligation_time\": 30,\n        \"ligation_temperature\": 37,\n        \"ligation_volume\": 1,\n        \"tagging_method\": \"Biotinylated ATP\",\n        \"fragmentation_method\": \"chemical\",\n        \"average_fragment_size\": 100,\n        \"notes\": \"sample dcic notes\",\n        \"protocol\": \"131106bc-8535-4448-903e-854af460b244\"\n    }\n\n**Field specification - how to find out what fields need what format, when to provide values and other useful tips**\n\nThe three fields below are common to every Item - you don't always need to include aliases but they will make some things a lot easier.::\n\n    \"lab\": \"4dn-dcic-lab\",  # required for POST with value of an existing lab identifier - this is an alias\n    \"award\": \"/awards/OD008540-01/\", # required for POST with value of an existing award identifier - this a specific item type identifier\n    \"aliases\": [\"dcic:myalias\", \"dcic:myotheralias\"], # POST or PATCH an array with values that can be used as identifiers\n\nAccession and uuid are automatically assigned during initial posting so can only be used as identifiers to PATCH existing Items - not for POSTing. Note that all item types have a uuid but not all items have accessions.::\n\n    \"accession\":\"4DNEX067APU1\", # PATCH ONLY can be used as an identifier - automatically assigned on POST\n    \"uuid\": \"75041e2f-3e43-4388-8bbb-e861f209c444\", # PATCH ONLY can be used as an identifier - automatically assigned on POST\n\nWhile we encourage you to submit as many fields as possible there are some fields that are absolutely required to post an item. These required fields are identified in the \"required\" field of the schema.::\n\n    \"required\": [\n        \"experiment_type\",\n        \"award\",\n        \"lab\",\n        \"biosample\"\n    ],\n\nIf they are left out of a POST request will cause an error. You don't need to include required fields if you are PATCHing an existing Item.::\n\n    \"experiment_type\": \"in situ Hi-C\", # required for POST string field\n    \"biosample\":\"231111bc-8535-4448-903e-854af460b254\", # required for POST with value of an alias used in Biosample sheet or previously existing biosample identifier\n\nThere are number fields and string fields - the field type can be found by referring to the schema directly or the workbook templates produced by ``get_field_info``. ::\n\n   \"biosample_quantity_units\": {\n        \"title\": \"Quantity Units\",\n        \"description\": \"The units that go along with the biological sample quantity\",\n        \"enum\": [\n            \"g\",\n            \"mg\",\n            \"cells\",\n            \"\u00b5l\",\n            \"ml\",\n            \"ng/\u00b5l\",\n            \"nM\"\n        ],\n        \"type\": \"string\"\n    },\n\nAs you can see the specific field can be found by searching through the schema. If the field is an enum type (sometimes the choices are referred to as controlled vocabularies) your value must match one of the possible entries exactly.::\n\n   \"crosslinking_method\": {\n        \"title\": \"Crosslinking Method\",\n        \"description\": \"The method by which the sample was crosslinked\",\n        \"enum\": [\n            \"3% Formaldehyde\",\n            \"1% Formaldehyde\",\n            \"Fresh Frozen\"\n        ],\n        \"type\": \"string\"\n    },\n\nDates should be submitted in a standard way. Here's an example of an automatically generated date ::\n\n    \"date_created\": \"2017-06-27T16:12:02.601238+00:00\"\n\nA full list of the Item types and their fields is also presented in `this table </help/submitter-guide/getting-started-with-submissions#field-tips>`__. Note that the list below is not complete, but is focused on the most commonly used fields.\n", "filetype": "rst", "content_as_html": "<div class=\"rst-container\"><h2>Overview</h2><p>The 4DN-DCIC metadata database can be accessed using a Hypertext-Transfer-Protocol-(HTTP)-based, Representational-state-transfer (RESTful) application programming interface (API) - aka the REST API. In fact, this API is used by the <code>import_data</code> script used to submit metadata entered into excel spreadsheets as described <a class=\"reference external\" href=\"/help/submitter-guide/spreadsheet-submission\">on this page</a>. This API was developed by the <a class=\"reference external\" href=\"https://www.encodeproject.org/\" rel=\"noopener noreferrer\" target=\"_blank\">ENCODE</a> project so if you have experience retrieving data from or submitting data to ENCODE, use of the 4DN-DCIC API should be familiar to you. The REST API can be used both for data submission and data retrieval, typically using scripts written in your language of choice. Data objects exchanged with the server conform to the standard JavaScript Object Notation (JSON) format. Libraries written for use with your chosen language are typically used for the network connection, data transfer, and parsing of data (for example, requests and json, respectively for Python). For a good introduction to scripting data retrieval (using GET requests) you can refer to <a class=\"reference external\" href=\"https://www.encodeproject.org/help/rest-api/\" rel=\"noopener noreferrer\" target=\"_blank\">this page</a> on the <a class=\"reference external\" href=\"https://www.encodeproject.org/\" rel=\"noopener noreferrer\" target=\"_blank\">ENCODE</a> web site that also has a good introduction to viewing and understanding JSON formatted data.</p><h2>Connecting to the server</h2><p>Your script will need to use an access key and secret that you can obtain by following <a class=\"reference external\" href=\"/help/submitter-guide/getting-started-with-submissions#getting-connection-keys-for-the-4dn-dcic-servers\">these instructions</a> to connect to the server. Exactly how you format and pass the connection information to the server depends on your scripting language and the libraries that you use with it.</p><p><strong>Base URL for submitting and fetching data are:</strong> <a class=\"reference external\" href=\"https://data.4dnucleome.org/\" rel=\"noopener noreferrer\" target=\"_blank\">https://data.4dnucleome.org/</a></p><p>You can refer to the <code>FDN_key</code> and <code>FDN_connection</code> classes in <a class=\"reference external\" href=\"https://github.com/4dn-dcic/Submit4DN/blob/master/wranglertools/get_field_info.py\" rel=\"noopener noreferrer\" target=\"_blank\">the get_field_info.py library</a> in Submit4DN for an example of how to generate the necessary information that will be passed to the server with each request.</p><h2>Identifying specific items</h2><p>Your script will need to add a uniquely identifying token to the Base URL in order to GET, POST or PATCH metadata for that item. IDs that can be used include: uuids, accessions, certain type specific identifiers and aliases. See the sections on <a class=\"reference external\" href=\"/help/submitter-guide/getting-started-with-submissions#referencing-existing-objects\">'Using Aliases' and 'Referencing existing items'</a> for the types of identifiers that can be used in your requests.</p><h2>Ordering of POST requests</h2><p>Because in many cases fields in one Item may refer to another Item, e.g., the <code>biosample</code> field in the <code>experiment_hi_c</code> schema, it is necessary to POST the referenced item prior to POSTing the item that refers to it. A sensible POSTing order is specified in the <code>sheet_order</code> array located around line 228 in the <a class=\"reference external\" href=\"https://github.com/4dn-dcic/Submit4DN/blob/master/wranglertools/get_field_info.py\" rel=\"noopener noreferrer\" target=\"_blank\">get_field_info.py</a> library.</p><h2>JSON formatting</h2><p>The most important component of your submission is the proper formatting of the data into json so it will map correctly onto the 4DN metadata schemas. The details of the schemas for all object types in the database can be viewed at <a class=\"reference external\" href=\"https://data.4dnucleome.org/profiles/\" rel=\"noopener noreferrer\" target=\"_blank\">https://data.4dnucleome.org/profiles/</a>. Individual schemas can be viewed and/or retrieved via GET by appending the schema file name to the above URL (e.g., for the Hi-C experiment schema <a class=\"reference external\" href=\"https://data.4dnucleome.org/profiles/experiment_hi_c.json\" rel=\"noopener noreferrer\" target=\"_blank\">https://data.4dnucleome.org/profiles/experiment_hi_c.json</a>). For a listing of all schema files and associated resource names see <a class=\"reference external\" href=\"/help/submitter-guide/getting-started-with-submissions#schema-information\">this table</a>, which should be up to date with the current schemas in the database.</p><p>Depending on the Item type that you are submitting there may be fields that require values (e.g., <em>experiment_type</em> for experiments), fields for which values should never be submitted (e.g., \u2018date_created\u2019 as this is an automatically generated value) and fields with specific formatting and fields that accept values of specific types. In many cases, the values must be selected from a list of constrained choices. The documentation on field values <a class=\"reference external\" href=\"/help/submitter-guide/spreadsheet-submission#preparing-excel-workbooks\">described in detail here</a> and the annotated json document below can be used as a guide on formatting your json. In addition, the unordered and unfiltered excel workbooks produced by <code>get_field_info</code> can be a useful reference for determining exactly what fields are associated with what object types. The processed workbook that is actually used for data submission does not reflect the exact schema structure <strong>should not</strong> be used as a direct reference for API submission.</p><p><strong>JSON for an ExperimentHiC POST request</strong></p><pre class=\"literal-block\">\n{\n    \"lab\": \"4dn-dcic-lab\",\n    \"award\": \"/awards/OD008540-01/\",\n    \"aliases\": [\"dcic:myalias\"]\n    \"experiment_type\": \"in situ Hi-C\",\n    \"biosample\":\"4DNBS1NUPXMH\",\n    \"biosample_quantity\": 2000000,\n    \"biosample_quantity_units\": \"cells\",\n    \"dbxrefs\": [\"SRA:SRX764985\", \"GEO:GSM1551599\"],\n    \"description\": \"A useful description of this experiment\",\n    \"documents\": [\"dcf15d5e-40aa-43bc-b81c-32c70c9afb01\"],\n    \"experiment_relation\":[{\"relationship_type\":\"controlled by\",\"experiment\":\"4DNEX067APU1\"}],\n    \"experiment_sets\":[\"431106bc-8535-4448-903e-854af460b260\"],\n    \"files\": [\"4DNFI067APU1\", \"4DNFI067APU2\", \"4DNFI067APA1\"],\n    \"filesets\": [\"4d6ecff9-7c67-4096-bca8-515246767feb\"],\n    \"follows_sop\": \"Yes\",\n    \"crosslinking_method\": \"1% Formaldehyde\",\n    \"crosslinking_time\": 30,\n    \"crosslinking_temperature\": 37,\n    \"digestion_enzyme\": \"MboI\",\n    \"enzyme_lot_number\": \"123456\",\n    \"digestion_temperature\": 37,\n    \"digestion_time\": 30,\n    \"ligation_time\": 30,\n    \"ligation_temperature\": 37,\n    \"ligation_volume\": 1,\n    \"tagging_method\": \"Biotinylated ATP\",\n    \"fragmentation_method\": \"chemical\",\n    \"average_fragment_size\": 100,\n    \"notes\": \"sample dcic notes\",\n    \"protocol\": \"131106bc-8535-4448-903e-854af460b244\"\n}\n</pre><p><strong>Field specification - how to find out what fields need what format, when to provide values and other useful tips</strong></p><p>The three fields below are common to every Item - you don't always need to include aliases but they will make some things a lot easier.:</p><pre class=\"literal-block\">\n\"lab\": \"4dn-dcic-lab\",  # required for POST with value of an existing lab identifier - this is an alias\n\"award\": \"/awards/OD008540-01/\", # required for POST with value of an existing award identifier - this a specific item type identifier\n\"aliases\": [\"dcic:myalias\", \"dcic:myotheralias\"], # POST or PATCH an array with values that can be used as identifiers\n</pre><p>Accession and uuid are automatically assigned during initial posting so can only be used as identifiers to PATCH existing Items - not for POSTing. Note that all item types have a uuid but not all items have accessions.:</p><pre class=\"literal-block\">\n\"accession\":\"4DNEX067APU1\", # PATCH ONLY can be used as an identifier - automatically assigned on POST\n\"uuid\": \"75041e2f-3e43-4388-8bbb-e861f209c444\", # PATCH ONLY can be used as an identifier - automatically assigned on POST\n</pre><p>While we encourage you to submit as many fields as possible there are some fields that are absolutely required to post an item. These required fields are identified in the \"required\" field of the schema.:</p><pre class=\"literal-block\">\n\"required\": [\n    \"experiment_type\",\n    \"award\",\n    \"lab\",\n    \"biosample\"\n],\n</pre><p>If they are left out of a POST request will cause an error. You don't need to include required fields if you are PATCHing an existing Item.:</p><pre class=\"literal-block\">\n\"experiment_type\": \"in situ Hi-C\", # required for POST string field\n\"biosample\":\"231111bc-8535-4448-903e-854af460b254\", # required for POST with value of an alias used in Biosample sheet or previously existing biosample identifier\n</pre><p>There are number fields and string fields - the field type can be found by referring to the schema directly or the workbook templates produced by <code>get_field_info</code>.</p><pre class=\"literal-block\">\n\"biosample_quantity_units\": {\n     \"title\": \"Quantity Units\",\n     \"description\": \"The units that go along with the biological sample quantity\",\n     \"enum\": [\n         \"g\",\n         \"mg\",\n         \"cells\",\n         \"\u00b5l\",\n         \"ml\",\n         \"ng/\u00b5l\",\n         \"nM\"\n     ],\n     \"type\": \"string\"\n },\n</pre><p>As you can see the specific field can be found by searching through the schema. If the field is an enum type (sometimes the choices are referred to as controlled vocabularies) your value must match one of the possible entries exactly.:</p><pre class=\"literal-block\">\n\"crosslinking_method\": {\n     \"title\": \"Crosslinking Method\",\n     \"description\": \"The method by which the sample was crosslinked\",\n     \"enum\": [\n         \"3% Formaldehyde\",\n         \"1% Formaldehyde\",\n         \"Fresh Frozen\"\n     ],\n     \"type\": \"string\"\n },\n</pre><p>Dates should be submitted in a standard way. Here's an example of an automatically generated date</p><pre class=\"literal-block\">\n\"date_created\": \"2017-06-27T16:12:02.601238+00:00\"\n</pre><p>A full list of the Item types and their fields is also presented in <a class=\"reference external\" href=\"/help/submitter-guide/getting-started-with-submissions#field-tips\">this table</a>. Note that the list below is not complete, but is focused on the most commonly used fields.</p></div>", "@context": "/terms/", "aggregated-items": {}, "validation-errors": []}