{
    "content": [
        {
            "type": "text",
            "text": "# org.freedesktop.portable1 (man)\n\n## NAME\n\norg.freedesktop.portable1 - The D-Bus interface of systemd-portabled\n\n## Sections\n\n- **NAME**\n- **INTRODUCTION**\n- **THE MANAGER OBJECT** (2 subsections)\n- **THE IMAGE OBJECT** (2 subsections)\n- **VERSIONING**\n- **NOTES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "org.freedesktop.portable1",
        "section": "",
        "mode": "man",
        "summary": "org.freedesktop.portable1 - The D-Bus interface of systemd-portabled",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INTRODUCTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "THE MANAGER OBJECT",
                "lines": 103,
                "subsections": [
                    {
                        "name": "Methods",
                        "lines": 119
                    },
                    {
                        "name": "Properties",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "THE IMAGE OBJECT",
                "lines": 102,
                "subsections": [
                    {
                        "name": "Methods",
                        "lines": 33
                    },
                    {
                        "name": "Properties",
                        "lines": 20
                    }
                ]
            },
            {
                "name": "VERSIONING",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "org.freedesktop.portable1 - The D-Bus interface of systemd-portabled\n",
                "subsections": []
            },
            "INTRODUCTION": {
                "content": "systemd-portabled.service(8) is a system service that may be used to attach, detach and\ninspect portable services. This page describes the D-Bus interface.\n",
                "subsections": []
            },
            "THE MANAGER OBJECT": {
                "content": "The service exposes the following interfaces on the Manager object on the bus:\n\nnode /org/freedesktop/portable1 {\ninterface org.freedesktop.portable1.Manager {\nmethods:\nGetImage(in  s image,\nout o object);\nListImages(out a(ssbtttso) images);\nGetImageOSRelease(in  s image,\nout a{ss} osrelease);\nGetImageMetadata(in  s image,\nin  as matches,\nout s image,\nout ay osrelease,\nout a{say} units);\nGetImageMetadataWithExtensions(in  s image,\nin  as extensions,\nin  as matches,\nin  t flags,\nout s image,\nout ay osrelease,\nout a{say} extensions,\nout a{say} units);\nGetImageState(in  s image,\nout s state);\nAttachImage(in  s image,\nin  as matches,\nin  s profile,\nin  b runtime,\nin  s copymode,\nout a(sss) changes);\nAttachImageWithExtensions(in  s image,\nin  as extensions,\nin  as matches,\nin  s profile,\nin  s copymode,\nin  t flags,\nout a(sss) changes);\nDetachImage(in  s image,\nin  b runtime,\nout a(sss) changes);\nDetachImageWithExtensions(in  s image,\nin  as extensions,\nin  t flags,\nout a(sss) changes);\nReattachImage(in  s image,\nin  as matches,\nin  s profile,\nin  b runtime,\nin  s copymode,\nout a(sss) changesremoved,\nout a(sss) changesupdated);\nReattachImageWithExtensions(in  s image,\nin  as extensions,\nin  as matches,\nin  s profile,\nin  s copymode,\nin  t flags,\nout a(sss) changesremoved,\nout a(sss) changesupdated);\nRemoveImage(in  s image);\nMarkImageReadOnly(in  s image,\nin  b readonly);\nSetImageLimit(in  s image,\nin  t limit);\nSetPoolLimit(in  t limit);\nproperties:\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly s PoolPath = '...';\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t PoolUsage = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t PoolLimit = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly as Profiles = ['...', ...];\n};\ninterface org.freedesktop.DBus.Peer { ... };\ninterface org.freedesktop.DBus.Introspectable { ... };\ninterface org.freedesktop.DBus.Properties { ... };\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
                "subsections": [
                    {
                        "name": "Methods",
                        "content": "GetImage() may be used to get the image object path of the image with the specified name.\n\nListImages() returns an array of all currently known images. The structures in the array\nconsist of the following fields: image name, type, read-only flag, creation time,\nmodification time, current disk space, usage and image object path.\n\nGetImageOSRelease() retrieves the OS release information of an image. This method returns an\narray of key value pairs read from the os-release(5) file in the image and is useful to\nidentify the operating system used in a portable service.\n\nGetImageMetadata() retrieves metadata associated with an image. This method returns the image\nname, the image's os-release(5) content in the form of a (streamable) array of bytes, and a\nlist of portable units contained in the image, in the form of a string (unit name) and an\narray of bytes with the content.\n\nGetImageMetadataWithExtensions() retrieves metadata associated with an image. This method is\na superset of GetImageMetadata() with the addition of a list of extensions as input\nparameter, which were overlaid on top of the main image via AttachImageWithExtensions(). The\npath of each extension and an array of bytes with the content of the respective\nextension-release file are returned, one such structure for each extension named in the input\narguments.\n\nGetImageState() retrieves the image state as one of the following strings:\n\n•   detached\n\n•   attached\n\n•   attached-runtime\n\n•   enabled\n\n•   enabled-runtime\n\n•   running\n\n•   running-runtime\n\nAttachImage() attaches a portable image to the system. This method takes an image path or\nname, a list of strings that will be used to search for unit files inside the image (partial\nor complete matches), a string indicating which portable profile to use for the image (see\nProfiles property for a list of available profiles), a boolean indicating whether to attach\nthe image only for the current boot session, and a string representing the preferred copy\nmode (whether to copy the image or to just symlink it) with the following possible values:\n\n•   (null)\n\n•   copy\n\n•   symlink\n\nThis method returns the list of changes applied to the system (for example, which unit was\nadded and is now available as a system service). Each change is represented as a triplet of\nstrings: the type of change applied, the path on which it was applied, and the source (if\nany). The type of change applied will be one of the following possible values:\n\n•   copy\n\n•   symlink\n\n•   write\n\n•   mkdir\n\nNote that an image cannot be attached if a unit that it contains is already present on the\nsystem.\n\nAttachImageWithExtensions() attaches a portable image to the system. This method is a\nsuperset of AttachImage() with the addition of a list of extensions as input parameter, which\nwill be overlaid on top of the main image. When this method is used, detaching must be done\nby passing the same arguments via the DetachImageWithExtensions() method. For more details on\nthis functionality, see the MountImages= entry on systemd.exec(5) and systemd-sysext(8). The\nflag parameter is currently unused and reserved for future purposes.\n\nDetachImage() detaches a portable image from the system. This method takes an image path or\nname, and a boolean indicating whether the image to detach was attached only for the current\nboot session or persistently. This method returns the list of changes applied to the system\n(for example, which unit was removed and is no longer available as a system service). Each\nchange is represented as a triplet of strings: the type of change applied, the path on which\nit was applied, and the source (if any). The type of change applied will be one of the\nfollowing possible values:\n\n•   unlink\n\nNote that an image cannot be detached if a unit that it contains is running.\n\nDetachImageWithExtensions() detaches a portable image from the system. This method is a\nsuperset of DetachImage() with the addition of a list of extensions as input parameter, which\nwere overlaid on top of the main image via AttachImageWithExtensions(). The flag parameter is\ncurrently unused and reserved for future purposes.\n\nReattachImage() combines the effects of the AttachImage() method and the DetachImage()\nmethod. The difference is that it is allowed to reattach an image while one or more of its\nunits are running. The reattach operation will fail if no matching image is attached. The\ninput parameters match the AttachImage() method, and the return parameters are the\ncombination of the return parameters of the DetachImage() method (first array, units that\nwere removed) and the AttachImage() method (second array, units that were updated or added).\n\nReattachImageWithExtensions() reattaches a portable image to the system. This method is a\nsuperset of ReattachImage() with the addition of a list of extensions as input parameter,\nwhich will be overlaid on top of the main image. For more details on this functionality, see\nthe MountImages= entry on systemd.exec(5) and systemd-sysext(8). The flag parameter is\ncurrently unused and reserved for future purposes\n\nRemoveImage() removes the image with the specified name.\n\nMarkImageReadOnly() toggles the read-only flag of an image.\n\nSetPoolLimit() sets an overall quota limit on the pool of images.\n\nSetImageLimit() sets a per-image quota limit.\n\nThe AttachImageWithExtensions(), DetachImageWithExtensions() and\nReattachImageWithExtensions() methods take in options as flags instead of booleans to allow\nfor extendability, defined as follows:\n\n#define SDSYSTEMDPORTABLERUNTIME  (UINT64C(1) << 0)\n\n"
                    },
                    {
                        "name": "Properties",
                        "content": "PoolPath specifies the file system path where images are written to.\n\nPoolUsage specifies the current usage size of the image pool in bytes.\n\nPoolLimit specifies the size limit of the image pool in bytes.\n\nProfiles specifies the available runtime profiles for portable services.\n"
                    }
                ]
            },
            "THE IMAGE OBJECT": {
                "content": "The service exposes the following interfaces on the Image object on the bus:\n\nnode /org/freedesktop/portable1 {\ninterface org.freedesktop.portable1.Image {\nmethods:\nGetOSRelease(out a{ss} osrelease);\nGetMetadata(in  as matches,\nout s image,\nout ay osrelease,\nout a{say} units);\nGetMetadataWithExtensions(in  as extensions,\nin  as matches,\nin  t flags,\nout s image,\nout ay osrelease,\nout a{say} extensions,\nout a{say} units);\nGetState(out s state);\nAttach(in  as matches,\nin  s profile,\nin  b runtime,\nin  s copymode,\nout a(sss) changes);\nAttachWithExtensions(in  as extensions,\nin  as matches,\nin  s profile,\nin  s copymode,\nin  t flags,\nout a(sss) changes);\nDetach(in  b runtime,\nout a(sss) changes);\nDetachWithExtensions(in  as extensions,\nin  t flags,\nout a(sss) changes);\nReattach(in  as matches,\nin  s profile,\nin  b runtime,\nin  s copymode,\nout a(sss) changesremoved,\nout a(sss) changesupdated);\nReattacheWithExtensions(in  as extensions,\nin  as matches,\nin  s profile,\nin  s copymode,\nin  t flags,\nout a(sss) changesremoved,\nout a(sss) changesupdated);\nRemove();\nMarkReadOnly(in  b readonly);\nSetLimit(in  t limit);\nproperties:\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly s Name = '...';\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly s Path = '...';\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly s Type = '...';\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly b ReadOnly = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t CreationTimestamp = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t ModificationTimestamp = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t Usage = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t Limit = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t UsageExclusive = ...;\n@org.freedesktop.DBus.Property.EmitsChangedSignal(\"false\")\nreadonly t LimitExclusive = ...;\n};\ninterface org.freedesktop.DBus.Peer { ... };\ninterface org.freedesktop.DBus.Introspectable { ... };\ninterface org.freedesktop.DBus.Properties { ... };\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
                "subsections": [
                    {
                        "name": "Methods",
                        "content": "The following methods implement the same operation as the respective methods on the Manager\nobject (see above). However, these methods operate on the image object and hence does not\ntake an image name parameter. Invoking the methods directly on the Manager object has the\nadvantage of not requiring a GetImage() call to get the image object for a specific image\nname. Calling the methods on the Manager object is hence a round trip optimization. List of\nmethods:\n\n•   GetOSRelease()\n\n•   GetMetadata()\n\n•   GetMetadataWithExtensions()\n\n•   GetState()\n\n•   Attach()\n\n•   AttachWithExtensions()\n\n•   Detach()\n\n•   DetachWithExtensions()\n\n•   Reattach()\n\n•   ReattacheWithExtensions()\n\n•   Remove()\n\n•   MarkReadOnly()\n\n•   SetLimit()\n"
                    },
                    {
                        "name": "Properties",
                        "content": "Name specifies the image name.\n\nPath specifies the file system path where image is stored.\n\nType specifies the image type.\n\nReadOnly specifies whether the image is read-only.\n\nCreationTimestamp specifies the image creation timestamp.\n\nModificationTimestamp specifies the image modification timestamp.\n\nUsage specifies the image disk usage.\n\nLimit specifies the image disk usage limit.\n\nUsageExclusive specifies the image disk usage (exclusive).\n\nLimitExclusive specifies the image disk usage limit (exclusive).\n"
                    }
                ]
            },
            "VERSIONING": {
                "content": "These D-Bus interfaces follow the usual interface versioning guidelines[1].\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. the usual interface versioning guidelines\nhttp://0pointer.de/blog/projects/versioning-dbus.html\n\n\n\nsystemd 249                                                             ORG.FREEDESKTOP.PORTABLE1(5)",
                "subsections": []
            }
        }
    }
}