Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Create Ontology Scenario

POST/api/v2/ontologies/{ontology}/scenarios/create
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Creates an ontology scenario.

Third-party applications using this endpoint via OAuth2 must request the following operation scopes: api:ontologies-read api:ontologies-write.

Path parameters

ontology
string

The API name or RID of the Ontology. To find the API name or RID, use the List Ontologies endpoint or check the Ontology Manager.

Query parameters

preview
booleanoptional

A boolean flag that, when set to true, enables the use of beta features in preview mode.

Request body

CreateOntologyScenarioRequest
object

The request payload for creating an ontology scenario.

Hide child attributes

Hide child attributes

base
unionoptional

The base used to initialize a scenario.

Show child attributes

Show child attributes

expireAfter
stringoptional

The date after which the scenario expires and is automatically cleaned up. Defaults to 31 days after creation. Must be after creation and no later than 31 days after creation.

Response body

CreateOntologyScenarioResponse
object

Successfully created a scenario.

Hide child attributes

Hide child attributes

scenarioRid
string

The unique resource identifier of an ontology scenario.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/ontologies/palantir/scenarios/create?preview=true" \ -d '{"base":{"type":"branch","branch":"my-branch"}}'

Response

Copied!
1 2 3 { "scenarioRid": "ri.actions..scenario.cf2a8a49-8b56-446d-ab04-a6bc7fadef48" }