---
title: Package
slug: neurons-api/package
createdAt: 2026-08-19T08:34:10.409Z
---

Package actions determine how app distribution will deploy your packages. Package detection rules assist app distribution in deciding whether an app should be deployed to a device.

**HTTP Method - POST**

Adds a new package revision to the app.

- [POST /api/SwdPackage/targetDevice/external](docId\:X1lC_a3QXBseP5EM_Lq1a)

**HTTP Method - GET**

Returns a resource and resource collection.

Returns the package revisions in the application's user interface.

:::hint{type="info"}
The list of revisions present for an app, can be determined in the call to get a catalog record.
:::

- [GET /api/SwdPackage/package/external/  / ](docId\:X1lC_a3QXBseP5EM_Lq1a)

## POST Method

### Request URI

**POST /api/SwdPackage/targetDevice/external**

Each package modification results in a new version, and the system records all updates to the package as new entries.

### Header Parameters

| Name          | Type   | Description                                                                                                                                                                                                                                                   |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization | String | Use the `Bearer <access-token>` value determined during the [../Shared-Content/authenticate\_api.htm](docId\:g63kPQj5_TALr1zpNkeeN)[app-distribution-authentication.htm](docId\:fd5_JmdAucKSdgC_uJ35I)[Authentication](docId\:g63kPQj5_TALr1zpNkeeN) process. |

### Request Body Parameters

| Name        | Type   | Description                     |
| ----------- | ------ | ------------------------------- |
| api-version | String | The current API version number. |

### Example Response

```xml
{
  "packageId": "string",
  "revision": 0,
  "revisionComment": "string",
  "isLatest": true,
  "created": "2024-08-28T07:16:49.013Z",
  "createdById": "string",
  "createdByName": "string",
  "actionsData": {
    "packageId": "string",
    "packageName": "string",
    "revision": 0,
    "data": "string"
  }
}
```

## GET Method

### Request URI

**GET /api/SwdPackage/package/external//**

Retrieves a package using the specified package ID and version number.

### Header Parameters

| Name          | Type   | Description                                                                                                                                                                                                          |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization | String | Use the `Bearer <access-token>` value determined during the [../Shared-Content/authenticate\_api.htm](docId\:g63kPQj5_TALr1zpNkeeN)[Authenticate to the App Distribution API](docId\:fd5_JmdAucKSdgC_uJ35I) process. |

### Request Body Parameters

| Name        | Type   | Description                            |
| ----------- | ------ | -------------------------------------- |
| api-version | String | The current API version number.        |
| packageId   | String | Use it to call the Package ID details. |
| revision    | Number | Revision number.                       |

### Example Response

```xml
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": "string",
  "additionalProp2": "string",
  "additionalProp3": "string"
}
```
