/mgmt/shared/iapp/package-management-tasks

This API is used to execute iControl LX/iApps LX package operations. The supported operations are currently INSTALL, UNINSTALL, and QUERY.


Package management task object attributes

Package Management Task Attributes
Attribute RO/RW Type Description
operation RW String (Enum) See table below for list of enumerated values.
status RO String (Enum) Possible status states: CREATED, STARTED, CANCEL_REQUESTED, CANCELED, FAILED, FINISHED
ownerMachineId RO String (UUID) In a high-availability environment, the machineId of the host running the task.
userReference RO Object A link to the user who initiated the task.
identityReferences RO Array A list of the authenticated identities used to initiate the task.

Package Task operation Attribute Enumeration
Value Description
INSTALL Package operation used to install/upgrade iApp Package
UNINSTALL Package operation used to uninstall iApp Package
QUERY Package operation used to list all installed iApp packages or package specified in packageName

Action: Get list of package management tasks

Gets a list of all package management tasks.

URI Path HTTP Method
/mgmt/shared/iapp/package-management-tasks GET

Success Response

HTTP/1.1 200 OK
{
  "items": [
    {
      "packageFilePath": "/var/config/rest/iapps/RPMS/NotMyWorker-0.1.0-0001.noarch.rpm",
      "packageName": "NotMyWorker-0.1.0-0001.noarch",
      "operation": "INSTALL",
      "packageManifest": {
        "tags": [
          "IAPP"
        ]
      },
      "id": "1520b139-1920-4723-bbb0-43b16df35b06",
      "status": "FINISHED",
      "startTime": "2018-01-29T20:39:32.784-0800",
      "endTime": "2018-01-29T20:39:33.344-0800",
      "userReference": {
        "link": "https://localhost/mgmt/shared/authz/users/admin"
      },
      "identityReferences": [
        {
          "link": "https://localhost/mgmt/shared/authz/users/admin"
        }
      ],
      "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
      "generation": 3,
      "lastUpdateMicros": 1517287173344680,
      "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
      "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/1520b139-1920-4723-bbb0-43b16df35b06"
    }
  ],
  "generation": 30,
  "kind": "shared:iapp:package-management-tasks:iapppackagemanagementcollectionstate",
  "lastUpdateMicros": 1517287173367057,
  "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks"
}

Error Response

HTTP/1.1 401 Unauthorized

Example Call

curl -sk -u 'admin:admin' https://<BIG-IP>/mgmt/shared/iapp/package-management-tasks

Action: Get status of single package management task

Get status of single package management task.

URI Path HTTP Method
/mgmt/shared/iapp/package-management-tasks/<task_UUID> GET

Success Response

HTTP/1.1 200 OK

{
  "packageName": "NotMyWorker-0.1.0-0001.noarch",
  "operation": "UNINSTALL",
  "id": "d8d5ba2b-7533-4502-b22d-b4b7f42a362d",
  "status": "FINISHED",
  "startTime": "2018-01-31T12:36:16.030-0800",
  "endTime": "2018-01-31T12:36:16.533-0800",
  "userReference": {
    "link": "https://localhost/mgmt/shared/authz/users/admin"
  },
  "identityReferences": [
    {
      "link": "https://localhost/mgmt/shared/authz/users/admin"
    }
  ],
  "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
  "generation": 3,
  "lastUpdateMicros": 1517430976533810,
  "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
  "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/d8d5ba2b-7533-4502-b22d-b4b7f42a362d"
}

Error Response

Unauthorized

HTTP/1.1 401 Unauthorized

Task GUID does not exist

HTTP/1.1 404 Not Found
{
  "code": 404,
  "message": "shared/iapp/package-management-tasks/86fe0fce-9220-40f8-89c0-699e67b61bdf",
  "referer": "192.168.1.1",
  "restOperationId": 14938529,
  "kind": ":resterrorresponse"
}

Example Call

curl -sk -u 'admin:admin' https://<BIG-IP>/mgmt/shared/iapp/package-management-tasks/d8d5ba2b-7533-4502-b22d-b4b7f42a362d

Action: Install and load iControl LX/iApps LX pacakge

