Metax API

This document describes what is the minimum set of metadata from the digital preservation viewpoint that should be created into Metax before the uploaded files can packaged for digital preservation. It’s recommended to become familiar with Metax by studying Metax API documentation.

Preconditions

Files to be packaged for digital preservation have been uploaded to Upload REST API.

The authentication token for Metax API access can be created at Metax API Auth Token. See Metax API documentation for details.

Preparing Dataset

A dataset instance which wraps the uploaded files should be created into Metax. Below is an example of a minimum dataset in JSON format which can be accepted for digital preservation. Please note that there is lots of other metadata which can be associated with the dataset. Copy and paste it into your text editor to modify it based on your needs

{
    "data_catalog": "urn:nbn:fi:att:data-catalog-pas",
    "research_dataset": {
        "title": {
            "en": "Test Dataset Title",
            "fi": "Aineiston otsikko"
        },
        "description": {
            "en": "A descriptive description describing the contents of this dataset. Must be descriptive."
        },
        "publisher": {
            "name": {
                "fi": "School services, ARTS",
                "und": "School services, ARTS"
            },
            "@type": "Organization",
            "homepage": {
                "title": {
                    "en": "Publisher website",
                    "fi": "Julkaisijan kotisivu"
                },
                "identifier": "http://www.publisher.fi/"
            },
            "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/10076-A800",
            "is_part_of": {
                "name": {
                    "en": "Aalto University",
                    "fi": "Aalto yliopisto",
                    "sv": "Aalto universitetet",
                    "und": "Aalto yliopisto"
                },
                "@type": "Organization",
                "homepage": {
                    "title": {
                        "en": "Publisher parent website",
                        "fi": "Julkaisijan yläorganisaation kotisivu"
                    },
                    "identifier": "http://www.publisher_parent.fi/"
                },
                "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/10076"
            },
            "contributor_type": [
                {
                    "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/Distributor",
                    "pref_label": {
                        "en": "Distributor",
                        "fi": "Jakelija",
                        "sv": "Distributör",
                        "und": "Jakelija"
                    }
                }
            ]
        },
        "issued": "2019-04-03",
        "creator": [
            {
                "name": "Teppo Testaaja",
                "@type": "Person",
                "member_of": {
                    "name": {
                        "en": "Aalto University",
                        "fi": "Aalto yliopisto",
                        "sv": "Aalto universitetet",
                        "und": "Aalto yliopisto"
                    },
                    "@type": "Organization",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/10076"
                },
                "contributor_role": [
                    {
                        "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_role",
                        "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_role/code/conceptualization",
                        "pref_label": {
                            "en": "Conceptualization",
                            "fi": "Tutkimuksen muotoilu",
                            "sv": "Formulering av forskningen",
                            "und": "Tutkimuksen muotoilu"
                        }
                    }
                ]
            }
        ],
        "access_rights": {
            "license": [
                {
                    "title": {
                        "en": "Apache Software License 2.0",
                        "und": "Apache Software License 2.0"
                    },
                    "license": "https://url.of.license.which.applies.here.org",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/license/code/Apache-2.0",
                    "description": {
                        "en": "Free account of the rights"
                    }
                },
                {
                    "title": {
                        "en": "Creative Commons Attribution-NonCommercial 2.0 Generic (CC BY-NC 2.0",
                        "fi": "Creative Commons Nimeä-EiKaupallinen 2.0 Yleinen (CC BY-NC 2.0)",
                        "und": "Creative Commons Nimeä-EiKaupallinen 2.0 Yleinen (CC BY-NC 2.0)"
                    },
                    "license": "https://creativecommons.org/licenses/by-nc/2.0/",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/license/code/CC-BY-NC-2.0",
                    "description": {
                        "en": "Free account of the rights"
                    }
                },
                {
                    "title": {
                        "en": "Other",
                        "fi": "Muu",
                        "und": "Muu"
                    },
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/license/code/other"
                }
            ],
            "available": "2014-01-15",
            "access_url": {
                "title": {
                    "en": "A name given to the document"
                },
                "identifier": "https://access.url.com/landing",
                "description": {
                    "en": "Description of the link. For example to be used as hover text."
                }
            },
            "access_type": {
                "in_scheme": "http://uri.suomi.fi/codelist/fairdata/access_type",
                "definition": {
                    "en": "A statement or formal explanation of the meaning of a concept."
                },
                "identifier": "http://uri.suomi.fi/codelist/fairdata/access_type/code/open",
                "pref_label": {
                    "en": "Open",
                    "fi": "Avoin",
                    "und": "Avoin"
                }
            },
            "description": {
                "en": "Free account of the rights"
            },
            "restriction_grounds": [
                {
                    "in_scheme": "http://uri.suomi.fi/codelist/fairdata/restriction_grounds",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/restriction_grounds/code/other",
                    "pref_label": {
                        "en": "Restricted access due to other reasons",
                        "fi": "Saatavuutta rajoitettu muulla perusteella",
                        "sv": "Begränsad åtkomst av övriga skäl",
                        "und": "Saatavuutta rajoitettu muulla perusteella"
                    }
                }
            ]
        },
        "directories": [
            {
                "identifier": "<directory identifier of data>",
                "title": "Title for directory",
                "use_category": {
                    "in_scheme": "http://uri.suomi.fi/codelist/fairdata/use_category",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/use_category/code/source",
                    "pref_label": {
                        "en": "Source material",
                        "fi": "Lähdeaineisto",
                        "und": "Lähdeaineisto"
                    }
                }
             }
         ],
         "files": []
    }
}

