# Kafka Message Dispatcher API #

This page renders the OpenAPI specification for the Kafka Message Dispatcher used by the A1 Simulator, directly inline.

The mapping from policy type to kafka topic request and response object

GET /policytypetotopicmapping/{policyTypeId}

Get the kafka request and response topic map corresponding to policy type

Parameters:
  • policyTypeId (string)

Example request:

GET /policytypetotopicmapping/{policyTypeId} HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    The policy type to topic map schemas

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "policy_type": {
            "request_topic": "string",
            "response_topic": "string"
        }
    }
    

  • 404 Not Found

    No resource found at the URI

    Example response:

    HTTP/1.1 404 Not Found
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 429 Too Many Requests

    Too many requests have been sent in a given amount of time

    Example response:

    HTTP/1.1 429 Too Many Requests
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 503 Service Unavailable

    The provider is currently unable to handle the request due to a temporary overload

    Example response:

    HTTP/1.1 503 Service Unavailable
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

Individual policy Object

PUT /policytypes/{policyTypeId}/kafkadispatcher/{policyId}

Dispatch create and update operation as kafka message to kafka cluster

Parameters:
  • policyTypeId (string)

  • policyId (string)

Example request:

PUT /policytypes/{policyTypeId}/kafkadispatcher/{policyId} HTTP/1.1
Host: example.com
Content-Type: application/json

{}
Status Codes:
  • 200 OK – Create or update operation dispatched

  • 400 Bad Request

    A1 policy not properly formulated or not related to the method

    Example response:

    HTTP/1.1 400 Bad Request
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 408 Request Timeout

    Request could not be processed in given amount of time

    Example response:

    HTTP/1.1 408 Request Timeout
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 419

    Publishing the kafka message to the broker gets fail

    Example response:

    HTTP/1.1 419 -
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 429 Too Many Requests

    Too many requests have been sent in a given amount of time

    Example response:

    HTTP/1.1 429 Too Many Requests
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 503 Service Unavailable

    The provider is currently unable to handle the request due to a temporary overload

    Example response:

    HTTP/1.1 503 Service Unavailable
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 507 Insufficient Storage

    The method could not be performed on the resource because the provider is unable to store the representation needed to successfully complete the request

    Example response:

    HTTP/1.1 507 Insufficient Storage
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

default

DELETE /policytypes/{policyTypeId}/kafkadispatcher/{policyId}

Dispatch policy delete opertion as kafka message to kafka cluster

Parameters:
  • policyTypeId (string)

  • policyId (string)

Status Codes:
  • 200 OK – Delete operation dispatched

  • 408 Request Timeout

    Request could not be processed in given amount of time

    Example response:

    HTTP/1.1 408 Request Timeout
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 419

    Publishing the kafka message to the broker gets fail

    Example response:

    HTTP/1.1 419 -
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 429 Too Many Requests

    Too many requests have been sent in a given amount of time

    Example response:

    HTTP/1.1 429 Too Many Requests
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 503 Service Unavailable

    The provider is currently unable to handle the request due to a temporary overload

    Example response:

    HTTP/1.1 503 Service Unavailable
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

Individual A1 Policy Status Object

GET /policytypes/{policyTypeId}/kafkadispatcher/{policyId}/status

Dispatch policy status query opertion as kafka message to kafka cluster

Parameters:
  • policyTypeId (string)

  • policyId (string)

Example request:

GET /policytypes/{policyTypeId}/kafkadispatcher/{policyId}/status HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK – Query policy status operation dispatched

  • 429 Too Many Requests

    Too many requests have been sent in a given amount of time

    Example response:

    HTTP/1.1 429 Too Many Requests
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }
    

  • 503 Service Unavailable

    The provider is currently unable to handle the request due to a temporary overload

    Example response:

    HTTP/1.1 503 Service Unavailable
    Content-Type: application/problem+json
    
    {
        "type": "string",
        "title": "string",
        "status": 1.0,
        "detail": "string",
        "instance": "string"
    }