Dataset API

The following APIs allow you to interact with datasets.


List datasets

GET
/api/datasets

Query Parameters object

Output object

const result = await axios.get(
	`https://dibby.ai/api/datasets`,
);
{
  "items": [
    {
      "name": "some string",
      "desc": "some string",
      "user": {
        "name": "some string"
      }
    }
  ],
  "totalPages": 0,
  "currentPage": 0
}

Search dataset

POST
/api/datasets/{owner}/{name}/search
Search dataset rows

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const name = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/datasets/${owner}/${name}/search`,
);
{
  "items": [
    {
      "id": "some string",
      "values": {
        "some string": {
          "rowId": "some string",
          "column": "some string",
          "type": "STRING",
          "value": "some string"
        }
      }
    }
  ],
  "totalPages": 0,
  "currentPage": 0
}

Update Column

PUT
/api/datasets/{owner}/{name}/columns/{column}
Update a column in a dataset

Route Parameters object

Body Parameters object

const owner = 'some string';
const name = 'some string';
const column = 'some string';
const result = await axios.put(
	`https://dibby.ai/api/datasets/${owner}/${name}/columns/${column}`,
	{"name":"some string"}
);
{}

Delete Column

DELETE
/api/datasets/{owner}/{name}/columns/{column}
Delete a column along with all its values in a dataset

Route Parameters object

const owner = 'some string';
const name = 'some string';
const column = 'some string';
const result = await axios.delete(
	`https://dibby.ai/api/datasets/${owner}/${name}/columns/${column}`,
);
{}

List Columns

GET
/api/datasets/{owner}/{name}/columns

Route Parameters object

Output object

const owner = 'some string';
const name = 'some string';
const result = await axios.get(
	`https://dibby.ai/api/datasets/${owner}/${name}/columns`,
);
{
  "columns": [
    {
      "name": "some string",
      "type": "STRING"
    }
  ]
}

Create Column

POST
/api/datasets/{owner}/{name}/columns
Create a new column in a dataset

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const name = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/datasets/${owner}/${name}/columns`,
	{"name":"some string","type":"STRING"}
);
{
  "name": "some string",
  "type": "STRING"
}

Delete Row

DELETE
/api/datasets/{owner}/{name}/rows/{id}
Delete a row in a dataset

Route Parameters object

const owner = 'some string';
const name = 'some string';
const id = 'some string';
const result = await axios.delete(
	`https://dibby.ai/api/datasets/${owner}/${name}/rows/${id}`,
);
{}

Create Row

POST
/api/datasets/{owner}/{name}/rows
Create a new row in a dataset

Route Parameters object

Output object

const owner = 'some string';
const name = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/datasets/${owner}/${name}/rows`,
);
{
  "id": "some string"
}

Set cell value

PUT
/api/datasets/{owner}/{name}/cell
Set the value of a cell in a dataset

Route Parameters object

Body Parameters Union<object,object,object,object,object,object>

const owner = 'some string';
const name = 'some string';
const result = await axios.put(
	`https://dibby.ai/api/datasets/${owner}/${name}/cell`,
	{
	  "rowId": "some string",
	  "column": "some string",
	  "type": "STRING",
	  "value": "some string"
	}
	{ headers: { 'Content-Type': 'multipart/form-data' }}
);
{}