Multi-Step Creation API

Build a container one call at a time. Do the calls in order — each step needs the container_id from Step 1.

Step 1: Initialize Container

Creates a new container and sets up its folder structure. Access levels must be Public, Private, or Restricted.

  • Endpoint: POST /rdmc/init/

  • Request Payload:

{
  "RDMC Title": "Ocean Current Analysis 2026",
  "Artifacts Details": [
    {
      "artifact_name": "Source_Code",
      "access_level": "Public"
    },
    {
      "artifact_name": "Raw_Data",
      "access_level": "Restricted"
    }
  ]
}

  • Expected Response (201 Created):

{
  "success": true,
  "container_id": "niBWYGu6",
  "message": "Step 1 complete: RDMC initialized and empty physical directories created."
}

Step 1.1: Upload Resource(s)

Adds a link, a file, or a folder to a container artifact. Each call uploads one resource — send three separate calls to upload a link, a file, and a folder.

  • Endpoint: POST /rdmc/<container_id>/upload/

Upload a link

{
  "artifact_name": "Source_Code",
  "access_level": "Public",
  "upload_type": "link",
  "link": "https://github.com/research-lab/climate-model",
  "title": "Project Repository",
  "resource_type": "Software"
}

  • Expected Response (201 Created):

{
  "success": true,
  "message": "Link validated and saved.",
  "warnings": []
}

Upload a file

{
  "artifact_name": "Raw_Data",
  "access_level": "Restricted",
  "upload_type": "file",
  "file_path": "C:/Research/Data/temperature_2023.csv",
  "title": "Temperature Readings",
  "resource_type": "Data"
}

  • Expected Response (201 Created):

{
  "success": true,
  "message": "File successfully copied and uploaded."
}

Upload a folder

{
  "artifact_name": "Raw_Data",
  "access_level": "Restricted",
  "upload_type": "folder",
  "folder_path": "C:/Research/Data/sensor_logs",
  "title": "Raw Sensor Logs",
  "resource_type": "Data"
}

  • Expected Response (201 Created):

{
  "success": true,
  "message": "Folder uploaded.",
  "warning_msg": null,
  "missing_files": {}
}

Step 3: Apply Container Metadata

Adds descriptive metadata to the container. This also generates the physical manifest.rdmc file and updates the container’s hashes.

  • Endpoint: POST /rdmc/<container_id>/metadata/

  • Request Payload:

{
  "Contributors": [
    {
      "first_name": "Jane",
      "last_name": "Doe",
      "affiliation": "Institute for Computer Science",
      "orcid": "0000-0002-1825-0097",
      "role": "Lead Developer"
    }
  ],
  "License": "MIT",
  "Keywords": "Machine Learning, Distributed Systems, API",
  "Description": "Implementation of the distributed architecture model.",
  "Subject": "Computer and Information Science"
}

  • Expected Response (200 OK):

{
  "success": true,
  "message": "Metadata successfully applied, manifest.rdmc generated, and hashes updated."
}

Step 4: Seal Container

Locks the container from future edits. This hashes every file, generates an EPIC PID if the service is reachable, and signs the result.

  • Endpoint: POST /rdmc/<container_id>/seal/

  • Request Payload: an empty JSON object, {}

  • Expected Response (200 OK):

{
  "success": true,
  "message": "Container sealed and signed successfully.",
  "epic_pid": "21.11113/0000-0000-0000-0000",
  "signature": "base64_encoded_signature_string_here"
}

Note

Sealing a container twice returns an error — a sealed container cannot be sealed again.

Integration Guide

The example below uses curl to show the exact HTTP calls. Any language that can send HTTP requests can follow the same pattern.

# Step 1: Initialize the container
curl -X POST https://rdmc.create.nfdixcs.org/rdmc_creation/rdmc/init/ \
  -H "Authorization: Token <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "RDMC Title": "Ocean Current Analysis 2026",
        "Artifacts Details": [
          {"artifact_name": "Raw_Data", "access_level": "Restricted"}
        ]
      }'
# Response contains "container_id": "niBWYGu6" — save it for the next steps.

# Step 1.1: Upload a file
curl -X POST https://rdmc.create.nfdixcs.org/rdmc_creation/rdmc/niBWYGu6/upload/ \
  -H "Authorization: Token <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "artifact_name": "Raw_Data",
        "access_level": "Restricted",
        "upload_type": "file",
        "file_path": "C:/Research/Data/temperature_2023.csv",
        "title": "Temperature Readings",
        "resource_type": "Data"
      }'

# Step 3: Add metadata
curl -X POST https://rdmc.create.nfdixcs.org/rdmc_creation/rdmc/niBWYGu6/metadata/ \
  -H "Authorization: Token <your_token>" \
  -H "Content-Type: application/json" \
  -d '{"Description": "Temperature readings collected in 2023."}'

# Step 4: Seal the container
curl -X POST https://rdmc.create.nfdixcs.org/rdmc_creation/rdmc/niBWYGu6/seal/ \
  -H "Authorization: Token <your_token>" \
  -H "Content-Type: application/json" \
  -d '{}'

# If a step fails, delete the container instead of leaving it half-built
curl -X DELETE https://rdmc.create.nfdixcs.org/rdmc_creation/rdmc/niBWYGu6/delete/ \
  -H "Authorization: Token <your_token>"

Check the status code after each call. 200 or 201 means it worked. If a call fails, run the delete command above before you retry — this clears the partly built container so no files are left behind.