Data Models

REST API operations for data models

Overview

The /data-models REST API operations are in open beta starting with Panther version 1.101, and are available to all customers. Please share any bug reports and feature requests with your Panther support team.

Use these API operations to interact with Data Models in Panther.

To call the API, see the How to use the Panther REST API instructions—including directions for how to invoke it directly from this documentation page.

Required permissions

  • For GET operations, your API token must have the View Log Sources permission.

  • For POST, PUT, and DELETE operations, your API token must have the Manage Log Sources permission.

Operations

create data model

post
Authorizations
Body
bodystringOptional

The python body of the data model

descriptionstringOptional

The description of the data model

displayNamestringOptional

The name used for the data model

enabledbooleanOptional

enables/disables a data model

idstringRequired

The id of the data model

logTypesstring[]Optional

The log type this data model should associate to. NOTE: only one data model can be assigned to a log type

Responses
200
OK response.
application/json
post
POST /data-models HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 163

{
  "body": "text",
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "logTypes": [
    "text"
  ],
  "mappings": [
    {
      "method": "text",
      "name": "text",
      "path": "text"
    }
  ]
}
{
  "body": "text",
  "createdAt": "text",
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "lastModified": "text",
  "logTypes": [
    "text"
  ],
  "mappings": [
    {
      "method": "text",
      "name": "text",
      "path": "text"
    }
  ]
}

get data model

get
Authorizations
Path parameters
idstringRequired

ID of the data model to fetch

Responses
200
OK response.
application/json
get
GET /data-models/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "body": "text",
  "createdAt": "text",
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "lastModified": "text",
  "logTypes": [
    "text"
  ],
  "mappings": [
    {
      "method": "text",
      "name": "text",
      "path": "text"
    }
  ]
}

put data model

put

put creates or updates a data model

Authorizations
Path parameters
idstringRequired

the id of the data model

Body
bodystringOptional

The python body of the data model

descriptionstringOptional

The description of the data model

displayNamestringOptional

The name used for the data model

enabledbooleanOptional

enables/disables a data model

idstringRequired

The id of the data model

logTypesstring[]Optional

The log type this data model should associate to. NOTE: only one data model can be assigned to a log type

Responses
200
200 returned if the item already existed
application/json
put
PUT /data-models/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 163

{
  "body": "text",
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "logTypes": [
    "text"
  ],
  "mappings": [
    {
      "method": "text",
      "name": "text",
      "path": "text"
    }
  ]
}
{
  "body": "text",
  "createdAt": "text",
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "lastModified": "text",
  "logTypes": [
    "text"
  ],
  "mappings": [
    {
      "method": "text",
      "name": "text",
      "path": "text"
    }
  ]
}

delete data model

delete
Authorizations
Path parameters
idstringRequired

ID of the data model to delete

Responses
204
No Content response.
delete
DELETE /data-models/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*

No content

list data models

get
Authorizations
Query parameters
cursorstringOptional

the pagination token

limitinteger · int64Optional

the maximum results to return

Default: 100
Responses
200
OK response.
application/json
get
GET /data-models HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*
200

OK response.

{
  "next": "text",
  "results": [
    {
      "body": "text",
      "createdAt": "text",
      "description": "text",
      "displayName": "text",
      "enabled": true,
      "id": "text",
      "lastModified": "text",
      "logTypes": [
        "text"
      ],
      "mappings": [
        {
          "method": "text",
          "name": "text",
          "path": "text"
        }
      ]
    }
  ]
}

Last updated

Was this helpful?