Install a pacakge into the iControl LX/iApps® LX system.

Note

This action is asynchronous. Once you call this action you must then use the id UUID attribute to call the API to check the status. See section Action: Get status of single package management task for more details.

URI Path HTTP Method
/mgmt/shared/iapp/package-management-tasks POST

Data Parameters

{
  "operation": "INSTALL",
  "packageFilePath": "/var/config/rest/downloads/NotMyWorker-0.1.0-0001.noarch.rpm"
}

Success Response

HTTP/1.1 200 OK

{
  "packageFilePath": "/var/config/rest/iapps/RPMS/NotMyWorker-0.1.0-0001.noarch.rpm",
  "operation": "INSTALL",
  "id": "86fe0fce-9220-40f8-89c0-699e67b61bd6",
  "status": "CREATED",
  "userReference": {
    "link": "https://localhost/mgmt/shared/authz/users/admin"
  },
  "identityReferences": [
    {
      "link": "https://localhost/mgmt/shared/authz/users/admin"
    }
  ],
  "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
  "generation": 1,
  "lastUpdateMicros": 1517431876574386,
  "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
  "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/86fe0fce-9220-40f8-89c0-699e67b61bd6"
}

Then call the task to see the results:

GET /mgmt/shared/iapp/package-management-tasks/86fe0fce-9220-40f8-89c0-699e67b61bd6 HTTP/1.1

Sucess Response of task call:

HTTP/1.1 200 OK
{
  "packageFilePath": "/var/config/rest/iapps/RPMS/NotMyWorker-0.1.0-0001.noarch.rpm",
  "packageName": "NotMyWorker-0.1.0-0001.noarch",
  "operation": "INSTALL",
  "packageManifest": {
    "tags": [
      "IAPP"
    ]
  },
  "id": "86fe0fce-9220-40f8-89c0-699e67b61bd6",
  "status": "FINISHED",
  "startTime": "2018-01-31T12:51:16.582-0800",
  "endTime": "2018-01-31T12:51:17.367-0800",
  "userReference": {
    "link": "https://localhost/mgmt/shared/authz/users/admin"
  },
  "identityReferences": [
    {
      "link": "https://localhost/mgmt/shared/authz/users/admin"
    }
  ],
  "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
  "generation": 3,
  "lastUpdateMicros": 1517431877367884,
  "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
  "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/86fe0fce-9220-40f8-89c0-699e67b61bd6"
}

Error Response

HTTP/1.1 401 Unauthorized

Example Call

curl -sk -H 'Content-Type: application/json' -u 'admin:admin' \
https://<BIG-IP>/mgmt/shared/iapp/package-management-tasks/ \
-d '{ "operation": "INSTALL", "packageFilePath": "/var/config/rest/downloads/NotMyWorker-0.1.0-0001.noarch.rpm" }'

Action: Uninstall an iControl LX/iAppLX package

Remove a pacakge from the iControl LX/iApps® LX system.

Note

This action is asynchronous. Once you call this action you must then use the id UUID attribute to call the API to check the status. See section Action: Get status of single package management task for more details.

URI Path HTTP Method
/mgmt/shared/iapp/package-management-tasks POST

Data Parameters

{
  "operation": "UNINSTALL",
  "packageName": "NotMyWorker-0.1.0-0001.noarch"
}

Success Response

HTTP/1.1 200 OK

{
    "packageName": "NotMyWorker-0.1.0-0001.noarch",
    "operation": "UNINSTALL",
    "id": "d8d5ba2b-7533-4502-b22d-b4b7f42a362d",
    "status": "CREATED",
    "userReference": {
        "link": "https://localhost/mgmt/shared/authz/users/admin"
    },
    "identityReferences": [
        {
            "link": "https://localhost/mgmt/shared/authz/users/admin"
        }
    ],
    "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
    "generation": 1,
    "lastUpdateMicros": 1517430976026774,
    "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
    "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/d8d5ba2b-7533-4502-b22d-b4b7f42a362d"
}

Then call the task to see the results:

GET /mgmt/shared/iapp/package-management-tasks/d8d5ba2b-7533-4502-b22d-b4b7f42a362d HTTP/1.1

