Units API.

See the Weblate's Web API documentation for detailed description of the API.

GET /api/units/2341536/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "translation": "https://translate.checkmk.com/api/translations/checkmk/dev/es_UY/?format=api",
    "source": [
        "This rule provides a simple way to add files to agent bakery packages without the need to write a bakery plugin.<br><i>Custom files</i> are organized in folders under <tt>{omd_root}/local/share/check_mk/agents/custom</tt>.<br>To add a set of custom files to the agent, please create a subfolder there with a meaningful name of your choice.<br>Added folders will be shown in this rule for activation.<br><br>Since the agent installation paths are customizable by other rules, the file structure below these sets doesn't resemble directly to the agent installation.<br>Instead, the structure is organized in <i>logical paths</i> that map to certain target folders in the final agent installation.<br>Files placed under a <i>logical path</i> will also apply the ownership and permissions based on the agent installation.<br>Ownership and permissions on the Checkmk site's file structure don't matter, with one exception: Executable flags on files will be preserved.<br><br>Overview of <i>logical paths</i> and their targets:<ul><li><tt>lib</tt>: Internal agent files (<tt>MK_LIBDIR</tt> on the host)</li><li><tt>bin</tt>: Executables (<tt>MK_BIN</tt> on the host)</li><li><tt>var</tt>: Runtime data (<tt>MK_VARDIR</tt> on the host)</li><li><tt>config</tt>: Configuration files (<tt>MK_CONFDIR</tt> on the host)</li><li><tt>lib/plugins</tt>: Agent plugins</li><li><tt>lib/local</tt>: Local checks</li></ul><b>Example</b>: Let's say you place the following files:<br><tt>{omd_root}/local/share/check_mk/agents/custom/myset/bin/some_executable</tt><br><tt>{omd_root}/local/share/check_mk/agents/custom/myset/lib/local/my_local_check</tt><br><tt>{omd_root}/local/share/check_mk/agents/custom/myset/some_file</tt><br>and activate <i>myset</i> in this rule.<br>Then, the following files will be deployed to target hosts when not further configuring agent paths:<br><tt>/usr/bin/some_executable</tt><br><tt>/usr/lib/check_mk_agent/local/my_local_check</tt><br><tt>/usr/lib/check_mk_agent/some_file</tt><br>When activating the single directory deployment in the <i>Customize agent package</i> ruleset:<br><tt>/opt/checkmk/agent/default/package/bin/some_executable</tt><br><tt>/opt/checkmk/agent/default/package/local/my_local_check</tt><br><tt>/opt/checkmk/agent/default/package/some_file</tt><br><br><b>Note</b>: When using the windows agent, all logical paths point to the same location - the agent installation dir."
    ],
    "previous_source": "",
    "target": [
        ""
    ],
    "id_hash": 4967075000953482350,
    "content_hash": 4967075000953482350,
    "location": "cmk/gui/cee/plugins/wato/agent_bakery/rulespecs/custom_files.py:47",
    "context": "",
    "note": "",
    "flags": "python-brace-format",
    "labels": [],
    "state": 0,
    "fuzzy": false,
    "translated": false,
    "approved": false,
    "position": 17694,
    "has_suggestion": false,
    "has_comment": false,
    "has_failing_check": false,
    "num_words": 225,
    "source_unit": "https://translate.checkmk.com/api/units/2341515/?format=api",
    "priority": 100,
    "id": 2341536,
    "web_url": "https://translate.checkmk.com/translate/checkmk/dev/es_UY/?checksum=c4ee98658c8e2c6e",
    "url": "https://translate.checkmk.com/api/units/2341536/?format=api",
    "explanation": "",
    "extra_flags": "",
    "pending": false,
    "timestamp": "2025-05-01T05:04:45.921086Z"
}