You should modify it based on your data. Please pay attention on the identifier attribute values. Refer to Fairdata Codesets for the correct values.

The files to be associated with the dataset can be introduced by directories and/or files block.

In directories block above the value <directory identifier of data> should be replaced by the identifier of the directory where files were uploaded. The identifier can be resolved from Metax. For example, if the identifier of your project is my_project1 and your files were uploaded to /my_directory1, the metadata of the directory can be queried using the following command:

$ curl -H "Authorization: Bearer <authToken>" https://metax.fairdata.fi/rest/directories/files?project=my_project1\&path=/my_directory1\&directories_only=true\&include_parent=true

In the following example output the directory identifier is 4b3f02d6d5493338b7a0afc336e7c659:

{
  "removed": false,
  "directory_path": "/my_directory1",
  "project_identifier": "my_project1",
  "service_created": "tpas",
  "identifier": "4b3f02d6d5493338b7a0afc336e7c659",
  "id": 1168,
  "byte_size": 724,
  "directory_modified": "2019-03-12T10:49:05.539890+02:00",
  "file_count": 3,
  "directory_name": "/",
  "date_created": "2019-03-12T10:49:05+02:00",
  "parent_directory": {
     "identifier": "3e75340451f136f5a23dedacb7a2b448",
     "id": 1018
  },
  "directories": [
    {
        "..."
    }
  ],
  "files": []
}

Finally save the file as it will be used below to create a dataset into Metax.

Optional Dataset Metadata

Following optional metadata infromation can be associated with the dataset. You can copy and paste any of the example JSON blocks below to you dataset (inside research_dataset JSON block) and modify according to your needs. You can read more about the metadata attributes from Tietomallit.

Provenance:

