Skip to main content

minio@1.0.0

createBucket(bucketName, [region], [options])
getObject(bucketName, objectName, [options])
getObjectTags(bucketName, objectName)
listObjects(bucketName, [options])
putObject(bucketName, objectName, data, [options])
setObjectTags(bucketName, objectName, tags, [putOpts])

This adaptor exports the following from common:

as()
combine()
cursor()
dataPath()
dataValue()
dateFns
each()
field()
fields()
fn()
fnIf()
group()
lastReferenceValue()
map()
merge()
parseCsv()
scrubEmojis()
sourceValue()
util

Functions

createBucket

createBucket(bucketName, [region], [options]) ⇒ Operation

Create a new bucket

ParamTypeDefaultDescription
bucketNamestringName of the bucket to create
[region]string""us-east-1""Bucket region
[options]object{}Options to create a bucket
[options.ObjectLocking]booleanfalseEnable object locking on the bucket

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Create a bucket

createBucket("my-new-bucket");

Example: Create a bucket with object locking enabled

createBucket("my-new-bucket", "us-east-1", { ObjectLocking: true });

getObject

getObject(bucketName, objectName, [options]) ⇒ Operation

Get an object from a bucket

ParamTypeDefaultDescription
bucketNamestringBucket containing the object
objectNamestringName/path of the object to retrieve
[options]object{}Optional MinIO getObject options
[options.format]string""raw""Format to parse the object as. One of "raw", "json", "ndjson", or "csv". "raw" will return a Buffer, while the others will return the parsed result.
[options.destination]stringPath to write the parsed result to in the state object. If not provided, the parsed result will be written to state.data.

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Get an object and write to response

getObject("dlite",'f0dd6f01-a60c-5558-b53e-188eaf62a8de', { destination: 'response' });

Example: Get an object and parse it as JSON

getObject("dlite",'f0dd6f01-a60c-5558-b53e-188eaf62a8de', { format: 'json' });

getObjectTags

getObjectTags(bucketName, objectName) ⇒ Operation

Get tags on an existing object in a MinIO bucket

ParamTypeDescription
bucketNamestringBucket containing the object
objectNamestringName/path of the object

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example

getObjectTags("my-bucket", "records/patient-001.json");

listObjects

listObjects(bucketName, [options]) ⇒ Operation

List objects in a bucket

ParamTypeDefaultDescription
bucketNamestringBucket to list objects from
[options]object{}Optional list filters
[options.prefix]string""""Prefix used to filter object names
[options.recursive]booleantrueWhether to list objects recursively. Defaults to true

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: List objects in a bucket

listObjects("my-bucket", { prefix: "openmrs/2025-04/", recursive: true });

putObject

putObject(bucketName, objectName, data, [options]) ⇒ Operation

Upload an object to a MinIO bucket

ParamTypeDefaultDescription
bucketNamestringDestination bucket
objectNamestringName/path of the object to create or overwrite
datastring | object | BufferData to upload. Serialized according to options.format
[options]object{}Upload options
[options.format]string""json""Serialization format: "json", "ndjson", "csv", or "raw"
[options.contentType]stringMIME type. Auto-inferred from format if not provided
[options.metadata]object{}User-defined metadata headers (e.g. { "x-amz-meta-source": "openmrs" })

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Upload a JSON object

putObject("my-bucket", "records/patient-001.json", state.data);

Example: Upload CSV data with custom metadata

putObject("my-bucket", "exports/report.csv", state.rows, { format: "csv", metadata: { "x-amz-meta-source": "openmrs" } });

setObjectTags

setObjectTags(bucketName, objectName, tags, [putOpts]) ⇒ Operation

Set tags on an existing object in a MinIO bucket

ParamTypeDefaultDescription
bucketNamestringBucket containing the object
objectNamestringName/path of the object to tag
tagsobjectKey-value pairs to apply as tags. Overwrites any existing tags.
[putOpts]object{}Extra put options (e.g. { versionId: "my-version-id" })

Example

setObjectTags("my-bucket", "records/patient-001.json", {
source: "openmrs",
status: "raw"
});

Example: Target a specific version

setObjectTags("my-bucket", "records/patient-001.json", { status: "processed" }, { versionId: "my-version-id" });

Interfaces

HttpState

State object

Properties

NameDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job