# Databox

> Send records to Databox datasets and read metrics, dashboards and data sources.

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

## Actions

### Create data source

Create data source.

**Inputs**

- Idempotency key (`idempotency_key`, text): A client-generated unique value (for example, a UUID) that lets you safely retry this request without risking duplicate side effects. If a request is retried with the same key within 24 hours of the original request, the API returns the original response instead of re-executing the operation.
- Name (`name`, text, required): Display name of the data source.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "connectionId": 1,
      "createdAt": "example",
      "id": 1,
      "integrationKey": "example",
      "lastActivityAt": "example",
      "managedBy": {
        "id": 1,
        "name": "example"
      },
      "name": "example",
      "statusInfo": {
        "description": "example",
        "errorType": "example",
        "reason": "example",
        "status": "example",
        "statusCode": "example",
        "userAction": "example"
      },
      "syncInterval": 1,
      "timezone": "example"
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Create dataset

Create dataset.

**Inputs**

- Idempotency key (`idempotency_key`, text): A client-generated unique value (for example, a UUID) that lets you safely retry this request without risking duplicate side effects. If a request is retried with the same key within 24 hours of the original request, the API returns the original response instead of re-executing the operation.
- Name (`name`, text, required): Display name of the dataset.
- Data source (`data_source_id`, number, required): Unique identifier for the data source.
- Primary key (`primary_key`, list): Column identifiers that form the dataset's primary key.
- Schema (`schema`, list, required): Column definitions for the dataset.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "example",
      "dataSourceId": 1,
      "id": 1,
      "ingestionInfo": {
        "lastIngestionAt": "example",
        "lastStatus": "example"
      },
      "ingestionSupported": true,
      "lastActivityAt": "example",
      "name": "example",
      "statusInfo": {
        "description": "example",
        "errorType": "example",
        "reason": "example",
        "status": "example",
        "statusCode": "example",
        "userAction": "example"
      },
      "syncInfo": {
        "initiatedAt": "example",
        "lastSuccessfulSyncAt": "example",
        "status": "example",
        "type": "example"
      },
      "timezone": "example",
      "type": "example",
      "verificationInfo": {
        "isVerified": true
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Delete data source

Delete data source.

**Inputs**

- Data source (`data_source_id`, number, required): Unique identifier for the data source.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "message": "example"
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Delete dataset

Delete dataset.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "message": "example"
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Get data source

Get data source.

**Inputs**

- Data source (`data_source_id`, number, required): Unique identifier for the data source.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "connectionId": 1,
      "createdAt": "example",
      "id": 1,
      "integrationKey": "example",
      "lastActivityAt": "example",
      "managedBy": {
        "id": 1,
        "name": "example"
      },
      "name": "example",
      "statusInfo": {
        "description": "example",
        "errorType": "example",
        "reason": "example",
        "status": "example",
        "statusCode": "example",
        "userAction": "example"
      },
      "syncInterval": 1,
      "timezone": "example"
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Get dataset

Get dataset.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "columnCount": 1,
      "createdAt": "example",
      "dataSourceId": 1,
      "id": 1,
      "ingestionInfo": {
        "initiatedAt": "example",
        "lastSuccessfulIngestionAt": "example",
        "status": "example"
      },
      "ingestionSupported": true,
      "lastActivityAt": "example",
      "managedBy": {
        "id": 1,
        "name": "example"
      },
      "maxSize": 1,
      "name": "example",
      "primaryKey": [
        "example"
      ],
      "rowCount": 1,
      "size": 1,
      "statusInfo": {
        "description": "example",
        "errorType": "example",
        "reason": "example",
        "status": "example",
        "statusCode": "example",
        "userAction": "example"
      },
      "syncInfo": {
        "initiatedAt": "example",
        "lastSuccessfulSyncAt": "example",
        "status": "example",
        "type": "example"
      },
      "syncInterval": 1,
      "timezone": "example",
      "type": "example",
      "verificationInfo": {
        "isVerified": true,
        "verifiedAt": "example",
        "verifiedBy": {
          "id": 1,
          "name": "example"
        }
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Get dataset ingestion

Get dataset ingestion.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.
- Ingestion ID (`ingestion_id`, text, required): Unique identifier for the ingestion.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "duration": 1,
      "errors": [
        {
          "code": "example",
          "field": "example",
          "message": "example",
          "record": {}
        }
      ],
      "id": "example",
      "initiatedAt": "example",
      "initiatedBy": {
        "id": 1,
        "name": "example"
      },
      "status": "example",
      "summary": {
        "dataset": {
          "columnCount": 1,
          "rowCount": 1,
          "size": 1
        },
        "ingestion": {
          "appendedRecordCount": 1,
          "overwrittenRecordCount": 1,
          "receivedRecordCount": 1,
          "rejectedRecordCount": 1
        }
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Get dataset schema

Get dataset schema.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "items": [
        {
          "dataType": "example",
          "displayName": "example",
          "id": "example",
          "order": 1,
          "visible": true
        }
      ],
      "primaryKey": [
        "example"
      ]
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Get metric

Get metric.

**Inputs**

- Metric (`metric_id`, text, required): Unique identifier for the metric.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "aggregationFunction": "example",
      "availableGranularities": [
        "example"
      ],
      "date": {
        "displayName": "example",
        "id": "example"
      },
      "description": "example",
      "dimensions": [
        {
          "displayName": "example",
          "id": "example"
        }
      ],
      "filters": {
        "conditions": [
          {}
        ],
        "logicalOperator": "example"
      },
      "id": "example",
      "isAggregatable": true,
      "measure": {
        "displayName": "example",
        "id": "example"
      },
      "name": "example",
      "sourceId": 1,
      "supportsDrilldown": true,
      "type": "example",
      "verificationInfo": {
        "isVerified": true,
        "verifiedAt": "example",
        "verifiedBy": {
          "id": 1,
          "name": "example"
        }
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Get metric values

Get metric values.

**Inputs**

- Metric (`metric_id`, text, required): Unique identifier for the metric.
- Source ID (`source_id`, number): Unique identifier for the data source or dataset.
- Dimension IDS (`dimension_ids`, list): Dimension IDs used to break down the returned values.
- Filters (`filters`, object): Filters applied when loading the metric's data.
- Start date (`start_date`, date, required): First date to include.
- End date (`end_date`, date, required): Last date to include.
- Granularity (`granularity`, text, required): How to group the values. One of: `daily`, `weekly`, `monthly`, `quarterly`, `yearly`, `allTime`.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "dataPoints": [
        {
          "date": "example",
          "dimensions": {},
          "value": 1
        }
      ],
      "metric": {
        "id": "example",
        "name": "example",
        "sourceId": 1
      },
      "syncInfo": {
        "lastSyncedAt": "example",
        "message": "example",
        "status": "example"
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Get organization

Get organization.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "address": {
        "city": "example",
        "country": "example",
        "state": "example",
        "street": "example",
        "zip": "example"
      },
      "billingName": "example",
      "companyName": "example",
      "id": 1,
      "managedBy": {
        "id": 1,
        "name": "example"
      },
      "metadata": {
        "annualRevenue": "example",
        "businessType": [
          "example"
        ],
        "companySize": "example",
        "industry": [
          "example"
        ]
      },
      "name": "example",
      "settings": {
        "calendar": "example",
        "dateFormat": "example",
        "firstDayOfWeek": "example",
        "fiscalYearStart": {
          "day": 1,
          "month": 1
        },
        "numberFormat": "example"
      },
      "taxNumber": "example",
      "websiteUrl": "example"
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Ingest dataset rows

Ingest dataset rows.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.
- Idempotency key (`idempotency_key`, text): A client-generated unique value (for example, a UUID) that lets you safely retry this request without risking duplicate side effects. If a request is retried with the same key within 24 hours of the original request, the API returns the original response instead of re-executing the operation.
- Records (`records`, list, required): Records to ingest into the dataset. Each record is keyed by column ID.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "ingestionId": "example",
      "message": "example",
      "status": "example"
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### List dashboard metrics

List dashboard metrics.

**Inputs**

- Dashboard (`dashboard_id`, number, required): Unique identifier for the dashboard.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "datablocks": [
        {
          "id": 1,
          "metrics": [
            {}
          ],
          "name": "example",
          "visualizationType": "example"
        }
      ]
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### List dashboards

List dashboards.

**Inputs**

- Search (`search`, text): Filters the results by a search term. The search is case-insensitive.
- Page (`page`, number): Specifies the zero-based page number to return. At least 0.
- Page size (`page_size`, number): Specifies the maximum number of items to return per page. From 1 to 100.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "items": [
        {
          "id": 1,
          "integrationKeys": [
            "example"
          ],
          "name": "example",
          "tags": [
            "example"
          ]
        }
      ],
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "totalItems": 1
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### List data sources

List data sources.

**Inputs**

- Search (`search`, text): Filters the results by a search term. The search is case-insensitive.
- Data connection ID (`data_connection_id`, number): Unique identifier for the connection.
- Sort by (`sort_by`, text): Specifies the field used to sort the results. Data sources are grouped by statusInfo.statusCode and then sorted by the specified field within each status group. One of: `name`, `createdAt`, `lastActivityAt`.
- Sort order (`sort_order`, text): Specifies the sort direction. Supported values are asc and desc.
- Page (`page`, number): Specifies the zero-based page number to return. At least 0.
- Page size (`page_size`, number): Specifies the maximum number of items to return per page. From 1 to 100.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "items": [
        {
          "connectionId": 1,
          "createdAt": "example",
          "id": 1,
          "integrationKey": "example",
          "lastActivityAt": "example",
          "name": "example",
          "statusInfo": {},
          "timezone": "example"
        }
      ],
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "totalItems": 1
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### List dataset ingestions

List dataset ingestions.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.
- Page (`page`, number): Specifies the zero-based page number to return. At least 0.
- Page size (`page_size`, number): Specifies the maximum number of items to return per page. From 1 to 100.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "items": [
        {
          "duration": 1,
          "id": "example",
          "initiatedAt": "example",
          "initiatedBy": {},
          "status": "example"
        }
      ],
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "totalItems": 1
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### List dataset rows

List dataset rows.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.
- Page (`page`, number): Specifies the zero-based page number to return. At least 0.
- Page size (`page_size`, number): Maximum number of rows returned per page. From 1 to 1000.
- Sort by (`sort_by`, text): Specifies the field used to sort the results.
- Sort order (`sort_order`, text): Specifies the sort direction. Supported values are asc and desc.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "items": [
        {}
      ],
      "lastUpdatedAt": "example",
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "totalItems": 1
      },
      "schema": [
        {
          "dataType": "example",
          "displayName": "example",
          "id": "example",
          "order": 1,
          "visible": true
        }
      ]
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### List datasets

List datasets.

**Inputs**

- Data source (`data_source_id`, number): Unique identifier for the data source.
- Type (`type`, text): Type of dataset: - dataset: A dataset that holds its own data, either ingested through the API or synced from a data source. - mergedDataset: A dataset assembled from other datasets. It has no data source of its own, so dataSourceId is null. One of: `dataset`, `mergedDataset`.
- Search (`search`, text): Filters the results by a search term. The search is case-insensitive.
- Sort by (`sort_by`, text): Specifies the field used to sort the results. Datasets are grouped by statusInfo.statusCode and then sorted by the specified field within each status group. One of: `name`, `createdAt`, `lastActivityAt`.
- Sort order (`sort_order`, text): Specifies the sort direction. Supported values are asc and desc.
- Page (`page`, number): Specifies the zero-based page number to return. At least 0.
- Page size (`page_size`, number): Specifies the maximum number of items to return per page. From 1 to 100.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "items": [
        {
          "createdAt": "example",
          "dataSourceId": 1,
          "id": 1,
          "ingestionInfo": {},
          "ingestionSupported": true,
          "lastActivityAt": "example",
          "name": "example",
          "statusInfo": {},
          "syncInfo": {},
          "timezone": "example",
          "type": "example",
          "verificationInfo": {}
        }
      ],
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "totalItems": 1
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### List metrics

List metrics.

**Inputs**

- Source ID (`source_id`, number): Unique identifier for the data source or dataset.
- Search (`search`, text): Filters the results by a search term. The search is case-insensitive.
- Page (`page`, number): Specifies the zero-based page number to return. At least 0.
- Page size (`page_size`, number): Specifies the maximum number of items to return per page. From 1 to 100.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "items": [
        {
          "description": "example",
          "dimensions": [
            {}
          ],
          "id": "example",
          "name": "example",
          "sourceId": 1,
          "supportsDrilldown": true,
          "verificationInfo": {}
        }
      ],
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "totalItems": 1
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```

### Rename dataset

Rename dataset.

**Inputs**

- Dataset (`dataset_id`, number, required): Unique identifier for the dataset.
- Name (`name`, text): Display name of the dataset.

**Outputs**

- `data` (object): The response from Databox.

**Example output**

```json
{
  "data": {
    "data": {
      "columnCount": 1,
      "createdAt": "example",
      "dataSourceId": 1,
      "id": 1,
      "ingestionInfo": {
        "initiatedAt": "example",
        "lastSuccessfulIngestionAt": "example",
        "status": "example"
      },
      "ingestionSupported": true,
      "lastActivityAt": "example",
      "managedBy": {
        "id": 1,
        "name": "example"
      },
      "maxSize": 1,
      "name": "example",
      "primaryKey": [
        "example"
      ],
      "rowCount": 1,
      "size": 1,
      "statusInfo": {
        "description": "example",
        "errorType": "example",
        "reason": "example",
        "status": "example",
        "statusCode": "example",
        "userAction": "example"
      },
      "syncInfo": {
        "initiatedAt": "example",
        "lastSuccessfulSyncAt": "example",
        "status": "example",
        "type": "example"
      },
      "syncInterval": 1,
      "timezone": "example",
      "type": "example",
      "verificationInfo": {
        "isVerified": true,
        "verifiedAt": "example",
        "verifiedBy": {
          "id": 1,
          "name": "example"
        }
      }
    },
    "requestId": "example",
    "status": "example"
  }
}
```
