Skip to content
HALOWERK

Formatwerk

bagit package

Create: files go to data/, manifest-<alg>.txt and tagmanifest-<alg>.txt are written for SHA-256 (default), SHA-512 or legacy SHA-1/MD5, bag-info.txt gets your metadata plus Bagging-Date, Bag-Size and Payload-Oxum; paths are checked (no absolute paths, no ".." or empty segments, no duplicates) and CR, LF and % are percent-encoded in manifests as RFC 8493 2.1.3 requires. The ZIP has one top-level directory named after the bag and fixed timestamps (the bagging date), so the same input gives the.

POST https://format.halowerk.com/v1/bagit-package

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
modestringYes
bag_namestringNoName of the bag directory (create).
filesarrayNoPayload files (create).
bag_infoobjectNobag-info.txt metadata, e.g. Source-Organization, Contact-Name, External-Identifier.
algorithmsarrayNo
bagging_datestringNoBagging-Date (default today, UTC).
zip_base64stringNoBag as ZIP (validate).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "mode"
  ],
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "create",
        "validate"
      ]
    },
    "bag_name": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$",
      "description": "Name of the bag directory (create)."
    },
    "files": {
      "type": "array",
      "minItems": 1,
      "maxItems": 2000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "path"
        ],
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "description": "Relative path below data/."
          },
          "content_base64": {
            "type": "string",
            "maxLength": 30000000
          },
          "content_text": {
            "type": "string",
            "maxLength": 10000000
          }
        }
      },
      "description": "Payload files (create)."
    },
    "bag_info": {
      "type": "object",
      "maxProperties": 50,
      "additionalProperties": {
        "type": "string",
        "maxLength": 2000
      },
      "description": "bag-info.txt metadata, e.g. Source-Organization, Contact-Name, External-Identifier."
    },
    "algorithms": {
      "type": "array",
      "minItems": 1,
      "maxItems": 4,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "sha512",
          "sha256",
          "sha1",
          "md5"
        ]
      },
      "default": [
        "sha256"
      ]
    },
    "bagging_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Bagging-Date (default today, UTC)."
    },
    "zip_base64": {
      "type": "string",
      "maxLength": 40000000,
      "description": "Bag as ZIP (validate)."
    }
  }
}

Open original schema

Published input example

{
  "mode": "create",
  "bag_name": "invoices-2026",
  "bag_info": {
    "Source-Organization": "Lagertechnik Nord GmbH"
  },
  "files": [
    {
      "path": "hello.txt",
      "content_text": "hello world"
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’