PADAS Engine REST Docs
- Overview
- REST Endpoints
- Init
- Authentication & Authorization
- Config
- Engine
- Topics
- Create:
POST /api/topics
- Read ALL Topics:
GET /api/topics
- Read:
GET /api/topics/{name}
- Delete:
DELETE /api/topics/{name}
- Bulk Create:
POST /api/bulk/topics
- Produce Messages:
POST /api/topics/{name}/produce
- Create Consumer for Messages:
POST /api/topics/{name}/consume
- Consume Messages:
GET /api/topics/{name}/consume
- Create:
- Users
- Nodes
- Tasks
- Pipelines
- Topologies
- Rules
- Lookups
- Tests
- End
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 |
---|---|---|
|
|
Used to retrieve all available resources (Read all) |
|
|
Used to retrieve a resource (Read one) |
|
|
Used to create a new resource (Create) |
|
|
Used to update an existing resource (Update one) |
|
|
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 |
---|---|
|
The request completed successfully |
|
A new resource has been created successfully. The resource’s URI is available from the response’s
|
|
An update to an existing resource has been applied successfully |
|
The request was malformed. The response body will include an error providing further information |
|
The request lacks valid authentication credentials |
|
The request lacks valid authorization credentials (e.g. invalid tokens or role) |
|
The requested resource did not exist |
|
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.
Field Name | Description |
---|---|
|
Response status |
|
Resource related error message |
|
Endpoint specific message details for debugging |
Following table provides information on error message
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.
Path | Type | Description |
---|---|---|
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
Password for this user |
|
|
An array of roles |
|
|
Name of the role. |
Path | Type | Description |
---|---|---|
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
An array of roles |
|
|
Id for role |
|
|
Name of the role. |
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"
} ]
}
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"
} ]
}
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"
} ]
}
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.
Path | Type | Description |
---|---|---|
|
|
Shows status. Value is |
GET /api/init HTTP/1.1
Host: localhost:8999
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
}
GET /api/init HTTP/1.1
Host: localhost:8999
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.
Path | Type | Description |
---|---|---|
|
|
Username to login. |
|
|
Password for the user. |
Path | Type | Description |
---|---|---|
|
|
Authorization (JWT) token to access protected API resources. |
|
|
This token can be used to obtain additional access token when existing one expires. |
POST /api/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 57
Host: localhost:8999
{
"username" : "testadmin",
"password" : "password"
}
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.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTM4N30.crgE96OHEfrDxPecF4SnG1iuuEh8rnOe8_r1f11Uy_4",
"refresh_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2NDM4N30.wqcYlA5BwAkOngp4Y7MM2FAgbj1-PqBnRaUQ8CdmUM0"
}
POST /api/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 62
Host: localhost:8999
{
"username" : "testadmin",
"password" : "nosuchpassxxx"
}
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.
Name | Description |
---|---|
|
Contains Bearer refresh token for getting a fresh access token. |
Path | Type | Description |
---|---|---|
|
|
Authorization (JWT) token to access protected API resources. |
|
|
This token can be used to obtain additional access token when existing one expires. |
GET /api/token/refresh HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2NDM5N30.V58Ouza6ioN4fPk7F5SWID_rGMjVLtmAa0EQGuDVvyc
Host: localhost:8999
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.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS90b2tlbi9yZWZyZXNoIiwiZXhwIjoxNjk4ODYxMzk3fQ.wv2enkz77Vdt7U7qkw08Xg-gZqAEor87oBNMWuxWRyQ",
"refresh_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2NDM5N30.V58Ouza6ioN4fPk7F5SWID_rGMjVLtmAa0EQGuDVvyc"
}
GET /api/token/refresh HTTP/1.1
Authorization: Bearer some_invalid_refresh_token
Host: localhost:8999
HTTP/1.1 401 Unauthorized
ERROR: JWT verification error.
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: 49
{
"error_message" : "JWT verification error."
}
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.
Path | Type | Description |
---|---|---|
|
|
Provides the list of supported SerDe strings. |
|
|
Provides the list of supported Serializer strings. |
|
|
Provides the list of supported Deserializer strings. |
GET /api/config/serde HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTQxNX0.3_mwBOzMvESDhmD7aXHOvc0r3M3UBJi1QAyn5a4K_F8
Host: localhost:8999
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 1670
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" ],
"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" ],
"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" ]
}
Engine
This REST endpoint provides functionality for reading state, stop, and start actions for stream engine.
State: GET /api/engine/state
Read current state based on https://docs.confluent.io/platform/current/streams/javadocs/javadoc/org/apache/kafka/streams/KafkaStreams.State.html
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Current list of states of the stream engine threads according to https://docs.confluent.io/platform/current/streams/javadocs/javadoc/org/apache/kafka/streams/KafkaStreams.State.html |
GET /api/engine/state HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTQzNX0.2I9n_KLsB7a1GOzh0Bq9ZywuVJlFNFx6RgmZXYBnDAw
Host: localhost:8999
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: 30
{
"states" : [ "RUNNING" ]
}
Stop: POST /api/engine/stop
Stop the engine. If it’s already stopped it should return the same result.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Current list of states of the stream engine threads according to https://docs.confluent.io/platform/current/streams/javadocs/javadoc/org/apache/kafka/streams/KafkaStreams.State.html |
POST /api/engine/stop HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTQzNX0.2I9n_KLsB7a1GOzh0Bq9ZywuVJlFNFx6RgmZXYBnDAw
Host: localhost:8999
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: 34
{
"states" : [ "NOT_RUNNING" ]
}
POST /api/engine/stop HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTQzNX0.2I9n_KLsB7a1GOzh0Bq9ZywuVJlFNFx6RgmZXYBnDAw
Host: localhost:8999
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: 34
{
"states" : [ "NOT_RUNNING" ]
}
Start: POST /api/engine/start
Start the engine. The engine must be in NOT_RUNNING
state.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Current list of states of the stream engine threads according to https://docs.confluent.io/platform/current/streams/javadocs/javadoc/org/apache/kafka/streams/KafkaStreams.State.html |
POST /api/engine/start HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTQzNX0.2I9n_KLsB7a1GOzh0Bq9ZywuVJlFNFx6RgmZXYBnDAw
Host: localhost:8999
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: 34
{
"states" : [ "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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Topic name |
|
|
Number of partitions for this topic |
|
|
Number of replicas for this topic |
|
|
Other configuration options, e.g. cleanup.policy, retention.bytes, etc. |
Path | Type | Description |
---|---|---|
|
|
Topic name |
|
|
Number of partitions for this topic |
|
|
Number of replicas for this topic |
|
|
Other configuration options, e.g. cleanup.policy, retention.bytes, etc. |
POST /api/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Content-Length: 143
Host: localhost:8999
{
"name" : "padas-test-topic-1",
"numberOfPartitions" : 1,
"replicationFactor" : 1,
"options" : {
"cleanup.policy" : "delete"
}
}
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"
}
}
POST /api/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Content-Length: 113
Host: localhost:8999
{ "name": "padas_lookups", "numberOfPartitions": "" "replicationFactor": "", "compact": true }
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
GET /api/topics HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Host: localhost:8999
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: 916
[ "test-consumer-topic2", "mycsvinput", "test_input", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000009-changelog", "myoutput2", "myoutput1", "input-os-nix", "padas_rules", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000005-changelog", "padas_lookups", "padas_topologies", "padas_nodes", "padas_pipelines", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000005-repartition", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000008-repartition", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000009-repartition", "padas_tasks", "output-os-nix", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000008-changelog", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000004-changelog", "padas_alerts", "test_output", "padas-default-stream-KSTREAM-AGGREGATE-STATE-STORE-0000000004-repartition", "myfwinput", "unit_test_output_topic", "test-consumer-topic3" ]
Read: GET /api/topics/{name}
Read one topic information.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
Name of the topic to fetch |
Path | Type | Description |
---|---|---|
|
|
Topic name |
|
|
Number of partitions for this topic |
|
|
Number of replicas for this topic |
|
|
Other configuration options, e.g. cleanup.policy, retention.bytes, etc. |
GET /api/topics/padas_nodes HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Host: localhost:8999
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: 1156
{
"name" : "padas_nodes",
"numberOfPartitions" : 1,
"replicationFactor" : 1,
"options" : {
"compression.type" : "producer",
"leader.replication.throttled.replicas" : "",
"message.downconversion.enable" : "true",
"min.insync.replicas" : "1",
"segment.jitter.ms" : "0",
"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",
"preallocate" : "false",
"min.cleanable.dirty.ratio" : "0.5",
"index.interval.bytes" : "4096",
"unclean.leader.election.enable" : "false",
"retention.bytes" : "-1",
"delete.retention.ms" : "86400000",
"segment.ms" : "604800000",
"message.timestamp.difference.max.ms" : "9223372036854775807",
"segment.index.bytes" : "10485760"
}
}
GET /api/topics/no-such-topic-exists HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Host: localhost:8999
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.
Parameter | Description |
---|---|
|
Name of the topic to fetch |
DELETE /api/topics/padas-test-topic-1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Host: localhost:8999
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
DELETE /api/topics/no-such-topic-exists HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Topic name |
|
|
Number of partitions for this topic |
|
|
Number of replicas for this topic |
|
|
Other configuration options, e.g. cleanup.policy, retention.bytes, etc. |
Path | Type | Description |
---|---|---|
|
|
Topic name |
|
|
Result of create operation, either "success" or "failure" |
POST /api/bulk/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
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"
}
} ]
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"
} ]
POST /api/bulk/topics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
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"
}
} ]
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
Topic name to produce messages to. |
Path | Type | Description |
---|---|---|
|
|
Optional Kafka serializer object for key, if not provided StringSerializer is used as default. |
|
|
Optional Kafka serializer object for value, if not provided StringSerializer is used as default. |
|
|
An array of key/value pairs for messages. Key field is optional. |
|
|
Optional key for the message |
|
|
Value for the message. |
Path | Type | Description |
---|---|---|
|
|
Result of topic request, should be either "success" of "failure". |
POST /api/topics/test-event-topic/produce HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
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"
} ]
}
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"
}
POST /api/topics/no-such-topic/produce HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
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"
} ]
}
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
Topic name to produce messages to. |
Path | Type | Description |
---|---|---|
|
|
Optional Kafka deserializer object for key, if not provided StringDeserializer is used as default. |
|
|
Optional Kafka deserializer object for value, if not provided StringDeserializer is used as default. |
|
|
Maximum number of events to consume before closing this consumer. |
|
|
Maximum seconds to wait for events before closing this consumer. |
|
|
Offset for consuming, can be either "earliest" or "latest" |
Path | Type | Description |
---|---|---|
|
|
Provides the status of the consumer (e.g. RUNNING) or the error. |
POST /api/topics/test-event-topic/consume HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
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"
}
HTTP/1.1 201 Created
Location: https://localhost:8999/api/topics/test-event-topic/consume
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
{
"status" : "CREATED"
}
POST /api/topics/no-such-topic-exists/consume HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
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"
}
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."
}
Consume Messages: GET /api/topics/{name}/consume
Read/Consume messages from a topic where the consumer is created with POST
request.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
Topic name to produce messages to. |
Parameter | Description |
---|---|
|
Starting index of the messages to consume. If not specified 0 is assumed and all messages are returned. |
Path | Type | Description |
---|---|---|
|
|
Provides the status of the consumer (e.g. RUNNING). |
|
|
An array of key/value pairs for messages. |
|
|
Key for the message |
|
|
Value for the message. |
GET /api/topics/test-event-topic/consume?index=0 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYzM30.KXlpuc92b8dhL7426rG17hWK38K9XukT__318fFsJgw
Host: localhost:8999
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"
} ]
}
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
Password for this user |
|
|
An array of roles |
|
|
Name of the role. |
Path | Type | Description |
---|---|---|
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
An array of roles |
|
|
Id for role |
|
|
Name of the role. |
POST /api/users HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Content-Length: 156
Host: localhost:8999
{
"name" : "New User",
"username" : "newuser",
"email" : "newuser@padas.io",
"password" : "password123",
"roles" : [ {
"name" : "user"
} ]
}
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: 140
{
"name" : "New User",
"username" : "newuser",
"email" : "newuser@padas.io",
"roles" : [ {
"id" : 9,
"name" : "user"
} ]
}
POST /api/users HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Content-Length: 156
Host: localhost:8999
{
"name" : "New User",
"username" : "newuser",
"email" : "newuser@padas.io",
"password" : "password123",
"roles" : [ {
"name" : "user"
} ]
}
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: 172
{
"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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
An array of users |
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
An array of roles |
|
|
Id for role |
|
|
Name of the role. |
GET /api/users HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Host: localhost:8999
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
[ {
"name" : "Test Admin",
"username" : "testadmin",
"email" : "testadmin@padas.io",
"roles" : [ {
"id" : 2,
"name" : "admin"
} ]
} ]
Read: GET /api/users/{username}
Read one user information.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
Username to fetch |
Path | Type | Description |
---|---|---|
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
An array of roles |
|
|
Id for role |
|
|
Name of the role. |
GET /api/users/testadmin HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Host: localhost:8999
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: 147
{
"name" : "Test Admin",
"username" : "testadmin",
"email" : "testadmin@padas.io",
"roles" : [ {
"id" : 2,
"name" : "admin"
} ]
}
GET /api/users/nosuchuserxxx HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
Username to udpate |
Path | Type | Description |
---|---|---|
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
Password for this user, can be left empty to skip update |
|
|
An array of roles |
|
|
Name of the role. |
Path | Type | Description |
---|---|---|
|
|
Display name for user |
|
|
Unique user name |
|
|
Email address associated with this user |
|
|
An array of roles |
|
|
Id for role |
|
|
Name of the role. |
PUT /api/users/newuser HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Content-Length: 157
Host: localhost:8999
{
"name" : "New User2",
"username" : "newuser",
"email" : "newuser@padas.io",
"password" : "password123",
"roles" : [ {
"name" : "user"
} ]
}
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: 142
{
"name" : "New User2",
"username" : "newuser",
"email" : "newuser@padas.io",
"roles" : [ {
"id" : 12,
"name" : "user"
} ]
}
PUT /api/users/newuser HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Content-Length: 157
Host: localhost:8999
{
"name" : "New User2",
"username" : "newuser",
"email" : "newuser@padas.io",
"password" : "password123",
"roles" : [ {
"name" : "user"
} ]
}
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.
Parameter | Description |
---|---|
|
Username to delete |
DELETE /api/users/newuser HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Host: localhost:8999
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
DELETE /api/users/testadmin HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY3M30.WlWDoNnin6klqtAGATVA2vK1K3jy7cB4U0MAPkrtJQY
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
An array of nodes |
|
|
UUID of registered Padas Engine node |
|
|
Hostname of the node |
|
|
REST URL for the node |
|
|
Group name for this node in order to distribute certain topologies |
GET /api/nodes HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUzNn0.PvzGDhPdgBRKxoNRU3KzXUAzznqqK7IT_OHkfpopNb8
Host: localhost:8999
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: 147
[ {
"uuid" : "45443803-c6f2-413e-b9fb-89f76b027b73",
"host" : "seynur.local",
"rest" : "https://seynur.local:8999",
"group" : "default"
} ]
Read: GET /api/nodes/{id}
Read one user information.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
UUID of the node to fetch |
Path | Type | Description |
---|---|---|
|
|
UUID of registered Padas Engine node |
|
|
Hostname of the node |
|
|
REST URL for the node |
|
|
Group name for this node in order to distribute certain topologies |
GET /api/nodes/45443803-c6f2-413e-b9fb-89f76b027b73 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUzNn0.PvzGDhPdgBRKxoNRU3KzXUAzznqqK7IT_OHkfpopNb8
Host: localhost:8999
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: 143
{
"uuid" : "45443803-c6f2-413e-b9fb-89f76b027b73",
"host" : "seynur.local",
"rest" : "https://seynur.local:8999",
"group" : "default"
}
GET /api/nodes/676e9a08-1fa7-47de-b4fe-72d1f79e39f8 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUzNn0.PvzGDhPdgBRKxoNRU3KzXUAzznqqK7IT_OHkfpopNb8
Host: localhost:8999
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.
Parameter | Description |
---|---|
|
UUID of the node to fetch |
DELETE /api/nodes/45443803-c6f2-413e-b9fb-89f76b027b73 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUzNn0.PvzGDhPdgBRKxoNRU3KzXUAzznqqK7IT_OHkfpopNb8
Host: localhost:8999
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
DELETE /api/nodes/7986dcea-9dd6-4420-9710-60f3b5e459b5 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUzNn0.PvzGDhPdgBRKxoNRU3KzXUAzznqqK7IT_OHkfpopNb8
Host: localhost:8999
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: 186
{
"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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
POST /api/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
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"
}
}
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"
}
}
POST /api/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
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"
}
}
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: 172
{
"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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
GET /api/tasks HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the task to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
GET /api/tasks/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
Host: localhost:8999
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"
}
}
GET /api/tasks/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the task to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
PUT /api/tasks/100 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
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"
}
}
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"
}
}
PUT /api/tasks/109 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
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"
}
}
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.
Parameter | Description |
---|---|
|
ID of the task to fetch |
DELETE /api/tasks/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
Host: localhost:8999
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
DELETE /api/tasks/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
Path | Type | Description |
---|---|---|
|
|
ID for this task |
|
|
Unique task name |
|
|
Description of this task |
|
|
Predefined functionality for the task, refer to schema definition |
|
|
JSON object representing function parameters |
POST /api/bulk/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
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" : { }
} ]
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" : { }
} ]
POST /api/bulk/tasks HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU5NH0.6pHUmYQ6hltxdhy0G8WNcICAN-F2p7FFJAAEGbE4VA8
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
} ]
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
POST /api/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Content-Length: 120
Host: localhost:8999
{
"id" : 1,
"name" : "MyTest name",
"description" : "MyTest description text goes here",
"tasks" : [ 1, 3, 5 ]
}
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 ]
}
POST /api/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Content-Length: 120
Host: localhost:8999
{
"id" : 1,
"name" : "MyTest name",
"description" : "MyTest description text goes here",
"tasks" : [ 1, 3, 5 ]
}
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: 176
{
"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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
GET /api/pipelines HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the pipeline to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
GET /api/pipelines/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Host: localhost:8999
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 ]
}
GET /api/pipelines/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the pipeline to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
PUT /api/pipelines/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Content-Length: 127
Host: localhost:8999
{
"id" : 1,
"name" : "MyUpdatedTest name",
"description" : "MyTest description text goes here",
"tasks" : [ 1, 3, 5 ]
}
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 ]
}
PUT /api/pipelines/109 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Content-Length: 122
Host: localhost:8999
{
"id" : 109,
"name" : "MyTest name",
"description" : "MyTest description text goes here",
"tasks" : [ 1, 3, 5 ]
}
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.
Parameter | Description |
---|---|
|
ID of the pipeline to fetch |
DELETE /api/pipelines/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Host: localhost:8999
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
DELETE /api/pipelines/109 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
Path | Type | Description |
---|---|---|
|
|
ID for this pipeline |
|
|
Unique pipeline name |
|
|
Description of this pipeline |
|
|
An array of ordered Task IDs |
POST /api/bulk/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
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 ]
} ]
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 ]
} ]
POST /api/bulk/pipelines HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU1NX0.gz9qR1hYDLo3F_znOlgbT3FiS6DRtiAXGrR6uIoyZUE
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
} ]
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
POST /api/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Content-Length: 575
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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}
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: 575
{
"id" : 1,
"name" : "MyTest name",
"description" : "MyTest description text goes here",
"pipelines" : [ 1, 3, 5 ],
"enabled" : true,
"group" : "default",
"input" : {
"name" : "test_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}
POST /api/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Content-Length: 575
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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}
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: 176
{
"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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
GET /api/topologies HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Host: localhost:8999
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: 1158
[ {
"id" : 1,
"name" : "MyTest name",
"description" : "MyTest description text goes here",
"pipelines" : [ 1, 3, 5 ],
"enabled" : true,
"group" : "default",
"input" : {
"name" : "test_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the topology to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
GET /api/topologies/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Host: localhost:8999
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: 575
{
"id" : 1,
"name" : "MyTest name",
"description" : "MyTest description text goes here",
"pipelines" : [ 1, 3, 5 ],
"enabled" : true,
"group" : "default",
"input" : {
"name" : "test_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}
GET /api/topologies/222 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the topology to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
PUT /api/topologies/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Content-Length: 582
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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}
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: 582
{
"id" : 1,
"name" : "MyUpdatedTest name",
"description" : "MyTest description text goes here",
"pipelines" : [ 1, 3, 5 ],
"enabled" : true,
"group" : "default",
"input" : {
"name" : "test_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}
PUT /api/topologies/222 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Content-Length: 584
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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}
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.
Parameter | Description |
---|---|
|
ID of the topology to fetch |
DELETE /api/topologies/1 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Host: localhost:8999
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
DELETE /api/topologies/222 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
Path | Type | Description |
---|---|---|
|
|
ID for this topology |
|
|
Unique topology name |
|
|
Description of this topology |
|
|
An array of ordered Pipeline IDs |
|
|
Determines whether this topology is enabled or not, default is |
|
|
Group determines the instances where this topology should run, default is “default” |
|
|
Input topic name. |
|
|
Input topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Input topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic name. |
|
|
Output topic key SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
|
|
Output topic value SerDe, if not specified default is "org.apache.kafka.common.serialization.Serdes$StringSerde". |
POST /api/bulk/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Content-Length: 1165
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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
} ]
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: 1165
[ {
"id" : 1,
"name" : "MyUpdatedTest name",
"description" : "MyTest description text goes here",
"pipelines" : [ 1, 3, 5 ],
"enabled" : true,
"group" : "default",
"input" : {
"name" : "test_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
} ]
POST /api/bulk/topologies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTY1M30.W4WxZaej9c5ot7_p0UvDO2LQnJiou0xe6sz2x63cdAc
Content-Length: 1224
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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_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_input",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
},
"output" : [ {
"name" : "test_output",
"keySerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde",
"valueSerde" : "org.apache.kafka.common.serialization.Serdes$StringSerde"
} ]
}, {
"someInvalidSchema" : "field value",
"someId" : 4
} ]
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
POST /api/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
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
}
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
}
POST /api/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
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
}
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: 172
{
"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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
GET /api/rules HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the rule to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
GET /api/rules/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
Host: localhost:8999
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
}
GET /api/rules/x1099 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the rule to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
PUT /api/rules/100 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
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
}
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
}
PUT /api/rules/x1099 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
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
}
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.
Parameter | Description |
---|---|
|
ID of the rule to fetch |
DELETE /api/rules/100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
Host: localhost:8999
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
DELETE /api/rules/x1099 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
Path | Type | Description |
---|---|---|
|
|
ID for this rule |
|
|
Unique rule name |
|
|
Description of this rule |
|
|
PDL query to match against events |
|
|
An array of annotations regarding this rule, such as MITRE ATT&CK Technique IDs |
|
|
Determines whether this rule is active |
POST /api/bulk/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
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
} ]
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
} ]
POST /api/bulk/rules HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTU3NH0.mmRvdpzgCxV8x3vj0LiPwO9Ppa8vgBqfMOHE7EaYizc
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
} ]
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID for this lookup |
Part | Description |
---|---|
|
Multipart form data that holds the file to be uploaded. |
Path | Type | Description |
---|---|---|
|
|
ID for this lookup |
POST /api/lookups HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
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--
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"
}
POST /api/lookups HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
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--
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: 174
{
"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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
ID for this lookup |
|
|
Contents of the lookup file as JSON array (CSV content is converted). |
GET /api/lookups HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the lookup to fetch |
Path | Type | Description |
---|---|---|
|
|
ID for this lookup |
|
|
Contents of the lookup file as JSON array (CSV content is converted). |
GET /api/lookups/test_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
Host: localhost:8999
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"
} ]
}
GET /api/lookups/xxtest_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Parameter | Description |
---|---|
|
ID of the lookup to fetch |
Part | Description |
---|---|
|
Multipart form data that holds the file to be uploaded. |
Path | Type | Description |
---|---|---|
|
|
ID for this lookup |
POST /api/lookups/test_id HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
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--
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"
}
POST /api/lookups/xxtest_id HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
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--
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.
Parameter | Description |
---|---|
|
ID of the lookup to fetch |
DELETE /api/lookups/test_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
Host: localhost:8999
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
DELETE /api/lookups/xxtest_id HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTUxN30.ytVwIi1iDnOKJSpnFh8L70uGi9i9s5sgnM8KgoE2RG4
Host: localhost:8999
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Result of this test as JSON value. It is set to either <code>true</code> or <code>false</code> for rule matching. |
POST /api/test/rules/myruleid1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 68
Host: localhost:8999
{
"src" : "my_source",
"dest" : "10.20.30.40",
"bytes" : 456
}
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
}
}
POST /api/test/rules/myruleid1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 72
Host: localhost:8999
{
"src" : "no_such_value",
"dest" : "10.20.30.40",
"bytes" : 456
}
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.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Result of this test as JSON value. |
POST /api/test/tasks/100 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 81
Host: localhost:8999
{
"mytime" : "20-05-2022 11:45:09",
"dest" : "10.20.30.40",
"bytes" : 456
}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 135
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
}
}
POST /api/test/tasks/100 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 88
Host: localhost:8999
{
"no_such_field" : "20-05-2022 11:45:09",
"dest" : "10.20.30.40",
"bytes" : 456
}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 142
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" : 1698861014671
}
}
Testing a Pipeline: POST /api/test/pipelines/{id}
id
represents the pipeline to be tested for the given payload.
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Result of this test as JSON value. |
POST /api/test/pipelines/100 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 57
Host: localhost:8999
mytime="20-05-2022 11:45:09", dest=10.20.30.40, bytes=456
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 183
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",
"bytes" : 456,
"_raw" : "mytime=\"20-05-2022 11:45:09\", dest=10.20.30.40, bytes=456",
"_time" : 1653047109000
}
}
POST /api/test/pipelines/177 HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 57
Host: localhost:8999
mytime="20-05-2022 11:45:09", dest=10.20.30.40, bytes=456
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
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Result of this test as JSON value. |
POST /api/test/pdl HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 83
Host: localhost:8999
{
"pdl" : "bytes > 400",
"data" : "{\"dest\":\"10.20.30.40\", \"bytes\":456}"
}
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
Name | Description |
---|---|
|
Contains Bearer access token. |
Path | Type | Description |
---|---|---|
|
|
Result of this syntax test as JSON value. |
POST /api/test/pdl/syntax HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0YWRtaW4iLCJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4OTk5L2FwaS9sb2dpbiIsImV4cCI6MTY5ODg2MTYxNH0.ShSoe3Ul0I9saGsLwbEj2-ZbEE5IhwZ3FlFQeHgh3Os
Content-Length: 55
Host: localhost:8999
{
"pdl" : "bytes > 400 AND field1=\"value string\""
}
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