POST
/
apps
/
{appSlug}
/
datasets
/
{externalId}
/
items
from autoblocks.api.app_client import AutoblocksAppClient

client = AutoblocksAppClient(
  api_key="<YOUR_API_KEY>",
  app_slug="my-app",
)

items = [
  {
    "title": "First Item",
    "content": "This is the first item"
  },
  {
    "title": "Second Item",
    "content": "This is the second item"
  }
]

create_result = client.datasets.create_items(
  external_id="my-dataset",
  items=items,
  split_names=["train", "test"]
)
{
  "count": 123,
  "revisionId": "<string>"
}

Authorizations

Authorization
string
header
required

API Key created in the Autoblocks Webapp

Path Parameters

appSlug
string
required
externalId
string
required

Body

application/json

Response

200 - application/json

The items were added successfully

The response is of type object.