---
title: Distribution
slug: neurons-api/distribution
createdAt: 2026-08-19T08:34:10.392Z
---

The following lists the HTTP methods, to add a new distribution to an app and update the existing distribution.

**HTTP Method - POST**

Adds a new distribution to the app.

- [POST /api/SwdPackage/distribution/external](docId\:mKqVeXqktdpw-jl4rs0Lt)

**HTTP Method - PUT**

Updates the existing distribution. You can add or remove the targets.

- [PUT /api/SwdPackage/distribution/external/ ](docId\:mKqVeXqktdpw-jl4rs0Lt)

**HTTP Method - GET**

Gets all the distributions of an app.

- Request without target data:[GET /api/SwdPackage/distribution/external/ ](docId\:mKqVeXqktdpw-jl4rs0Lt)
- Request with target data: GET /distribution/external/?useDeviceName=true

## POST Method

### Request URI

**POST /api/SwdPackage/distribution/external**

Adds a new distribution to the app.

### Header Parameters

| Name          | Type   | Description                                                                                                         |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| Authorization | String | Use the `Bearer <access-token>` value determined during the [Authentication](docId\:g63kPQj5_TALr1zpNkeeN) process. |

### Request Body Parameters

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

### Response Output Example

```xml
{
  "distributionId": "string",
  "distributionName": "string",
  "packageId": "string",
  "revision": 0,
  "platform": "string",
  "priority": 0,
  "enabled": true,
  "type": "UserDefined",
  "created": "2024-08-27T11:54:31.659Z",
  "createdById": "string",
  "createdByName": "string",
  "lastModified": "2024-08-27T11:54:31.659Z",
  "lastModifiedById": "string",
  "lastModifiedByName": "string",
  "installOptions_AppConfigurationId": "string",
  "installOptions_AppConfigurationName": "string",
  "scheduledTime": "string",
  "scheduledTimeIsUtc": true,
  "targets": {
    "devices": [
      {
        "agentId": "string",
        "discoveryId": "string",
        "displayName": "string",
        "domain": "string",
        "platform": "string",
        "os": "string",
        "deviceType": "string",
        "addedDate": "2024-08-27T11:54:31.659Z",
        "addedUser": "string",
        "addedUserId": "string",
        "addedUserName": "string"
      }
    ],
    "deviceGroups": [
      {
        "groupId": "string",
        "displayName": "string",
        "addedDate": "2024-08-27T11:54:31.659Z",
        "addedUser": "string",
        "addedUserId": "string",
        "addedUserName": "string"
      }
    ],
    "ldapGroups": [
      {
        "groupName": "string",
        "groupDomain": "string",
        "distinguishedName": "string",
        "ldapGroupType": "UserGroup",
        "groupSourceType": "Inventory",
        "addedDate": "2024-08-27T11:54:31.659Z",
        "addedUser": "string",
        "addedUserId": "string",
        "addedUserName": "string"
      }
    ]
  }
}
```

## PUT Method

### Request URI

**PUT /api/SwdPackage/distribution/external/**

This request edits all the catalogs.

### Header Parameters

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

### Request Body Parameters

| Name           | Type   | Description                           |
| -------------- | ------ | ------------------------------------- |
| distributionId | String | Use this to call the distribution ID. |
| api-version    | String | The current API version number.       |

### Example Response

```xml
{
  "distributionId": "string",
  "distributionName": "string",
  "packageId": "string",
  "revision": 0,
  "platform": "string",
  "priority": 0,
  "enabled": true,
  "type": "UserDefined",
  "created": "2024-08-28T05:46:41.481Z",
  "createdById": "string",
  "createdByName": "string",
  "lastModified": "2024-08-28T05:46:41.481Z",
  "lastModifiedById": "string",
  "lastModifiedByName": "string",
  "installOptions_AppConfigurationId": "string",
  "installOptions_AppConfigurationName": "string",
  "scheduledTime": "string",
  "scheduledTimeIsUtc": true,
  "targets": {
    "devices": [
      {
        "agentId": "string",
        "discoveryId": "string",
        "displayName": "string",
        "domain": "string",
        "platform": "string",
        "os": "string",
        "deviceType": "string",
        "addedDate": "2024-08-28T05:46:41.481Z",
        "addedUser": "string",
        "addedUserId": "string",
        "addedUserName": "string"
      }
    ],
    "deviceGroups": [
      {
        "groupId": "string",
        "displayName": "string",
        "addedDate": "2024-08-28T05:46:41.481Z",
        "addedUser": "string",
        "addedUserId": "string",
        "addedUserName": "string"
      }
    ],
    "ldapGroups": [
      {
        "groupName": "string",
        "groupDomain": "string",
        "distinguishedName": "string",
        "ldapGroupType": "UserGroup",
        "groupSourceType": "Inventory",
        "addedDate": "2024-08-28T05:46:41.481Z",
        "addedUser": "string",
        "addedUserId": "string",
        "addedUserName": "string"
      }
    ]
  }
}
```

## GET Method

### Request URI

**GET /api/SwdPackage/distribution/external/**

Calls all the distributions of an app.

### 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                            |
| ----------- | ------ | -------------------------------------- |
| packageId   | String | Use it to call the Package ID details. |
| api-version | String | The current API version number.        |