"provenance": [
    {
        "title": {
            "en": "Some activity"
        },
        "spatial": {
            "alt": "11.111",
            "as_wkt": [
                "POINT(23.80834 67.92415)"
            ],
            "place_uri": {
                "in_scheme": "http://www.yso.fi/onto/yso/places",
                "identifier": "http://www.yso.fi/onto/yso/p107966",
                "pref_label": {
                    "en": "Olostunturi",
                    "fi": "Olostunturi",
                    "sv": "Olostunturi",
                    "und": "Olostunturi"
                }
            },
            "full_address": "The complete address written as a string, with or without formatting",
            "geographic_name": "Geographic name"
        },
        "temporal": {
            "end_date": "2014-12-31T08:19:58Z",
            "start_date": "2014-01-01T08:19:58Z"
        },
        "variable": [
            {
                "concept": {
                    "in_scheme": "http://uri.of.filetype.concept/scheme",
                    "definition": {
                        "en": "A statement or formal explanation of the meaning of a concept."
                    },
                    "identifier": "variableconceptidentifier",
                    "pref_label": {
                        "en": "pref label"
                    }
                },
                "universe": {
                    "in_scheme": "http://uri.of.filetype.concept/scheme",
                    "definition": {
                        "en": "A statement or formal explanation of the meaning of a concept."
                    },
                    "identifier": "universeconceptidentifier",
                    "pref_label": {
                        "en": "pref label"
                    }
                },
                "pref_label": {
                    "en": "Preferred label"
                },
                "description": {
                    "en": "Description"
                },
                "representation": "http://uri.of.filetype.concept/scheme"
            }
        ],
        "description": {
            "en": "Description of provenance activity"
        },
        "used_entity": [
            {
                "type": {
                    "in_scheme": "http://uri.of.filetype.concept/scheme",
                    "definition": {
                        "en": "A statement or formal explanation of the meaning of a concept."
                    },
                    "identifier": "thisisnotenoughconcepts",
                    "pref_label": {
                        "en": "pref label for this type"
                    }
                },
                "title": {
                    "en": "Title"
                },
                "identifier": "someidhereagain",
                "description": {
                    "en": "Description"
                }
            }
        ],
        "event_outcome": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/event_outcome",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/event_outcome/code/success",
            "pref_label": {
                "en": "Success",
                "fi": "Onnistunut",
                "sv": "Framgångsrik",
                "und": "Onnistunut"
            }
        },
        "lifecycle_event": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/lifecycle_event",
            "definition": {
                "en": "A statement or formal explanation of the meaning of a concept."
            },
            "identifier": "http://uri.suomi.fi/codelist/fairdata/lifecycle_event/code/collected",
            "pref_label": {
                "en": "Collected",
                "fi": "Kerätty",
                "und": "Kerätty"
            }
        },
        "outcome_description": {
            "en": "A grand success",
            "fi": "Onnistui hyvin"
        },
        "was_associated_with": [
            {
                "name": {
                    "en": "University of Helsinki",
                    "fi": "Helsingin yliopisto",
                    "sv": "Helsingfors universitet",
                    "und": "Helsingin yliopisto"
                },
                "@type": "Organization",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/01901",
                "contributor_type": [
                    {
                        "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                        "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/DataCurator",
                        "pref_label": {
                            "en": "Data Curator",
                            "fi": "Aineiston käsittelijä",
                            "sv": "Databehandling",
                            "und": "Aineiston käsittelijä"
                        }
                    }
                ]
            }
        ]
    }
]

Contributor:

"contributor": [
    {
        "name": "Kalle Kontribuuttaja",
        "@type": "Person",
        "member_of": {
            "name": {
                "en": "University of Helsinki",
                "fi": "Helsingin yliopisto",
                "sv": "Helsingfors universitet",
                "und": "Helsingin yliopisto"
            },
            "@type": "Organization",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/01901"
        },
        "identifier": "contributorid",
        "contributor_role": [
            {
                "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_role",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_role/code/funding_acquisition",
                "pref_label": {
                    "en": "Funding acquisition",
                    "fi": "Rahoituksen hankinta",
                    "sv": "Anskaffande av finansiering",
                    "und": "Rahoituksen hankinta"
                }
            }
        ]
    },
    {
        "name": "Franzibald Kontribuuttaja",
        "@type": "Person",
        "member_of": {
            "name": {
                "en": "Mysterious Organization 2",
                "fi": "Organisaatio"
            },
            "@type": "Organization",
            "identifier": "org_identifier"
        },
        "identifier": "contributorid2",
        "contributor_type": [
            {
                "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/ProjectLeader",
                "pref_label": {
                    "en": "Project Leader",
                    "fi": "Projektin johtaja",
                    "sv": "Projektledare",
                    "und": "Projektin johtaja"
                }
            }
        ]
    }
]

Producer project:

