cotto

Reference for the cotto command-line tool.

Syntax

cotto [OPTIONS]

Options

Required Parameters

Parameter
Description

--objectUuid <uuid>

Object UUIDv4 to download

Optional Parameters

Parameter
Default
Description

--fileExtension <ext>

xml

File extension for download output

--pathStorage <dir>

.

Directory to store output files

Help and Version

Parameter
Description

--help, -h

Display help information

--version, -v

Display version information

Use Cases

Download

Downloads data from OTTER server using object UUID.

Example:

Environment Variables

Variable
Default
Description

CERTIFICATE_PIN

123456

PIN for certificate access

DEVELOPER_ID

00000

Five digit long Developer-ID given by ELSTER

PATH_CERTIFICATE

bin/eric/test-softorg-pse.pfx

Path to certificate file for send/transmit operations

Output Format

cotto outputs a single JSON object to stdout with the following structure, which follows the Responseschema:

JSON Fields

Field
Type
Description

$schema

string

Fixed value: "ceric-response.json"

exitCode

string

Numeric application exit code (stringified)

message

string

Human-readable status message

pathStorage

string

Provided path to storage

pathXmlWithHeader

null

n/a for cotto

pathOutputFile

string|null

Absolute path to downloaded content

timestamp

null

n/a for cotto

ericCode

string|null

Otto native error code (when available)

ericMessage

string|null

Otto native error message (when available)

processResult

null

n/a for cotto

serverResponse

null

n/a for cotto

otherOutput

string|null

Additional (eventually) unformatted output

Exit Codes

Code
Meaning

0

OK - Operation completed successfully

1

Unknown or incomplete argument - Invalid command line argument

2

Help displayed - --help or -h was used

3

Version displayed - --version or -v was used

15

Storage directory creation failed - Could not create storage directory

16

Storage path not a directory - Storage path exists but is not a directory

17

Storage directory not writable - Storage directory is not writable

18

Storage directory error - Other storage directory related error

19

Missing required argument for download - --objectUuid <uuid> not provided for download usecase

30

Invalid UUID format - Object UUID is not in valid UUID v4 format

170

Could not initialize download use case - Check otto.log for details

171

Download completed but returned empty data - Otto download succeeded but no data received

172

Error during Otto data download - Download operation failed

173

Failed to write downloaded data to file - File write error for download output

190

Internal error: no exit code determined - Unexpected internal state

Examples

Download Protocol and store as xml in provided path

Troubleshooting

Common Issues

  1. Binary not found: Ensure cotto binary exists and is executable

  2. Otto libraries missing: Check that Otto library and eSigner library are in the correct directory

  3. Certificate issues: Verify certificate path and PIN are correct

  4. Permission errors: Ensure storage directory is writable

Debug Information

Check the following log files for detailed error information:

  • otto.log - Download operation logs

Last updated