Skip to main content
POST
/
schema-presets
Create a private schema preset.
curl --request POST \
  --url https://api-dev.narrative.io/schema-presets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "tags": [
    "<string>"
  ],
  "details": {
    "attributes": [
      {
        "attribute_id": 123,
        "fields": [
          {
            "field": "<string>",
            "delivered": true,
            "filterable": true,
            "required": true,
            "forecastable": true
          }
        ]
      }
    ]
  },
  "description": "<string>",
  "based_on_preset_id": 7,
  "icon": "<string>",
  "display_color": "<string>",
  "banner_image": "<string>"
}
'
{
  "id": 7,
  "company_id": 123,
  "created_at": "<string>",
  "name": "<string>",
  "scope": "public",
  "status": "active",
  "tags": [
    "<string>"
  ],
  "archived_at": "<string>",
  "description": "<string>",
  "based_on_preset_id": 7,
  "icon": "<string>",
  "display_color": "<string>",
  "banner_image": "<string>",
  "details": {
    "attributes": [
      {
        "attribute_id": 123,
        "fields": [
          {
            "field": "<string>",
            "delivered": true,
            "filterable": true,
            "required": true,
            "forecastable": true
          }
        ]
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Name of the schema preset

tags
string[]
required

An array (can be empty) of strings representing metadata about the schema preset

details
object
required
description
string

Long description for the schema preset

based_on_preset_id
integer<int64>

Unique identifier of an existing schema preset.

Example:

7

icon
string

URL of an icon shown with the schema preset in the UI to help recognize/personalize it.

display_color
string

Background color to be shown in the UI to personalize the schema preset, in hex color code format.

banner_image
string

URL of the banner image shown in the UI to personalize the schema preset.

Response

The newly create schema preset

id
integer<int64>
required

Unique identifier of an existing schema preset.

Example:

7

company_id
integer<int>
required

The id of an existing company

created_at
string
required

UTC ISO date time when the schema preset was created

name
string
required

Name of the schema preset

scope
enum<string>
required

Who can see this schema preset. Either public for everyone or private for only the members of the company who owns it.

Available options:
public,
private
status
enum<string>
required

Whether the schema preset is visible (active) or not (archived)

Available options:
active,
archived
tags
string[]
required

An array (can be empty) of strings representing metadata about the schema preset

archived_at
string

UTC ISO date time when the schema preset was archived

description
string

Long description for the schema preset

based_on_preset_id
integer<int64>

Unique identifier of an existing schema preset.

Example:

7

icon
string

URL of an icon shown with the schema preset in the UI to help recognize/personalize it.

display_color
string

Background color to be shown in the UI to personalize the schema preset, in hex color code format.

banner_image
string

URL of the banner image shown in the UI to personalize the schema preset.

details
object