Skip to main content
POST
/
api
/
dataframer
/
specs
JavaScript
import Dataframer from 'dataframer';

const client = new Dataframer({
  apiKey: 'My API Key',
});

const spec = await client.dataframer.specs.create({
  datasets_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  name: 'Product Review Spec',
});

console.log(spec.datasets_id);
{
  "name": "<string>",
  "datasets_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "latest_version": -1,
  "status": "PROCESSING",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "dataset_name": "<string>",
  "company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "company_name": "<string>",
  "created_by": 123,
  "created_by_name": "<string>",
  "versions": [
    {
      "spec_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "version": -1,
      "config_yaml": "<string>",
      "results_yaml": "<string>",
      "orig_results_yaml": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "spec_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "runtime_params": {}
    }
  ],
  "version_count": 123,
  "latest_version_data": "<string>",
  "data_property_variations": "<string>"
}

Authorizations

Authorization
string
header
required

API Key authentication. Format: "Bearer YOUR_API_KEY"

Body

application/json
name
string
required

Unique name for the spec (within dataset and company)

Example:

"Product Review Spec"

datasets_id
string<uuid>
required

UUID of the dataset this spec is based on

description
string

Optional description of the spec

Example:

"Specification for generating product reviews"

Response

Spec created successfully

name
string
required
Minimum string length: 1
datasets_id
string<uuid>
required
id
string<uuid>
description
string | null
latest_version
integer
Required range: -2147483648 <= x <= 2147483647
status
enum<string>
Available options:
PROCESSING,
READY,
FAILED
created_at
string<date-time>
updated_at
string<date-time>
dataset_name
string
Minimum string length: 1
company_id
string<uuid>
company_name
string
Minimum string length: 1
created_by
integer | null
created_by_name
string
Minimum string length: 1
versions
object[]
version_count
integer
latest_version_data
string
data_property_variations
string