# Segment

> Read and manage Segment sources, destinations, tracking plans, user groups and workspace configuration.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/segment

## Actions

### Create tracking plan

Create tracking plan.

**Inputs**

- Name (`name`, text, required): The Tracking Plan's name. Config API note: equal to `displayName`.
- Description (`description`, text): The Tracking Plan's description.
- Type (`type`, text, required): The Tracking Plan's type. One of: `ENGAGE`, `LIVE`, `PROPERTY_LIBRARY`, `RULE_LIBRARY`, `TEMPLATE`.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "trackingPlan": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Create user group

Create user group.

**Inputs**

- Name (`name`, text, required): The name of the user group to create.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "userGroup": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Delete tracking plan

Delete tracking plan.

**Inputs**

- Tracking plan (`tracking_plan_id`, text, required): trackingPlanId. From 1 to 255.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "status": "SUCCESS"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Delete user group

Delete user group.

**Inputs**

- User group id (`user_group_id`, text, required): userGroupId. From 1 to 255.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "status": "SUCCESS"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get destination

Get destination.

**Inputs**

- Destination (`destination_id`, text, required): destinationId. From 1 to 255.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "destination": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get source

Get source.

**Inputs**

- Source (`source_id`, text, required): sourceId. From 1 to 255.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "source": {},
      "trackingPlanId": ""
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get tracking plan

Get tracking plan.

**Inputs**

- Tracking plan (`tracking_plan_id`, text, required): trackingPlanId. From 1 to 255.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "trackingPlan": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get user group

Get user group.

**Inputs**

- User group id (`user_group_id`, text, required): userGroupId. From 1 to 255.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "userGroup": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get warehouse

Get warehouse.

**Inputs**

- Warehouse id (`warehouse_id`, text, required): warehouseId. From 1 to 255.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "warehouse": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List destinations

List destinations. Returns one page; use the continuation value for more records.

**Inputs**

- Count (`count`, number): Records per page, 1 to 1000. From 1 to 1000.
- Cursor (`cursor`, text): Continuation value from the previous page.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "destinations": [],
      "pagination": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List labels

List labels.

**Inputs**: None.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "labels": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List sources

List sources. Returns one page; use the continuation value for more records.

**Inputs**

- Count (`count`, number): Records per page, 1 to 1000. From 1 to 1000.
- Cursor (`cursor`, text): Continuation value from the previous page.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {},
      "sources": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List tracking plans

List tracking plans. Returns one page; use the continuation value for more records.

**Inputs**

- Count (`count`, number): Records per page, 1 to 1000. From 1 to 1000.
- Cursor (`cursor`, text): Continuation value from the previous page.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {},
      "trackingPlans": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List user groups

List user groups. Returns one page; use the continuation value for more records.

**Inputs**

- Count (`count`, number): Records per page, 1 to 1000. From 1 to 1000.
- Cursor (`cursor`, text): Continuation value from the previous page.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {},
      "userGroups": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List users

List users. Returns one page; use the continuation value for more records.

**Inputs**

- Count (`count`, number): Count.
- Cursor (`cursor`, text): Cursor.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {},
      "users": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List warehouses

List warehouses. Returns one page; use the continuation value for more records.

**Inputs**

- Count (`count`, number): Records per page, 1 to 1000. From 1 to 1000.
- Cursor (`cursor`, text): Continuation value from the previous page.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {},
      "warehouses": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update destination

Update destination.

**Inputs**

- Destination (`destination_id`, text, required): destinationId. From 1 to 255.
- Name (`name`, text): Defines the display name of the Destination. Config API note: equal to `displayName`.
- Enabled (`enabled`, true/false): Whether this Destination should receive data.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "destination": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update source

Update source.

**Inputs**

- Source (`source_id`, text, required): sourceId. From 1 to 255.
- Name (`name`, text): An optional human-readable name to associate with the Source. Config API note: equal to `displayName`.
- Enabled (`enabled`, true/false): Enable to allow the Source to send data.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "source": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update tracking plan

Update tracking plan.

**Inputs**

- Tracking plan (`tracking_plan_id`, text, required): trackingPlanId. From 1 to 255.
- Name (`name`, text): The Tracking Plan's name. Config API note: equal to `displayName`.
- Description (`description`, text): The Tracking Plan's description.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "status": "SUCCESS"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update user group

Update user group.

**Inputs**

- User group id (`user_group_id`, text, required): userGroupId. From 1 to 255.
- Name (`name`, text, required): The intended value to rename the user group to.

**Outputs**: Result.

- `data` (object): Complete service response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {
    "data": {
      "userGroup": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```