Sucess Response of task call:

HTTP/1.1 200 OK
{
  "packageName": "NotMyWorker-0.1.0-0001.noarch",
  "operation": "UNINSTALL",
  "id": "d8d5ba2b-7533-4502-b22d-b4b7f42a362d",
  "status": "FINISHED",
  "startTime": "2018-01-31T12:36:16.030-0800",
  "endTime": "2018-01-31T12:36:16.533-0800",
  "userReference": {
    "link": "https://localhost/mgmt/shared/authz/users/admin"
  },
  "identityReferences": [
    {
      "link": "https://localhost/mgmt/shared/authz/users/admin"
    }
  ],
  "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
  "generation": 3,
  "lastUpdateMicros": 1517430976533810,
  "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
  "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/d8d5ba2b-7533-4502-b22d-b4b7f42a362d"
}

Error Response

HTTP/1.1 401 Unauthorized

Example Call

curl -sk -H 'Content-Type: application/json' -u 'admin:admin' \
https://<BIG-IP>/mgmt/shared/iapp/package-management-tasks/ \
-d '{ "operation": "UNINSTALL", "packageName": "NotMyWorker-0.1.0-0001.noarch" }'

Action: Query all installed packages

Allows a user to query the installed iControl LX/iApps® LX packages.

Note

This action is asynchronous. Once you call this action you must then use the id UUID attribute to call the API to check the status. See section Action: Get status of single package management task for more details.

URI Path HTTP Method
/mgmt/shared/iapp/package-management-tasks POST

Data Parameters

{ "operation": "QUERY" }

Success Response

HTTP/1.1 200 OK

{
  "operation": "QUERY",
  "id": "615a00c8-ce9d-43ab-862f-cd39a7be64bf",
  "status": "CREATED",
  "userReference": {
    "link": "https://localhost/mgmt/shared/authz/users/admin"
  },
  "identityReferences": [
    {
      "link": "https://localhost/mgmt/shared/authz/users/admin"
    }
  ],
  "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
  "generation": 1,
  "lastUpdateMicros": 1517429216271775,
  "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
  "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/615a00c8-ce9d-43ab-862f-cd39a7be64bf"
}

Then call the task to see the results:

GET /mgmt/shared/iapp/package-management-tasks/615a00c8-ce9d-43ab-862f-cd39a7be64bf HTTP/1.1

Sucess response of task call

HTTP/1.1 200 OK
{
  "queryResponse": [
    {
      "name": "TestWorker",
      "version": "0.1.0",
      "release": "0001",
      "arch": "noarch",
      "packageName": "TestWorker-0.1.0-0001.noarch",
      "tags": [
        "IAPP"
      ]
    },
    {
      "name": "NotMyWorker",
      "version": "0.1.0",
      "release": "0001",
      "arch": "noarch",
      "packageName": "NotMyWorker-0.1.0-0001.noarch",
      "tags": [
        "IAPP"
      ]
    }
  ],
  "operation": "QUERY",
  "id": "615a00c8-ce9d-43ab-862f-cd39a7be64bf",
  "status": "FINISHED",
  "startTime": "2018-01-31T12:06:56.278-0800",
  "endTime": "2018-01-31T12:06:56.300-0800",
  "userReference": {
    "link": "https://localhost/mgmt/shared/authz/users/admin"
  },
  "identityReferences": [
    {
      "link": "https://localhost/mgmt/shared/authz/users/admin"
    }
  ],
  "ownerMachineId": "44e002f8-c5e9-49b5-aed4-67a4e79c1b6b",
  "generation": 3,
  "lastUpdateMicros": 1517429216300799,
  "kind": "shared:iapp:package-management-tasks:iapppackagemanagementtaskstate",
  "selfLink": "https://localhost/mgmt/shared/iapp/package-management-tasks/615a00c8-ce9d-43ab-862f-cd39a7be64bf"
}

Error Response

HTTP/1.1 401 Unauthorized

Example Call

curl -sk -H 'Content-Type: application/json' -u 'admin:admin' \
https://<BIG-IP>/mgmt/shared/iapp/package-management-tasks/ -d '{"operation": "QUERY"}'