Overview

HTTP verbs & CRUD

RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs and related CRUD (Create, Read, Update, and Delete) operations.

Resource Endpoint Verb Usage

/api/{resource}

GET

Used to retrieve all available resources (Read all)

/api/{resource}/{id}

GET

Used to retrieve a resource (Read one)

/api/{resource}

POST

Used to create a new resource (Create)

/api/{resource}/{id}

PUT

Used to update an existing resource (Update one)

/api/{resource}/{id}

DELETE

Used to delete an existing resource (Delete one)

Note: By default, Padas Engine listens on https://localhost:8999

HTTP status codes

RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

The request completed successfully

201 Created

A new resource has been created successfully. The resource’s URI is available from the response’s Location header

204 No Content

An update to an existing resource has been applied successfully

400 Bad Request

The request was malformed. The response body will include an error providing further information

401 Unauthorized

The request lacks valid authentication credentials

403 Forbidden

The request lacks valid authorization credentials (e.g. invalid tokens or role)

404 Not Found

The requested resource did not exist

409 Conflict

The request could not be completed due to a conflict with the current state of the resource

ERROR Messages

401 Unauthorized and 403 Forbidden responses do NOT contain any error messages. For all others, response body contains error information.

Table 1. error fields
Field Name Description

status

Response status

message

Resource related error message

debugMessage

Endpoint specific message details for debugging

Following table provides information on error message

error response example
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 119

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Provided username does not exist"
}

REST Endpoints

Init

This REST endpoint provides status and initial user creation functionality.

Create: POST /api/init

Initialize with a new user. This can be only performed 1 time. Consecutive requests should result in error.

Table 2. request fields
Path Type Description

name

String

Display name for user

username

String

Unique user name

email

String

Email address associated with this user

password

String

Password for this user

roles

Array

An array of roles

roles.[].name

String

Name of the role.

Table 3. response fields
Path Type Description

name

String

Display name for user

username

String

Unique user name

email

String

Email address associated with this user

password

Null

Password of the user is omitted in response

roles

Array

An array of roles

roles.[].id

Null

Id for role

roles.[].name

String

Name of the role.

request example (success)
POST /api/init HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 156
Host: localhost:8999

{
  "name" : "New User",
  "username" : "newuser",
  "email" : "newuser@padas.io",
  "password" : "password123",
  "roles" : [ {
    "name" : "user"
  } ]
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/init
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 140

{
  "name" : "New User",
  "username" : "newuser",
  "email" : "newuser@padas.io",
  "roles" : [ {
    "id" : 5,
    "name" : "user"
  } ]
}
request example (failure)
POST /api/init HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 160
Host: localhost:8999

{
  "name" : "Test Admin",
  "username" : "testadmin",
  "email" : "testadmin@padas.io",
  "password" : "password",
  "roles" : [ {
    "name" : "admin"
  } ]
}
response example (failure)
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 129

{
  "status" : "CONFLICT",
  "message" : "Resource already exists",
  "debugMessage" : "API and users are already initialized."
}

Read: GET /api/init

Read initial status of the endpoints. true means we have users initialized already.

Table 4. response fields
Path Type Description

initialized

Boolean

Shows status. Value is true if initialized, false if this is the first time accessing the api

request example (success)
GET /api/init HTTP/1.1
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 26
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "initialized" : true
}
request example (failure)
GET /api/init HTTP/1.1
Host: localhost:8999
response example (failure)
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 27
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "initialized" : false
}

Authentication & Authorization

A username and password authentication scheme is provided by default. A POST request is used to perform login action.