"is_output_of": [
    {
        "name": {
            "en": "Name of project"
        },
        "identifier": "projectidentifier",
        "funder_type": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/funder_type",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/funder_type/code/tekes",
            "pref_label": {
                "en": "Tekes",
                "fi": "Tekes",
                "und": "Tekes"
            }
        },
        "has_funding_agency": [
            {
                "name": {
                    "en": "Funding Organization",
                    "fi": "Organisaatio"
                },
                "@type": "Organization",
                "identifier": "fundingagencyidentifier",
                "contributor_type": [
                    {
                        "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                        "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/Editor",
                        "pref_label": {
                            "en": "Editor",
                            "fi": "Julkaisutoimittaja",
                            "sv": "Redaktör",
                            "und": "Julkaisutoimittaja"
                        }
                    }
                ]
            }
        ],
        "source_organization": [
            {
                "name": {
                    "en": "University of Helsinki",
                    "fi": "Helsingin yliopisto",
                    "sv": "Helsingfors universitet",
                    "und": "Helsingin yliopisto"
                },
                "@type": "Organization",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/01901",
                "contributor_type": [
                    {
                        "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                        "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/HostingInstitution",
                        "pref_label": {
                            "en": "Hosting Institution",
                            "fi": "Säilyttävä organisaatio",
                            "sv": "Bevarande organisation",
                            "und": "Säilyttävä organisaatio"
                        }
                    }
                ]
            }
        ],
        "has_funder_identifier": "funderprojectidentifier"
    }
]

Rightsholder:

"rights_holder": [
    {
        "name": {
            "en": "University of Helsinki",
            "fi": "Helsingin yliopisto",
            "sv": "Helsingfors universitet",
            "und": "Helsingin yliopisto"
        },
        "@type": "Organization",
        "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/01901",
        "is_part_of": {
            "name": {
                "en": "Aalto University",
                "fi": "Aalto yliopisto",
                "sv": "Aalto universitetet",
                "und": "Aalto yliopisto"
            },
            "@type": "Organization",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/10076"
        },
        "contributor_type": [
            {
                "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/DataManager",
                "pref_label": {
                    "en": "Data Manager",
                    "fi": "Aineiston hallinnoija",
                    "sv": "Dataadministration",
                    "und": "Aineiston hallinnoija"
                }
            }
        ]
    }
]

Used infrastructure:

"infrastructure": [
    {
        "in_scheme": "https://avaa.tdata.fi/api/jsonws/tupa-portlet.Infrastructures/get-all-infrastructures",
        "identifier": "http://urn.fi/urn:nbn:fi:research-infras-2016072530",
        "pref_label": {
            "en": "Accelerator laboratory of the university of Jyväskylä",
            "fi": "Jyväskylän yliopiston fysiikan laitoksen Kiihdytinlaboratorio",
            "und": "Jyväskylän yliopiston fysiikan laitoksen Kiihdytinlaboratorio"
        }
    }
]

Field of science:

"field_of_science": [
    {
        "in_scheme": "http://www.yso.fi/onto/okm-tieteenala/conceptscheme",
        "definition": {
            "en": "A statement or formal explanation of the meaning of a concept."
        },
        "identifier": "http://www.yso.fi/onto/okm-tieteenala/ta414",
        "pref_label": {
            "en": "Agricultural biotechnology",
            "fi": "Maatalouden bioteknologia",
            "sv": "Jordbruksbioteknologi",
            "und": "Maatalouden bioteknologia"
        }
    }
]

Other identifier:

"other_identifier": [
    {
        "type": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/identifier_type",
            "definition": {
                "en": "A statement or formal explanation of the meaning of a concept."
            },
            "identifier": "http://uri.suomi.fi/codelist/fairdata/identifier_type/code/doi",
            "pref_label": {
                "en": "Digital Object Identifier (DOI)",
                "und": "Digital Object Identifier (DOI)"
            }
        },
        "notation": "doi:10.12345",
        "provider": {
            "name": {
                "en": "University of Helsinki",
                "fi": "Helsingin yliopisto",
                "sv": "Helsingfors universitet",
                "und": "Helsingin yliopisto"
            },
            "@type": "Organization",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/01901",
            "contributor_type": [
                {
                    "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/ContactPerson",
                    "pref_label": {
                        "en": "Point of contact",
                        "fi": "Yhteystiedot",
                        "sv": "Kontaktuppgifter",
                        "und": "Yhteystiedot"
                    }
                }
            ]
        },
        "local_identifier_type": "Local identifier type defines use of the identifier in given context"
    },
    {
        "type": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/identifier_type",
            "definition": {
                "en": "A statement or formal explanation of the meaning of a concept."
            },
            "identifier": "http://uri.suomi.fi/codelist/fairdata/identifier_type/code/urn",
            "pref_label": {
                "en": "Uniform Resource Name (URN)",
                "und": "Uniform Resource Name (URN)"
            }
        },
        "notation": "urn:nbn:fi-12345",
        "provider": {
            "name": {
                "en": "University of Helsinki",
                "fi": "Helsingin yliopisto",
                "sv": "Helsingfors universitet",
                "und": "Helsingin yliopisto"
            },
            "@type": "Organization",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/01901",
            "contributor_type": [
                {
                    "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                    "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/DataCollector",
                    "pref_label": {
                        "en": "Data Collector",
                        "fi": "Aineiston kerääjä",
                        "sv": "Datainsamling",
                        "und": "Aineiston kerääjä"
                    }
                }
            ]
        },
        "local_identifier_type": "Local identifier type defines use of the identifier in given context"
    }
]

Relation:

"relation": [
    {
        "entity": {
            "type": {
                "in_scheme": "http://uri.suomi.fi/codelist/fairdata/resource_type",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/resource_type/code/physical_object",
                "pref_label": {
                    "en": "Physical object",
                    "fi": "Fyysinen objekti",
                    "und": "Fyysinen objekti"
                }
            },
            "title": {
                "en": "External dataset 1",
                "fi": "Ulkopuolinen aineisto 1"
            },
            "identifier": "external:dataset:identifier",
            "description": {
                "fi": "Kuvailutiedot"
            }
        },
        "relation_type": {
            "identifier": "http://www.w3.org/ns/prov#wasDerivedFrom",
            "pref_label": {
                "en": "Was derived from",
                "fi": "Johdettu aineistosta",
                "und": "Johdettu aineistosta"
            }
        }
    }
]

Curator:

"curator": [
    {
        "name": {
            "en": "Mysterious Organization",
            "fi": "Organisaatio"
        },
        "@type": "Organization",
        "identifier": "id:of:curator:default",
        "is_part_of": {
            "name": {
                "en": "Aalto University",
                "fi": "Aalto yliopisto",
                "sv": "Aalto universitetet",
                "und": "Aalto yliopisto"
            },
            "@type": "Organization",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/organization/code/10076"
        },
        "contributor_type": [
            {
                "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/Distributor",
                "pref_label": {
                    "en": "Distributor",
                    "fi": "Jakelija",
                    "sv": "Distributör",
                    "und": "Jakelija"
                }
            },
            {
                "in_scheme": "http://uri.suomi.fi/codelist/fairdata/contributor_type",
                "identifier": "http://uri.suomi.fi/codelist/fairdata/contributor_type/code/Sponsor",
                "pref_label": {
                    "en": "Sponsor",
                    "fi": "Sponsori",
                    "sv": "Sponsor",
                    "und": "Sponsori"
                }
            }
        ]
    }
]

Theme:

"theme": [
    {
        "in_scheme": "http://www.yso.fi/onto/koko/",
        "definition": {
            "en": "A statement or formal explanation of the meaning of a concept."
        },
        "identifier": "http://www.yso.fi/onto/koko/p32202",
        "pref_label": {
            "en": "organic production",
            "fi": "luonnonmukainen tuotanto",
            "sv": "ekologisk produktion",
            "und": "luonnonmukainen tuotanto"
        }
    },
    {
        "in_scheme": "http://www.yso.fi/onto/koko/",
        "definition": {
            "en": "A statement or formal explanation of the meaning of a concept."
        },
        "identifier": "http://www.yso.fi/onto/koko/p76312",
        "pref_label": {
            "fi": "naulamestarit",
            "und": "naulamestarit"
        }
    }
]

Keyword:

"keyword": [
    "keyword",
    "keyword2",
    "keyword3"
]

Metadata quality value:

"value": 0.111,

Spatial:

