Single Request Creation API

Builds a container in a single request instead of four separate calls. You can add links, files, and folders together, and seal the container right away if you want to.

  • Endpoint: POST /create-full-rdmc/

Example 1: Mixed Upload, Not Sealed

Combines links, files, and folders across two artifacts. Any Status``other than ``"seal" — including leaving it out — creates the container without sealing it.

{
  "RDMC Title": "Single Request - Mixed Create",
  "Status": "create",
  "Artifacts Details": [
    {
      "artifact_name": "Source_Code",
      "access_level": "Public",
      "links": [
        {
          "title": "Data Processing Script",
          "resource type": "Software",
          "link": "https://github.com/research-lab/climate-model"
        }
      ]
    },
    {
      "artifact_name": "Raw_Data",
      "access_level": "Private",
      "files": [
        {
          "title": "Station Configuration",
          "resource type": "Data",
          "file name": "C:/Research/Data/config.xml"
        }
      ],
      "folders": [
        {
          "title": "January Sensor Logs",
          "resource type": "Data",
          "folder name": "C:/Research/Data/january_logs"
        }
      ]
    }
  ],
  "RDMC Metadata": {
    "Contributors": [
      {
        "first_name": "Jane",
        "last_name": "Doe",
        "orcid": "0000-0002-1825-0097",
        "affiliation": "Institute for Computer Science",
        "role": "Lead Developer"
      }
    ],
    "License": "MIT",
    "Keywords": "Automation, API, Testing",
    "Description": "Container built from local files, folders, and a link.",
    "Subject": "Computer and Information Science"
  }
}

Expected Response (201 Created)

{
  "success": true,
  "container_id": "niBWYGu6",
  "message": "RDMC created successfully. It has not been sealed yet.",
  "warnings": [],
  "seal_details": {}
}

Example 2: Mixed Upload and Seal

Setting "Status": "seal" seals the container immediately after it is built — hashing the files, generating the manifest, and creating the EPIC PID.

{
  "RDMC Title": "Single Request - Mixed and Sealed",
  "Status": "seal",
  "Artifacts Details": [
    {
      "artifact_name": "Documentation",
      "access_level": "Public",
      "links": [
        {
          "title": "Project Wiki",
          "resource type": "Text",
          "link": "https://github.com/research-lab/climate-model"
        }
      ]
    },
    {
      "artifact_name": "Compiled_Binaries",
      "access_level": "Restricted",
      "files": [
        {
          "title": "Release v1.0",
          "resource type": "Software",
          "file name": "C:/Research/Build/app_v1.exe"
        }
      ],
      "folders": [
        {
          "title": "Support Libraries",
          "resource type": "Software",
          "folder name": "C:/Research/Build/libs"
        }
      ]
    }
  ],
  "RDMC Metadata": {
    "Contributors": [
      {
        "first_name": "Jane",
        "last_name": "Doe",
        "affiliation": "Institute for Computer Science",
        "orcid": "0000-0002-1825-0097",
        "role": "Lead Developer"
      }
    ],
    "License": "MIT",
    "Keywords": "Automation, API, Testing",
    "Description": "Final sealed release of the application.",
    "Subject": "Computer and Information Science"
  }
}

Expected Response (201 Created)

{
  "success": true,
  "container_id": "niBWYGu6",
  "message": "RDMC created and sealed successfully.",
  "warnings": [],
  "seal_details": {
    "epic_pid": "21.11113/0000-0000-0000-0000",
    "signature": "base64_encoded_signature_string_here",
    "sealed": true
  }
}

seal_details is always present. It is an empty object, {}, unless you set "Status": "seal". warnings lists any non-fatal issues found while uploading — an empty list means there were none.

Note

If anything fails while building the container — a bad link, a missing file, invalid metadata — the whole container is rolled back and deleted. Nothing is left behind, so there is no manual cleanup.

Integration Guide

The example below uses curl. Any language that can send HTTP requests can build the same call.

curl -X POST https://rdmc.create.nfdixcs.org/rdmc_creation/create-full-rdmc/ \
  -H "Authorization: Token <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "RDMC Title": "Single Request - Mixed and Sealed",
        "Status": "seal",
        "Artifacts Details": [
          {
            "artifact_name": "Documentation",
            "access_level": "Public",
            "links": [
              {"title": "Project Wiki", "resource type": "Text",
               "link": "https://github.com/research-lab/climate-model"}
            ]
          }
        ],
        "RDMC Metadata": {
          "Description": "Final sealed release of the application."
        }
      }'

Check the response: container_id confirms the container was created, and seal_details tells you whether it was sealed. On failure, nothing is created.