Important Note: Any request to a protected resource (i.e. /api/* URLs), other than login (/api/login), must have a valid access_token within Authorization header as a Bearer token. Example:

GET /api/some-resource-goes-here HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGVzIjpbImFkbWluIl0sImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9hcGkvbG9naW4iLCJleHAiOjE2NDc3OTk2MTZ9.yBxgcrvYzOLJK_tkQz0ItocRDBLntrVpSX6i3XMLN7w
...

Login: POST /api/login

Upon successful login tokens are generated: use access_token for accessing any resource and refresh_token when access_token is no longer valid. A failed login returns 401 response code.

Table 5. request fields
Path Type Description

username

String

Username to login.

password

String

Password for the user.

Table 6. response fields
Path Type Description

access_token

String

Authorization (JWT) token to access protected API resources.

refresh_token

String

This token can be used to obtain additional access token when existing one expires.

request example (success)
POST /api/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 57
Host: localhost:8999

{
  "username" : "testadmin",
  "password" : "password"
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 441

{
  "access_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzEwN30.EACuXvmihORd9s7b-uC_VE8BeKagI1KIj3lJsxPV3ps",
  "refresh_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODIwMDEwN30.VbBaJct1NkEpmOwaq9rLyLZVMZK5k2gHx9gUnLg24pQ"
}
request example (failure)
POST /api/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 62
Host: localhost:8999

{
  "username" : "testadmin",
  "password" : "nosuchpassxxx"
}
response example (failure)
HTTP/1.1 401 Unauthorized
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

Refresh Token: GET /api/token/refresh

When access_token is no longer valid (receiving 403 responses due to expiration) this endpoint can be utilized to obtain a new one. A failed access attempt returns 403 response code.

Table 7. request headers
Name Description

Authorization

Contains Bearer refresh token for getting a fresh access token.

Table 8. response fields
Path Type Description

access_token

String

Authorization (JWT) token to access protected API resources.

refresh_token

String

This token can be used to obtain additional access token when existing one expires.

request example (success)
GET /api/token/refresh HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODIwMDExNH0.jGxj7k5n72C9TvD40evRrC6dAyXGzcnaxXs7HTyu7qI
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 452

{
  "access_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS90b2tlbi9yZWZyZXNoIiwiZXhwIjoxNzQ4MTk3MTE0fQ.Q7n6jfJi8QXADst3l2GbgBwWUWEsQBW9YenlJW4LGgU",
  "refresh_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODIwMDExNH0.jGxj7k5n72C9TvD40evRrC6dAyXGzcnaxXs7HTyu7qI"
}
request example (failure)
GET /api/token/refresh HTTP/1.1
Authorization: Bearer some_invalid_refresh_token
Host: localhost:8999
response example (failure)
HTTP/1.1 401 Unauthorized
ERROR: Invalid token
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 39

{
  "error_message" : "Invalid token"
}

Config

This REST endpoint provides information on engine configuration values.

Read: GET /api/config/serde

Read available/supported Serializer and Deserializer information for any consumer, producer or stream process in relation to a topic.

Table 9. response fields
Path Type Description

serde

Array

Provides the list of supported SerDe strings.

serializer

Array

Provides the list of supported Serializer strings.

deserializer

Array

Provides the list of supported Deserializer strings.

request example (success)
GET /api/config/serde HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzEyN30.JvRvwsg6aNzil_-F-KtCyLVCFd05sxeVNkFqcYlktaQ
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 1840
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "serde" : [ "org.apache.kafka.common.serialization.Serdes$FloatSerde", "org.apache.kafka.common.serialization.Serdes$ByteArraySerde", "org.apache.kafka.common.serialization.Serdes$BytesSerde", "org.apache.kafka.common.serialization.Serdes$ByteBufferSerde", "org.apache.kafka.common.serialization.Serdes$DoubleSerde", "org.apache.kafka.common.serialization.Serdes$IntegerSerde", "org.apache.kafka.common.serialization.Serdes$LongSerde", "org.apache.kafka.common.serialization.Serdes$StringSerde", "org.apache.kafka.common.serialization.Serdes$UUIDSerde", "io.confluent.kafka.streams.serdes.avro.SpecificAvroSerde" ],
  "serializer" : [ "org.apache.kafka.common.serialization.FloatSerializer", "org.apache.kafka.common.serialization.ByteArraySerializer", "org.apache.kafka.common.serialization.BytesSerializer", "org.apache.kafka.common.serialization.ByteBufferSerializer", "org.apache.kafka.common.serialization.DoubleSerializer", "org.apache.kafka.common.serialization.IntegerSerializer", "org.apache.kafka.common.serialization.LongSerializer", "org.apache.kafka.common.serialization.StringSerializer", "org.apache.kafka.common.serialization.UUIDSerializer", "io.confluent.kafka.serializers.KafkaAvroSerializer" ],
  "deserializer" : [ "org.apache.kafka.common.serialization.FloatDeserializer", "org.apache.kafka.common.serialization.ByteArrayDeserializer", "org.apache.kafka.common.serialization.BytesDeserializer", "org.apache.kafka.common.serialization.ByteBufferDeserializer", "org.apache.kafka.common.serialization.DoubleDeserializer", "org.apache.kafka.common.serialization.IntegerDeserializer", "org.apache.kafka.common.serialization.LongDeserializer", "org.apache.kafka.common.serialization.StringDeserializer", "org.apache.kafka.common.serialization.UUIDDeserializer", "io.confluent.kafka.serializers.KafkaAvroDeserializer" ]
}

Engine

This REST endpoint provides functionality for reading state, stop, and start actions for stream engine.

Read: GET /api/engine/

Read current engine information

Table 10. request headers
Name Description

Authorization

Contains Bearer access token.

Table 11. response fields
Path Type Description

uuid

String

UUID of the engine

group

String

Group of the engine

states

Array

List of topology states in format 'topologyId:state'

request example (success)
GET /api/engine/ HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzE0Mn0.TfX6zDslnpxdXdEJ50YRZDAj-VCcPcZtVo5Zpky7tcc
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 110

{
  "uuid" : "8963b371-4435-4af0-8d4c-9d0c7f1d2601",
  "group" : "default",
  "states" : [ "1:REBALANCING" ]
}

State: GET /api/engine/state

Table 12. request headers
Name Description

Authorization

Contains Bearer access token.

Table 13. response fields
Path Type Description

states

Array

List of topology states in format 'topologyId:state'. States are according to https://docs.confluent.io/platform/current/streams/javadocs/javadoc/org/apache/kafka/streams/KafkaStreams.State.html

request example (success)
GET /api/engine/state HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzE0Mn0.TfX6zDslnpxdXdEJ50YRZDAj-VCcPcZtVo5Zpky7tcc
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 32

{
  "states" : [ "1:RUNNING" ]
}

Stop: POST /api/engine/stop

Stop the engine. If it’s already stopped it should return the same result.

Table 14. request headers
Name Description

Authorization

Contains Bearer access token.

Table 15. response fields
Path Type Description

states

Array

List of topology states in format 'topologyId:state'. States are according to https://docs.confluent.io/platform/current/streams/javadocs/javadoc/org/apache/kafka/streams/KafkaStreams.State.html

request example (success)
POST /api/engine/stop HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzE0Mn0.TfX6zDslnpxdXdEJ50YRZDAj-VCcPcZtVo5Zpky7tcc
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 36

{
  "states" : [ "1:NOT_RUNNING" ]
}
request example (failure)
POST /api/engine/stop HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzE0Mn0.TfX6zDslnpxdXdEJ50YRZDAj-VCcPcZtVo5Zpky7tcc
Host: localhost:8999
response example (failure)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 36

{
  "states" : [ "1:NOT_RUNNING" ]
}

Start: POST /api/engine/start

Start the engine. The engine must be in NOT_RUNNING state.

Table 16. request headers
Name Description

Authorization

Contains Bearer access token.

Table 17. response fields
Path Type Description

states

Array

List of topology states in format 'topologyId:state'. States are according to https://docs.confluent.io/platform/current/streams/javadocs/javadoc/org/apache/kafka/streams/KafkaStreams.State.html

request example (success)
POST /api/engine/start HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzE0Mn0.TfX6zDslnpxdXdEJ50YRZDAj-VCcPcZtVo5Zpky7tcc
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 36

{
  "states" : [ "1:REBALANCING" ]
}

Topics

This REST endpoint provides functionality for Create (once), Read, and Delete operations on topics resource.

Create: POST /api/topics

Create a new topic.

Table 18. request headers
Name Description

Authorization

Contains Bearer access token.

Table 19. request fields
Path Type Description

name

String

Topic name

numberOfPartitions

Number

Number of partitions for this topic

replicationFactor

Number

Number of replicas for this topic

options

Object

Other configuration options, e.g. cleanup.policy, retention.bytes, etc.

Table 20. response fields
Path Type Description

name

String

Topic name

numberOfPartitions

Number

Number of partitions for this topic

replicationFactor

Number

Number of replicas for this topic

options

Object

Other configuration options, e.g. cleanup.policy, retention.bytes, etc.

request example (success)
POST /api/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 143
Host: localhost:8999

{
  "name" : "padas-test-topic-1",
  "numberOfPartitions" : 1,
  "replicationFactor" : 1,
  "options" : {
    "cleanup.policy" : "delete"
  }
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/topics
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 143

{
  "name" : "padas-test-topic-1",
  "numberOfPartitions" : 1,
  "replicationFactor" : 1,
  "options" : {
    "cleanup.policy" : "delete"
  }
}
request example (failure)
POST /api/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 113
Host: localhost:8999

    {    "name": "padas_lookups",    "numberOfPartitions": ""    "replicationFactor": "",    "compact": true    }
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 306

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Unable to create Kafka topic, error(s) in validating schema -- [Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: (ByteArrayInputStream); line: 1, column: 67]]"
}

Read ALL Topics: GET /api/topics

Read all topic names as a list without details.

Table 21. request headers
Name Description

Authorization

Contains Bearer access token.

request example (success)
GET /api/topics HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 151

[ "padas_pipelines", "padas_rules", "unit_test_output_topic", "padas_lookups", "padas_tasks", "padas_topologies", "padas_nodes", "__consumer_offsets" ]

Read: GET /api/topics/{name}

Read one topic information.

Table 22. request headers
Name Description

Authorization

Contains Bearer access token.

Table 23. /api/topics/{name}
Parameter Description

name

Name of the topic to fetch

Table 24. response fields
Path Type Description

name

String

Topic name

numberOfPartitions

Number

Number of partitions for this topic

replicationFactor

Number

Number of replicas for this topic

options

Object

Other configuration options, e.g. cleanup.policy, retention.bytes, etc.

request example (success)
GET /api/topics/padas_nodes HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 1389

{
  "name" : "padas_nodes",
  "numberOfPartitions" : 1,
  "replicationFactor" : 1,
  "options" : {
    "compression.type" : "producer",
    "leader.replication.throttled.replicas" : "",
    "remote.storage.enable" : "false",
    "message.downconversion.enable" : "true",
    "min.insync.replicas" : "1",
    "segment.jitter.ms" : "0",
    "local.retention.ms" : "-2",
    "cleanup.policy" : "compact",
    "flush.ms" : "9223372036854775807",
    "follower.replication.throttled.replicas" : "",
    "segment.bytes" : "1073741824",
    "retention.ms" : "604800000",
    "flush.messages" : "9223372036854775807",
    "message.format.version" : "3.0-IV1",
    "max.compaction.lag.ms" : "9223372036854775807",
    "file.delete.delay.ms" : "60000",
    "max.message.bytes" : "1048588",
    "min.compaction.lag.ms" : "0",
    "message.timestamp.type" : "CreateTime",
    "local.retention.bytes" : "-2",
    "preallocate" : "false",
    "min.cleanable.dirty.ratio" : "0.5",
    "index.interval.bytes" : "4096",
    "unclean.leader.election.enable" : "false",
    "retention.bytes" : "-1",
    "delete.retention.ms" : "86400000",
    "message.timestamp.after.max.ms" : "9223372036854775807",
    "message.timestamp.before.max.ms" : "9223372036854775807",
    "segment.ms" : "604800000",
    "message.timestamp.difference.max.ms" : "9223372036854775807",
    "segment.index.bytes" : "10485760"
  }
}
request example (failure)
GET /api/topics/no-such-topic-exists HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 117

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested topic does not exist"
}

Delete: DELETE /api/topics/{name}

Delete a specific topic.

Table 25. /api/topics/{name}
Parameter Description

name

Name of the topic to fetch

request example (success)
DELETE /api/topics/padas-test-topic-1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/topics/no-such-topic-exists HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 118

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Topic to delete does not exist."
}

Bulk Create: POST /api/bulk/topics

Bulk update/create a list of topics.

Table 26. request headers
Name Description

Authorization

Contains Bearer access token.

Table 27. request fields
Path Type Description

[].name

String

Topic name

[].numberOfPartitions

Number

Number of partitions for this topic

[].replicationFactor

Number

Number of replicas for this topic

[].options

Object

Other configuration options, e.g. cleanup.policy, retention.bytes, etc.

Table 28. response fields
Path Type Description

[].name

String

Topic name

[].result

String

Result of create operation, either "success" or "failure"

request example (success)
POST /api/bulk/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 293
Host: localhost:8999

[ {
  "name" : "padas-test-topic-1",
  "numberOfPartitions" : 1,
  "replicationFactor" : 1,
  "options" : {
    "cleanup.policy" : "delete"
  }
}, {
  "name" : "padas-test-topic-2",
  "numberOfPartitions" : 1,
  "replicationFactor" : 1,
  "options" : {
    "cleanup.policy" : "compact"
  }
} ]
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/topics
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 124

[ {
  "result" : "success",
  "name" : "padas-test-topic-1"
}, {
  "result" : "success",
  "name" : "padas-test-topic-2"
} ]
request example (failure)
POST /api/bulk/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 295
Host: localhost:8999

[ {
  "name" : "padas-test-topic-1",
  "numberOfPartitions" : "",
  "replicationFactor" : -1,
  "options" : {
    "cleanup.policy" : "delete"
  }
}, {
  "name" : "padas-test-topic-2",
  "numberOfPartitions" : 0,
  "replicationFactor" : 1,
  "options" : {
    "cleanup.policy" : "compact"
  }
} ]
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 266

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Unable to create Kafka topic, error(s) in validating schema -- [$.replicationFactor: must have a minimum value of 1, $.numberOfPartitions: string found, number expected]"
}

Produce Messages: POST /api/topics/{name}/produce

Write messages to the topic.

Table 29. request headers
Name Description

Authorization

Contains Bearer access token.

Table 30. /api/topics/{name}/produce
Parameter Description

name

Topic name to produce messages to.

Table 31. request fields
Path Type Description

keySerializer

String

Optional Kafka serializer object for key, if not provided StringSerializer is used as default.

valueSerializer

String

Optional Kafka serializer object for value, if not provided StringSerializer is used as default.

messages

Array

An array of key/value pairs for messages. Key field is optional.

messages[].key.

String

Optional key for the message

messages[].value

String

Value for the message.

Table 32. response fields
Path Type Description

result

String

Result of topic request, should be either "success" of "failure".

request example (success)
POST /api/topics/test-event-topic/produce HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 279
Host: localhost:8999

{
  "keySerializer" : "org.apache.kafka.common.serialization.StringSerializer",
  "valueSerializer" : "org.apache.kafka.common.serialization.StringSerializer",
  "messages" : [ {
    "key" : "key1",
    "value" : "value1"
  }, {
    "key" : "key2",
    "value" : "value2"
  } ]
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/topics/test-event-topic/produce
Content-Type: text/plain;charset=UTF-8
Content-Length: 26
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : "success"
}
request example (failure)
POST /api/topics/no-such-topic/produce HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 279
Host: localhost:8999

{
  "keySerializer" : "org.apache.kafka.common.serialization.StringSerializer",
  "valueSerializer" : "org.apache.kafka.common.serialization.StringSerializer",
  "messages" : [ {
    "key" : "key1",
    "value" : "value1"
  }, {
    "key" : "key2",
    "value" : "value2"
  } ]
}
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 139

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Kafka topic does not exist, can not write a message."
}

Create Consumer for Messages: POST /api/topics/{name}/consume

Create a consumer for reading messages from a topic.

Table 33. request headers
Name Description

Authorization

Contains Bearer access token.

Table 34. /api/topics/{name}/consume
Parameter Description

name

Topic name to consume messages from.

Table 35. request fields
Path Type Description

keyDeserializer

String

Optional Kafka deserializer object for key, if not provided StringDeserializer is used as default.

valueDeserializer

String

Optional Kafka deserializer object for value, if not provided StringDeserializer is used as default.

maxEvents

Number

Maximum number of events to consume before closing this consumer.

maxTimeoutSeconds

Number

Maximum seconds to wait for events before closing this consumer.

offset

String

Offset for consuming, can be either "earliest" or "latest"

Table 36. response fields
Path Type Description

status

String

Provides the status of the consumer (e.g. RUNNING) or the error.

consumerId

String

Unique identifier for this consumer instance.

request example (success)
POST /api/topics/test-event-topic/consume HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 241
Host: localhost:8999

{
  "keyDeserializer" : "org.apache.kafka.common.serialization.StringDeserializer",
  "valueDeserializer" : "org.apache.kafka.common.serialization.StringDeserializer",
  "maxEvents" : 10,
  "maxTimeoutSeconds" : 10,
  "offset" : "earliest"
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/topics/test-event-topic/consume
Content-Type: text/plain;charset=UTF-8
Content-Length: 83
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "status" : "CREATED",
  "consumerId" : "23e54a6d-df44-44c3-8e4f-a2852f39974a"
}
request example (failure)
POST /api/topics/no-such-topic-exists/consume HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Content-Length: 241
Host: localhost:8999

{
  "keyDeserializer" : "org.apache.kafka.common.serialization.StringDeserializer",
  "valueDeserializer" : "org.apache.kafka.common.serialization.StringDeserializer",
  "maxEvents" : 10,
  "maxTimeoutSeconds" : 10,
  "offset" : "earliest"
}
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 139

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Kafka topic does not exist, can not write a message."
}
request example (success)
DELETE /api/topics/test-event-topic/consume?consumerId=7eee47e5-eb1c-4ce3-ad22-bf6d86856ded HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

Consume Messages: GET /api/topics/{name}/consume?consumerId={consumerId}

Read/Consume messages from a topic where the consumer is created with POST request.

Table 37. request headers
Name Description

Authorization

Contains Bearer access token.

Table 38. /api/topics/{name}/consume
Parameter Description

name

Topic name to consume messages from.

Table 39. request fields
Parameter Description

consumerId

Unique identifier of the consumer instance.

index

Starting index of the messages to consume. If not specified 0 is assumed and all messages are returned.

Table 40. response fields
Path Type Description

status

String

Provides the status of the consumer (e.g. RUNNING).

messages

Array

An array of key/value pairs for messages.

messages[].key

String

Key for the message

messages[].value

String

Value for the message.

request example (success)
GET /api/topics/test-event-topic/consume?consumerId=530b6b1a-6790-4120-a2ad-7e96b44647e8&index=0 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 145
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "status" : "RUNNING",
  "messages" : [ {
    "key" : "key1",
    "value" : "value1"
  }, {
    "key" : "key2",
    "value" : "value2"
  } ]
}

Stop Consumer: DELETE /api/topics/{name}/consume?consumerId={consumerId}

Stop a consumer for reading messages from a topic.

Table 41. request headers
Name Description

Authorization

Contains Bearer access token.

Table 42. /api/topics/{name}/consume
Parameter Description

name

Topic name to stop consuming from.

Table 43. request fields
Parameter Description

consumerId

Unique identifier of the consumer instance to stop.

request example (success)
DELETE /api/topics/test-event-topic/consume?consumerId=7eee47e5-eb1c-4ce3-ad22-bf6d86856ded HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMwN30.-c-NQrTmrvUTxyZLcGSs5-yGrWLNa3qFdwqLv7nHR5w
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

Users

This REST endpoint provides functionality for CRUD (Create, Read, Update, and Delete) operations on users resource.

Create: POST /api/users

Create a new user.

Table 44. request headers
Name Description

Authorization

Contains Bearer access token.

Table 45. request fields
Path Type Description

name

String

Display name for user

username

String

Unique user name

email

String

Email address associated with this user

password

String

Password for this user

roles

Array

An array of roles

roles.[].name

String

Name of the role.

Table 46. response fields
Path Type Description

name

String

Display name for user

username

String

Unique user name

email

String

Email address associated with this user

password

Null

Password of the user is omitted in response

roles

Array

An array of roles

roles.[].id

Null

Id for role

roles.[].name

String

Name of the role.

request example (success)
POST /api/users HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Content-Length: 156
Host: localhost:8999

{
  "name" : "New User",
  "username" : "newuser",
  "email" : "newuser@padas.io",
  "password" : "password123",
  "roles" : [ {
    "name" : "user"
  } ]
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/users
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 164

{
  "name" : "New User",
  "username" : "newuser",
  "email" : "newuser@padas.io",
  "password" : null,
  "roles" : [ {
    "id" : null,
    "name" : "user"
  } ]
}
request example (failure)
POST /api/users HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Content-Length: 161
Host: localhost:8999

{
  "name" : "New User",
  "username" : "failuser",
  "email" : "newuserfail@padas.io",
  "password" : "password123",
  "roles" : [ {
    "name" : "user"
  } ]
}
response example (failure)
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 171

{
  "status" : "CONFLICT",
  "message" : "Resource already exists",
  "debugMessage" : "User already exists, can not create a new one. Please use update (PUT) endpoint."
}

Read ALL: GET /api/users

Read all users.

Table 47. request headers
Name Description

Authorization

Contains Bearer access token.

Table 48. response fields
Path Type Description

[]

Array

An array of users

[].name

String

Display name for user

[].username

String

Unique user name

[].password

Null

Password of the user is omitted in response

[].email

String

Email address associated with this user

[].roles

Array

An array of roles

[].roles.[].id

Number

Id for role

[].roles.[].name

String

Name of the role.

request example (success)
GET /api/users HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 172

[ {
  "name" : "Test Admin",
  "username" : "testadmin",
  "email" : "testadmin@padas.io",
  "password" : null,
  "roles" : [ {
    "id" : 2,
    "name" : "admin"
  } ]
} ]

Read: GET /api/users/{username}

Read one user information.

Table 49. request headers
Name Description

Authorization

Contains Bearer access token.

Table 50. /api/users/{username}
Parameter Description

username

Username to fetch

Table 51. response fields
Path Type Description

name

String

Display name for user

username

String

Unique user name

password

Null

Password of the user is omitted in response

email

String

Email address associated with this user

roles

Array

An array of roles

roles.[].id

Number

Id for role

roles.[].name

String

Name of the role.

request example (success)
GET /api/users/testadmin HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 168

{
  "name" : "Test Admin",
  "username" : "testadmin",
  "email" : "testadmin@padas.io",
  "password" : null,
  "roles" : [ {
    "id" : 2,
    "name" : "admin"
  } ]
}
request example (failure)
GET /api/users/nosuchuserxxx HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 119

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Provided username does not exist"
}

Update: PUT /api/users/{username}

Update a specific user.

Table 52. request headers
Name Description

Authorization

Contains Bearer access token.

Table 53. /api/users/{username}
Parameter Description

username

Username to update

Table 54. request fields
Path Type Description

name

String

Display name for user

username

String

Unique user name

email

String

Email address associated with this user

password

String

Password for this user, can be left empty to skip update

roles

Array

An array of roles

roles.[].name

String

Name of the role.

Table 55. response fields
Path Type Description

name

String

Display name for user

username

String

Unique user name

email

String

Email address associated with this user

password

Null

Password of the user is omitted in response

roles

Array

An array of roles

roles.[].id

Null

Id for role

roles.[].name

String

Name of the role.

request example (success)
PUT /api/users/newPutUser HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Content-Length: 160
Host: localhost:8999

{
  "name" : "New User2",
  "username" : "newPutUser",
  "email" : "newuser@padas.io",
  "password" : "password123",
  "roles" : [ {
    "name" : "user"
  } ]
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 168

{
  "name" : "New User2",
  "username" : "newPutUser",
  "email" : "newuser@padas.io",
  "password" : null,
  "roles" : [ {
    "id" : null,
    "name" : "user"
  } ]
}
request example (failure)
PUT /api/users/newuser HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Content-Length: 157
Host: localhost:8999

{
  "name" : "New User2",
  "username" : "newuser",
  "email" : "newuser@padas.io",
  "password" : "password123",
  "roles" : [ {
    "name" : "user"
  } ]
}
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 119

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Provided username does not exist"
}

Delete: DELETE /api/users/{username}

Delete a specific user.

Table 56. /api/users/{username}
Parameter Description

username

Username to delete

request example (success)
DELETE /api/users/newDeleteUser HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/users/testadmin HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMzOX0.HxYDeIpqVsWebrpc6mGXXWXubbruySsCk42sCJFL0po
Host: localhost:8999
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 148

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Authenticated user is not allowed to delete herself"
}

Nodes

This REST endpoint provides functionality for Read and Delete operations on nodes resource.

Read ALL: GET /api/nodes

Read all nodes.

Table 57. request headers
Name Description

Authorization

Contains Bearer access token.

Table 58. response fields
Path Type Description

[]

Array

An array of nodes

[].uuid

String

UUID of registered Padas Engine node

[].host

String

Hostname of the node

[].rest

String

REST URL for the node

[].group

String

Group name for this node in order to distribute certain topologies

request example (success)
GET /api/nodes HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIzOH0.KO4UhXTz0A4oWxCERGyPdjCk1jlWVUFVGQ368J1pOoc
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 139

[ {
  "uuid" : "8963b371-4435-4af0-8d4c-9d0c7f1d2601",
  "host" : "seynur.local",
  "rest" : "https://null:8999",
  "group" : "default"
} ]

Read: GET /api/nodes/{id}

Read one user information.

Table 59. request headers
Name Description

Authorization

Contains Bearer access token.

Table 60. /api/nodes/{id}
Parameter Description

id

UUID of the node to fetch

Table 61. response fields
Path Type Description

uuid

String

UUID of registered Padas Engine node

host

String

Hostname of the node

rest

String

REST URL for the node

group

String

Group name for this node in order to distribute certain topologies

request example (success)
GET /api/nodes/8963b371-4435-4af0-8d4c-9d0c7f1d2601 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIzOH0.KO4UhXTz0A4oWxCERGyPdjCk1jlWVUFVGQ368J1pOoc
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 135

{
  "uuid" : "8963b371-4435-4af0-8d4c-9d0c7f1d2601",
  "host" : "seynur.local",
  "rest" : "https://null:8999",
  "group" : "default"
}
request example (failure)
GET /api/nodes/b2b0085b-afaf-4a56-acec-e5ebdc54d60a HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIzOH0.KO4UhXTz0A4oWxCERGyPdjCk1jlWVUFVGQ368J1pOoc
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 116

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested node does not exist"
}

Delete: DELETE /api/nodes/{id}

Delete a specific node. The ID must match the UUID of the node that is receiving the request.

Table 62. /api/nodes/{id}
Parameter Description

id

UUID of the node to fetch

request example (success)
DELETE /api/nodes/8963b371-4435-4af0-8d4c-9d0c7f1d2601 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIzOH0.KO4UhXTz0A4oWxCERGyPdjCk1jlWVUFVGQ368J1pOoc
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/nodes/179dd1b1-046c-4f88-b316-190c9321696a HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIzOH0.KO4UhXTz0A4oWxCERGyPdjCk1jlWVUFVGQ368J1pOoc
Host: localhost:8999
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 185

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Unable to remove node. In order to remove properly the node must match the provided UUID"
}

Tasks

This REST endpoint provides functionality for CRUD (Create, Read, Update, and Delete) operations on tasks resource.

Create: POST /api/tasks

Create a new task.

Table 63. request headers
Name Description

Authorization

Contains Bearer access token.

Table 64. request fields
Path Type Description

id

Number

ID for this task

name

String

Unique task name

description

String

Description of this task

function

String

Predefined functionality for the task, refer to schema definition

definition

Object

JSON object representing function parameters

Table 65. response fields
Path Type Description

id

Number

ID for this task

name

String

Unique task name

description

String

Description of this task

function

String

Predefined functionality for the task, refer to schema definition

definition

Object

JSON object representing function parameters

request example (success)
POST /api/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Content-Length: 200
Host: localhost:8999

{
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/tasks
Content-Type: application/json
Content-Length: 200
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}
request example (failure)
POST /api/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Content-Length: 200
Host: localhost:8999

{
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}
response example (failure)
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 171

{
  "status" : "CONFLICT",
  "message" : "Resource already exists",
  "debugMessage" : "Task already exists, can not create a new one. Please use update (PUT) endpoint."
}

Read ALL: GET /api/tasks

Read all tasks.

Table 66. request headers
Name Description

Authorization

Contains Bearer access token.

Table 67. response fields
Path Type Description

[].id

Number

ID for this task

[].name

String

Unique task name

[].description

String

Description of this task

[].function

String

Predefined functionality for the task, refer to schema definition

[].definition

Object

JSON object representing function parameters

request example (success)
GET /api/tasks HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 204
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

[ {
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
} ]

Read: GET /api/tasks/{id}

Read one task information.

Table 68. request headers
Name Description

Authorization

Contains Bearer access token.

Table 69. /api/tasks/{id}
Parameter Description

id

ID of the task to fetch

Table 70. response fields
Path Type Description

id

Number

ID for this task

name

String

Unique task name

description

String

Description of this task

function

String

Predefined functionality for the task, refer to schema definition

definition

Object

JSON object representing function parameters

request example (success)
GET /api/tasks/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 200
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}
request example (failure)
GET /api/tasks/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 116

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested task does not exist"
}

Update: PUT /api/tasks/{id}

Update a specific task.

Table 71. request headers
Name Description

Authorization

Contains Bearer access token.

Table 72. /api/tasks/{id}
Parameter Description

id

ID of the task to fetch

Table 73. request fields
Path Type Description

id

Number

ID for this task

name

String

Unique task name

description

String

Description of this task

function

String

Predefined functionality for the task, refer to schema definition

definition

Object

JSON object representing function parameters

Table 74. response fields
Path Type Description

id

Number

ID for this task

name

String

Unique task name

description

String

Description of this task

function

String

Predefined functionality for the task, refer to schema definition

definition

Object

JSON object representing function parameters

request example (success)
PUT /api/tasks/100 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Content-Length: 207
Host: localhost:8999

{
  "id" : 100,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 207
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "id" : 100,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}
request example (failure)
PUT /api/tasks/109 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Content-Length: 200
Host: localhost:8999

{
  "id" : 109,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 152

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Task to update does not exist. Please use create (POST) endpoint."
}

Delete: DELETE /api/tasks/{id}

Delete a specific task.

Table 75. /api/tasks/{id}
Parameter Description

id

ID of the task to fetch

request example (success)
DELETE /api/tasks/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/tasks/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 117

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Task to delete does not exist."
}

Bulk Update/Create: POST /api/bulk/tasks

Bulk update/create a list of tasks.

Table 76. request headers
Name Description

Authorization

Contains Bearer access token.

Table 77. request fields
Path Type Description

[].id

Number

ID for this task

[].name

String

Unique task name

[].description

String

Description of this task

[].function

String

Predefined functionality for the task, refer to schema definition

[].definition

Object

JSON object representing function parameters

Table 78. response fields
Path Type Description

[].id

Number

ID for this task

[].name

String

Unique task name

[].description

String

Description of this task

[].function

String

Predefined functionality for the task, refer to schema definition

[].definition

Object

JSON object representing function parameters

request example (success)
POST /api/bulk/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Content-Length: 353
Host: localhost:8999

[ {
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}, {
  "id" : 101,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here",
  "function" : "PARSE_KV",
  "definition" : { }
} ]
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 353
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

[ {
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}, {
  "id" : 101,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here",
  "function" : "PARSE_KV",
  "definition" : { }
} ]
request example (failure)
POST /api/bulk/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI3OH0.GuJ3jURc0jdMrYVRNX_T9ZG6qJWv8Bx4OKfA9fLFhd0
Content-Length: 412
Host: localhost:8999

[ {
  "id" : 100,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "function" : "TIMESTAMP",
  "definition" : {
    "field" : "somefield",
    "format" : "%H%M%S"
  }
}, {
  "id" : 101,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here",
  "function" : "PARSE_KV",
  "definition" : { }
}, {
  "someInvalidSchema" : "field value",
  "someId" : 4
} ]
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 146

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Unable to bulk update tasks due to invalid input."
}

Pipelines

This REST endpoint provides functionality for CRUD (Create, Read, Update, and Delete) operations on pipelines resource.

Create: POST /api/pipelines

Create a new pipeline.

Table 79. request headers
Name Description

Authorization

Contains Bearer access token.

Table 80. request fields
Path Type Description

id

Number

ID for this pipeline

name

String

Unique pipeline name

description

String

Description of this pipeline

tasks

Array

An array of ordered Task IDs

Table 81. response fields
Path Type Description

id

Number

ID for this pipeline

name

String

Unique pipeline name

description

String

Description of this pipeline

tasks

Array

An array of ordered Task IDs

request example (success)
POST /api/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Content-Length: 120
Host: localhost:8999

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/pipelines
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 120

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}
request example (failure)
POST /api/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Content-Length: 120
Host: localhost:8999

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}
response example (failure)
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 175

{
  "status" : "CONFLICT",
  "message" : "Resource already exists",
  "debugMessage" : "Pipeline already exists, can not create a new one. Please use update (PUT) endpoint."
}

Read ALL: GET /api/pipelines

Read all pipelines.

Table 82. request headers
Name Description

Authorization

Contains Bearer access token.

Table 83. response fields
Path Type Description

[].id

Number

ID for this pipeline

[].name

String

Unique pipeline name

[].description

String

Description of this pipeline

[].tasks

Array

An array of ordered Task IDs

request example (success)
GET /api/pipelines HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 124

[ {
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
} ]

Read: GET /api/pipelines/{id}

Read one pipeline information.

Table 84. request headers
Name Description

Authorization

Contains Bearer access token.

Table 85. /api/pipelines/{id}
Parameter Description

id

ID of the pipeline to fetch

Table 86. response fields
Path Type Description

id

Number

ID for this pipeline

name

String

Unique pipeline name

description

String

Description of this pipeline

tasks

Array

An array of ordered Task IDs

request example (success)
GET /api/pipelines/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 120

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}
request example (failure)
GET /api/pipelines/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 120

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested pipeline does not exist"
}

Update: PUT /api/pipelines/{id}

Update a specific pipeline.

Table 87. request headers
Name Description

Authorization

Contains Bearer access token.

Table 88. /api/pipelines/{id}
Parameter Description

id

ID of the pipeline to fetch

Table 89. request fields
Path Type Description

id

Number

ID for this pipeline

name

String

Unique pipeline name

description

String

Description of this pipeline

tasks

Array

An array of ordered Task IDs

Table 90. response fields
Path Type Description

id

Number

ID for this pipeline

name

String

Unique pipeline name

description

String

Description of this pipeline

tasks

Array

An array of ordered Task IDs

request example (success)
PUT /api/pipelines/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Content-Length: 127
Host: localhost:8999

{
  "id" : 1,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 127

{
  "id" : 1,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}
request example (failure)
PUT /api/pipelines/109 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Content-Length: 122
Host: localhost:8999

{
  "id" : 109,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 156

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Pipeline to update does not exist. Please use create (POST) endpoint."
}

Delete: DELETE /api/pipelines/{id}

Delete a specific pipeline.

Table 91. /api/pipelines/{id}
Parameter Description

id

ID of the pipeline to fetch

request example (success)
DELETE /api/pipelines/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/pipelines/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 121

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Pipeline to delete does not exist."
}

Bulk Update/Create: POST /api/bulk/pipelines

Bulk update/create a list of pipelines.

Table 92. request headers
Name Description

Authorization

Contains Bearer access token.

Table 93. request fields
Path Type Description

[].id

Number

ID for this pipeline

[].name

String

Unique pipeline name

[].description

String

Description of this pipeline

[].tasks

Array

An array of ordered Task IDs

Table 94. response fields
Path Type Description

[].id

Number

ID for this pipeline

[].name

String

Unique pipeline name

[].description

String

Description of this pipeline

[].tasks

Array

An array of ordered Task IDs

request example (success)
POST /api/bulk/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Content-Length: 245
Host: localhost:8999

[ {
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}, {
  "id" : 2,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "tasks" : [ 1, 5 ]
} ]
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 245

[ {
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}, {
  "id" : 2,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "tasks" : [ 1, 5 ]
} ]
request example (failure)
POST /api/bulk/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI1MX0.tGtS8LsMvm2CH9P13ln1U7vXcwAyeR6YzF7-9_ZONNk
Content-Length: 304
Host: localhost:8999

[ {
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "tasks" : [ 1, 3, 5 ]
}, {
  "id" : 2,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "tasks" : [ 1, 5 ]
}, {
  "someInvalidSchema" : "field value",
  "someId" : 4
} ]
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 150

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Unable to bulk update pipelines due to invalid input."
}

Topologies

This REST endpoint provides functionality for CRUD (Create, Read, Update, and Delete) operations on topologies resource.

Create: POST /api/topologies

Create a new topology.

Table 95. request headers
Name Description

Authorization

Contains Bearer access token.

Table 96. request fields
Path Type Description

id

Number

ID for this topology

name

String

Unique topology name

description

String

Description of this topology

pipelines

Array

An array of ordered Pipeline IDs

enabled

Boolean

Determines whether this topology is enabled or not, default is true

group

String

Group determines the instances where this topology should run, default is “default”

input.name

String

Input topic name.

input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].name

String

Output topic name.

output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

Table 97. response fields
Path Type Description

id

Number

ID for this topology

name

String

Unique topology name

description

String

Description of this topology

pipelines

Array

An array of ordered Pipeline IDs

enabled

Boolean

Determines whether this topology is enabled or not, default is true

group

String

Group determines the instances where this topology should run, default is “default”

input.name

String

Input topic name.

input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].name

String

Output topic name.

output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

request example (success)
POST /api/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Content-Length: 593
Host: localhost:8999

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/topologies
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 593

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}
request example (failure)
POST /api/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Content-Length: 593
Host: localhost:8999

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}
response example (failure)
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 175

{
  "status" : "CONFLICT",
  "message" : "Resource already exists",
  "debugMessage" : "Topology already exists, can not create a new one. Please use update (PUT) endpoint."
}

Read ALL: GET /api/topologies

Read all topologies.

Table 98. request headers
Name Description

Authorization

Contains Bearer access token.

Table 99. response fields
Path Type Description

[].id

Number

ID for this topology

[].name

String

Unique topology name

[].description

String

Description of this topology

[].pipelines

Array

An array of ordered Pipeline IDs

[].enabled

Boolean

Determines whether this topology is enabled or not, default is true

[].group

String

Group determines the instances where this topology should run, default is “default”

[].input.name

String

Input topic name.

[].input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].output.[].name

String

Output topic name.

[].output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

request example (success)
GET /api/topologies HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 1194

[ {
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}, {
  "id" : 2,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
} ]

Read: GET /api/topologies/{id}

Read one topology information.

Table 100. request headers
Name Description

Authorization

Contains Bearer access token.

Table 101. /api/topologies/{id}
Parameter Description

id

ID of the topology to fetch

Table 102. response fields
Path Type Description

id

Number

ID for this topology

name

String

Unique topology name

description

String

Description of this topology

pipelines

Array

An array of ordered Pipeline IDs

enabled

Boolean

Determines whether this topology is enabled or not, default is true

group

String

Group determines the instances where this topology should run, default is “default”

input.name

String

Input topic name.

input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].name

String

Output topic name.

output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

request example (success)
GET /api/topologies/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 593

{
  "id" : 1,
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}
request example (failure)
GET /api/topologies/222 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 120

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested topology does not exist"
}

Update: PUT /api/topologies/{id}

Update a specific topology.

Table 103. request headers
Name Description

Authorization

Contains Bearer access token.

Table 104. /api/topologies/{id}
Parameter Description

id

ID of the topology to fetch

Table 105. request fields
Path Type Description

id

Number

ID for this topology

name

String

Unique topology name

description

String

Description of this topology

pipelines

Array

An array of ordered Pipeline IDs

enabled

Boolean

Determines whether this topology is enabled or not, default is true

group

String

Group determines the instances where this topology should run, default is “default”

input.name

String

Input topic name.

input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].name

String

Output topic name.

output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

Table 106. response fields
Path Type Description

id

Number

ID for this topology

name

String

Unique topology name

description

String

Description of this topology

pipelines

Array

An array of ordered Pipeline IDs

enabled

Boolean

Determines whether this topology is enabled or not, default is true

group

String

Group determines the instances where this topology should run, default is “default”

input.name

String

Input topic name.

input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].name

String

Output topic name.

output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

request example (success)
PUT /api/topologies/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Content-Length: 600
Host: localhost:8999

{
  "id" : 1,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 600

{
  "id" : 1,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}
request example (failure)
PUT /api/topologies/222 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Content-Length: 602
Host: localhost:8999

{
  "id" : 222,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 156

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Topology to update does not exist. Please use create (POST) endpoint."
}

Delete: DELETE /api/topologies/{id}

Delete a specific topology.

Table 107. /api/topologies/{id}
Parameter Description

id

ID of the topology to fetch

request example (success)
DELETE /api/topologies/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/topologies/222 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 121

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Topology to delete does not exist."
}

Bulk Update/Create: POST /api/bulk/topologies

Bulk update/create a list of topologies.

Table 108. request headers
Name Description

Authorization

Contains Bearer access token.

Table 109. request fields
Path Type Description

[].id

Number

ID for this topology

[].name

String

Unique topology name

[].description

String

Description of this topology

[].pipelines

Array

An array of ordered Pipeline IDs

[].enabled

Boolean

Determines whether this topology is enabled or not, default is true

[].group

String

Group determines the instances where this topology should run, default is “default”

[].input.name

String

Input topic name.

[].input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].output.[].name

String

Output topic name.

[].output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

Table 110. response fields
Path Type Description

[].id

Number

ID for this topology

[].name

String

Unique topology name

[].description

String

Description of this topology

[].pipelines

Array

An array of ordered Pipeline IDs

[].enabled

Boolean

Determines whether this topology is enabled or not, default is true

[].group

String

Group determines the instances where this topology should run, default is “default”

[].input.name

String

Input topic name.

[].input.keySerde

String

Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].input.valueSerde

String

Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].output.[].name

String

Output topic name.

[].output.[].keySerde

String

Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

[].output.[].valueSerde

String

Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde".

request example (success)
POST /api/bulk/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Content-Length: 1201
Host: localhost:8999

[ {
  "id" : 1,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}, {
  "id" : 2,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
} ]
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 1201

[ {
  "id" : 1,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}, {
  "id" : 2,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
} ]
request example (failure)
POST /api/bulk/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzMyM30.xTKLL3haZUfqvFulFfXyYIJfJEwKdPo4ScmaIPOjLoo
Content-Length: 1260
Host: localhost:8999

[ {
  "id" : 1,
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}, {
  "id" : 2,
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "pipelines" : [ 1, 3, 5 ],
  "enabled" : true,
  "group" : "default",
  "input" : {
    "name" : "test-topology-input",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  },
  "output" : [ {
    "name" : "test-topology-output",
    "keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
    "valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
  } ]
}, {
  "someInvalidSchema" : "field value",
  "someId" : 4
} ]
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 151

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Unable to bulk update topologies due to invalid input."
}

Rules

This REST endpoint provides functionality for CRUD (Create, Read, Update, and Delete) operations on rules resource.

Create: POST /api/rules

Create a new rule.

Table 111. request headers
Name Description

Authorization

Contains Bearer access token.

Table 112. request fields
Path Type Description

id

String

ID for this rule

name

String

Unique rule name

description

String

Description of this rule

pdl

String

PDL query to match against events

annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

enabled

Boolean

Determines whether this rule is active

Table 113. response fields
Path Type Description

id

String

ID for this rule

name

String

Unique rule name

description

String

Description of this rule

pdl

String

PDL query to match against events

annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

enabled

Boolean

Determines whether this rule is active

request example (success)
POST /api/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Content-Length: 211
Host: localhost:8999

{
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/rules
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 211

{
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}
request example (failure)
POST /api/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Content-Length: 211
Host: localhost:8999

{
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}
response example (failure)
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 171

{
  "status" : "CONFLICT",
  "message" : "Resource already exists",
  "debugMessage" : "Rule already exists, can not create a new one. Please use update (PUT) endpoint."
}

Read ALL: GET /api/rules

Read all rules.

Table 114. request headers
Name Description

Authorization

Contains Bearer access token.

Table 115. response fields
Path Type Description

[].id

String

ID for this rule

[].name

String

Unique rule name

[].description

String

Description of this rule

[].pdl

String

PDL query to match against events

[].annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

[].enabled

Boolean

Determines whether this rule is active

request example (success)
GET /api/rules HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 215

[ {
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
} ]

Read: GET /api/rules/{id}

Read one rule information.

Table 116. request headers
Name Description

Authorization

Contains Bearer access token.

Table 117. /api/rules/{id}
Parameter Description

id

ID of the rule to fetch

Table 118. response fields
Path Type Description

id

String

ID for this rule

name

String

Unique rule name

description

String

Description of this rule

pdl

String

PDL query to match against events

annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

enabled

Boolean

Determines whether this rule is active

request example (success)
GET /api/rules/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 211

{
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}
request example (failure)
GET /api/rules/x1099 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 116

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested rule does not exist"
}

Update: PUT /api/rules/{id}

Update a specific rule.

Table 119. request headers
Name Description

Authorization

Contains Bearer access token.

Table 120. /api/rules/{id}
Parameter Description

id

ID of the rule to fetch

Table 121. request fields
Path Type Description

id

String

ID for this rule

name

String

Unique rule name

description

String

Description of this rule

pdl

String

PDL query to match against events

annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

enabled

Boolean

Determines whether this rule is active

Table 122. response fields
Path Type Description

id

String

ID for this rule

name

String

Unique rule name

description

String

Description of this rule

pdl

String

PDL query to match against events

annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

enabled

Boolean

Determines whether this rule is active

request example (success)
PUT /api/rules/100 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Content-Length: 218
Host: localhost:8999

{
  "id" : "100",
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 218

{
  "id" : "100",
  "name" : "MyUpdatedTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}
request example (failure)
PUT /api/rules/x1099 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Content-Length: 213
Host: localhost:8999

{
  "id" : "x1099",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 152

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Rule to update does not exist. Please use create (POST) endpoint."
}

Delete: DELETE /api/rules/{id}

Delete a specific rule.

Table 123. /api/rules/{id}
Parameter Description

id

ID of the rule to fetch

request example (success)
DELETE /api/rules/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/rules/x1099 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 117

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Rule to delete does not exist."
}

Bulk Update/Create: POST /api/bulk/rules

Bulk update/create a list of rules.

Table 124. request headers
Name Description

Authorization

Contains Bearer access token.

Table 125. request fields
Path Type Description

[].id

String

ID for this rule

[].name

String

Unique rule name

[].description

String

Description of this rule

[].pdl

String

PDL query to match against events

[].annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

[].enabled

Boolean

Determines whether this rule is active

Table 126. response fields
Path Type Description

[].id

String

ID for this rule

[].name

String

Unique rule name

[].description

String

Description of this rule

[].pdl

String

PDL query to match against events

[].annotations

Array

An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs

[].enabled

Boolean

Determines whether this rule is active

request example (success)
POST /api/bulk/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Content-Length: 432
Host: localhost:8999

[ {
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}, {
  "id" : "1001",
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : false
} ]
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 432

[ {
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}, {
  "id" : "1001",
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : false
} ]
request example (failure)
POST /api/bulk/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI2NX0.6Es-jJKcaNxq0Jh9xY_Sc0_sZ9cX8K_9TXa0cJ0Nv5g
Content-Length: 491
Host: localhost:8999

[ {
  "id" : "100",
  "name" : "MyTest name",
  "description" : "MyTest description text goes here",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : true
}, {
  "id" : "1001",
  "name" : "MyTest name2",
  "description" : "MyTest description text goes here2",
  "pdl" : "src=mysource AND dest=some.dest.ip",
  "annotations" : [ "T1001", "T1059.001" ],
  "enabled" : false
}, {
  "someInvalidSchema" : "field value",
  "someId" : 4
} ]
response example (failure)
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 146

{
  "status" : "BAD_REQUEST",
  "message" : "Resource validation failed",
  "debugMessage" : "Unable to bulk update rules due to invalid input."
}

Lookups

This REST endpoint provides functionality for CRUD (Create, Read, Update, and Delete) operations on Lookup resources.

Create: POST /api/lookups

Create a new lookup.

Table 127. request headers
Name Description

Authorization

Contains Bearer access token.

Table 128. request parameters
Parameter Description

id

ID for this lookup

Table 129. request parts
Part Description

file

Multipart form data that holds the file to be uploaded.

Table 130. response fields
Path Type Description

id

String

ID for this lookup

request example (success)
POST /api/lookups HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=id

test_id
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=test_csv.csv
Content-Type: text/csv

field1,field2,field3
value1,5,value3
v1,3,v3

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
response example (success)
HTTP/1.1 201 Created
Location: https://localhost:8999/api/lookups
Content-Type: text/plain;charset=UTF-8
Content-Length: 22
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "id" : "test_id"
}
request example (failure)
POST /api/lookups HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=id

test_id
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=test_csv.csv
Content-Type: text/csv

field1,field2,field3
value1,5,value3
v1,3,v3

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
response example (failure)
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 173

{
  "status" : "CONFLICT",
  "message" : "Resource already exists",
  "debugMessage" : "Lookup already exists, can not create a new one. Please use update (PUT) endpoint."
}

Read ALL: GET /api/lookups

Read all lookups.

Table 131. request headers
Name Description

Authorization

Contains Bearer access token.

Table 132. response fields
Path Type Description

[].id

String

ID for this lookup

[].content

Array

Contents of the lookup file as JSON array (CSV content is converted).

request example (success)
GET /api/lookups HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 184

[ {
  "id" : "test_id",
  "content" : [ {
    "field1" : "value1",
    "field2" : 5,
    "field3" : "value3"
  }, {
    "field1" : "v1",
    "field2" : 3,
    "field3" : "v3"
  } ]
} ]

Read: GET /api/lookups/{id}

Read one lookup information.

Table 133. request headers
Name Description

Authorization

Contains Bearer access token.

Table 134. /api/lookups/{id}
Parameter Description

id

ID of the lookup to fetch

Table 135. response fields
Path Type Description

id

String

ID for this lookup

content

Array

Contents of the lookup file as JSON array (CSV content is converted).

request example (success)
GET /api/lookups/test_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 180

{
  "id" : "test_id",
  "content" : [ {
    "field1" : "value1",
    "field2" : 5,
    "field3" : "value3"
  }, {
    "field1" : "v1",
    "field2" : 3,
    "field3" : "v3"
  } ]
}
request example (failure)
GET /api/lookups/xxtest_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 118

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested lookup does not exist"
}

Update: POST /api/lookups/{id}

Update a specific lookup.

Table 136. request headers
Name Description

Authorization

Contains Bearer access token.

Table 137. /api/lookups/{id}
Parameter Description

id

ID of the lookup to fetch

Table 138. request parts
Part Description

file

Multipart form data that holds the file to be uploaded.

Table 139. response fields
Path Type Description

id

String

ID for this lookup

request example (success)
POST /api/lookups/test_id HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=test_json.json
Content-Type: text/json

[{"field1":"value1","field3":"value3","field2":5},{"field1":"v1","field3":"v3","field2":3}]
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
response example (success)
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 22
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "id" : "test_id"
}
request example (failure)
POST /api/lookups/xxtest_id HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=test_json.json
Content-Type: text/json

[{"field1":"value1","field3":"value3","field2":5},{"field1":"v1","field3":"v3","field2":3}]
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 154

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Lookup to update does not exist. Please use create (POST) endpoint."
}

Delete: DELETE /api/lookups/{id}

Delete a specific lookup.

Table 140. /api/lookups/{id}
Parameter Description

id

ID of the lookup to fetch

request example (success)
DELETE /api/lookups/test_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999
response example (success)
HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
request example (failure)
DELETE /api/lookups/xxtest_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzIxNH0.HDVJ46ltqR92v73AAketQmAoTcX5kSZGN1mUR0Ic3e0
Host: localhost:8999
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 119

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Lookup to delete does not exist."
}

Tests

This REST endpoint provides functionality for testing a rule, a task, or a pipeline. Request body contains the payload for the given test. For example, for a Rule test it must be JSON but depending on the task and/or pipeline it can be plain text (e.g. raw event data)

Testing a Rule: POST /api/test/rules/{id}

id represents the rule to be tested for the given payload.

Table 141. request headers
Name Description

Authorization

Contains Bearer access token.

Table 142. response fields
Path Type Description

result

Object

Result of this test as JSON value. It is set to either <code>true</code> or <code>false</code> for rule matching.

request example (success)
POST /api/test/rules/myruleid1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 68
Host: localhost:8999

{
  "src" : "my_source",
  "dest" : "10.20.30.40",
  "bytes" : 456
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : {
    "src" : "my_source",
    "dest" : "10.20.30.40",
    "bytes" : 456
  }
}
request example (failure)
POST /api/test/rules/myruleid1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 72
Host: localhost:8999

{
  "src" : "no_such_value",
  "dest" : "10.20.30.40",
  "bytes" : 456
}
response example (failure)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 21
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : null
}

Testing a Task: POST /api/test/tasks/{id}

id represents the task to be tested for the given payload.

Table 143. request headers
Name Description

Authorization

Contains Bearer access token.

Table 144. response fields
Path Type Description

result

String

Result of this test as JSON value.

request example (success)
POST /api/test/tasks/100 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 81
Host: localhost:8999

{
  "mytime" : "20-05-2022 11:45:09",
  "dest" : "10.20.30.40",
  "bytes" : 456
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 118
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : "{\"mytime\":\"20-05-2022 11:45:09\",\"dest\":\"10.20.30.40\",\"bytes\":456,\"_time\":1653047109000}"
}
request example (failure)
POST /api/test/tasks/100 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 88
Host: localhost:8999

{
  "no_such_field" : "20-05-2022 11:45:09",
  "dest" : "10.20.30.40",
  "bytes" : 456
}
response example (failure)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 125
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : "{\"no_such_field\":\"20-05-2022 11:45:09\",\"dest\":\"10.20.30.40\",\"bytes\":456,\"_time\":1748196693649}"
}

Testing a Pipeline: POST /api/test/pipelines/{id}

id represents the pipeline to be tested for the given payload.

Table 145. request headers
Name Description

Authorization

Contains Bearer access token.

Table 146. response fields
Path Type Description

result

String

Result of this test as JSON value.

request example (success)
POST /api/test/pipelines/100 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 57
Host: localhost:8999

mytime="20-05-2022 11:45:09", dest=10.20.30.40, bytes=456
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 199
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : "{\"mytime\":\"20-05-2022 11:45:09\",\"dest\":\"10.20.30.40\",\"bytes\":456,\"raw_data\":\"mytime=\\\"20-05-2022 11:45:09\\\", dest=10.20.30.40, bytes=456\",\"_time\":1653047109000}"
}
request example (failure)
POST /api/test/pipelines/177 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 57
Host: localhost:8999

mytime="20-05-2022 11:45:09", dest=10.20.30.40, bytes=456
response example (failure)
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 120

{
  "status" : "NOT_FOUND",
  "message" : "Resource not found",
  "debugMessage" : "Requested pipeline does not exist"
}

Testing a PDL: POST /api/test/pdl

Table 147. request headers
Name Description

Authorization

Contains Bearer access token.

Table 148. response fields
Path Type Description

result

Object

Result of this test as JSON value.

request example (success)
POST /api/test/pdl HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 83
Host: localhost:8999

{
  "pdl" : "bytes > 400",
  "data" : "{\"dest\":\"10.20.30.40\", \"bytes\":456}"
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 68
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : {
    "dest" : "10.20.30.40",
    "bytes" : 456
  }
}

Testing a PDL Syntax: POST /api/test/pdl/syntax

Table 149. request headers
Name Description

Authorization

Contains Bearer access token.

Table 150. response fields
Path Type Description

result

Boolean

Result of this syntax test as JSON value.

request example (success)
POST /api/test/pdl/syntax HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTc0ODE5NzI5M30.PxhL7qLLcpQhiiCSWh-k4u3T2V0cz2iNg5uf0FeOb-A
Content-Length: 55
Host: localhost:8999

{
  "pdl" : "bytes > 400 AND field1=\"value string\""
}
response example (success)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 21
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY

{
  "result" : true
}

End

End of document