"spatial": [
    {
        "alt": "11.111",
        "as_wkt": [
            "POLYGON((0 0, 0 20, 40 20, 40 0, 0 0))"
        ],
        "place_uri": {
            "in_scheme": "http://www.yso.fi/onto/yso/places",
            "identifier": "http://www.yso.fi/onto/yso/p107966",
            "pref_label": {
                "en": "Olostunturi",
                "fi": "Olostunturi",
                "sv": "Olostunturi",
                "und": "Olostunturi"
            }
        },
        "full_address": "The complete address written as a string, with or without formatting",
        "geographic_name": "Geographic name"
    },
    {
        "alt": "60",
        "as_wkt": [
            "POINT(23.80834 67.92415)"
        ],
        "place_uri": {
            "in_scheme": "http://www.yso.fi/onto/yso/places",
            "identifier": "http://www.yso.fi/onto/yso/p107966",
            "pref_label": {
                "en": "Olostunturi",
                "fi": "Olostunturi",
                "sv": "Olostunturi",
                "und": "Olostunturi"
            }
        },
        "full_address": "The complete address written as a string, with or without formatting",
        "geographic_name": "Geographic name 2"
    }
]

Temporal coverage:

"temporal": [
    {
        "end_date": "2014-12-31T08:19:58Z",
        "start_date": "2014-01-01T08:19:58Z"
    },
    {
        "temporal_coverage": "2011"
    }
]

Preferred Bibliographic Citation:

"bibliographic_citation": "bibliographic citation",

Version:

"version_info": "0.1.2",

Version notes:

"version_notes": [
    "This version contains changes to x and y."
],

List of files:

"files": [
    {
        "title": "File metadata title 1",
        "identifier": "pid:urn:1",
        "use_category": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/use_category",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/use_category/code/source",
            "pref_label": {
                "en": "Source material",
                "fi": "Lähdeaineisto",
                "und": "Lähdeaineisto"
            }
        }
    },
    {
        "title": "File metadata title 2",
        "identifier": "pid:urn:2",
        "use_category": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/use_category",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/use_category/code/source",
            "pref_label": {
                "en": "Source material",
                "fi": "Lähdeaineisto",
                "und": "Lähdeaineisto"
            }
        }
    }
]

Remote resources:

"remote_resources": [
    {
        "title": "Remote resource 14",
        "checksum": {
            "algorithm": "SHA-256",
            "checksum_value": "u5y6f4y68765ngf6ry8n"
        },
        "modified": "2014-01-12T17:11:54Z",
        "byte_size": 7168,
        "use_category": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/use_category",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/use_category/code/outcome",
            "pref_label": {
                "en": "Outcome material",
                "fi": "Tulosaineisto",
                "und": "Tulosaineisto"
            }
        }
    },
    {
        "title": "Other remote resource 14",
        "checksum": {
            "algorithm": "SHA-512",
            "checksum_value": "u3k4kn7n1g56l6rq5a5s"
        },
        "modified": "2013-01-12T11:11:54Z",
        "byte_size": 14336,
        "use_category": {
            "in_scheme": "http://uri.suomi.fi/codelist/fairdata/use_category",
            "identifier": "http://uri.suomi.fi/codelist/fairdata/use_category/code/source",
            "pref_label": {
                "en": "Source material",
                "fi": "Lähdeaineisto",
                "und": "Lähdeaineisto"
            }
        }
    }
]

Create a Dataset into Metax

To test dataset posting to Metax you can use the dryrun query argument in the URL:

$ curl -H "Authorization: Bearer <token>" \
       -X POST "https://metax.fairdata.fi/rest/v1/datasets?dryrun=true" \
       -H "accept: application/json" \
       -H "Content-Type: application/json" \
       --data-binary @<path/to/file>

If the operation was successful it returns a dataset as a response but does not save anything to Metax. By dropping the dryrun argument the dataset can be created into Metax:

$ curl -H "Authorization: Bearer <token>" \
       -X POST "https://metax.fairdata.fi/rest/v1/datasets" \
       -H "accept: application/json" \
       -H "Content-Type: application/json" \
       --data-binary @<path/to/file>