Consume Kinesis API

Available by Request

This is only available by request. Please contact your Telenor Connexion representative for more information.

Using this API you can configure an AWS Kinesis Data Stream receiving all observations that are published into MIC. The stream will be accessible from an AWS account that you specify. From that account you can then assume a role that has permission to consume the AWS Kinesis Data Stream in whatever way you prefer.

Integration

SETUP_STREAM

Required role: Root

Sets up the stream to receive incoming observations and creates the role that allows the provided AWS account to consume the stream. The stream will be created with status CREATING and will change to ACTIVE when the stream is ready to be consumed.

API Endpoint: [PUT]: /setup

Request

Headers

  • Authorization: The Authorization token returned from /auth/login

Body

  • accountId: Id of the AWS account that should have permission to consume the stream. required

Example payload

{
  "accountId": "123456789012"
}

Response

  • status: The stream creation status. Could be one of CREATING , ACTIVE , DELETING , UPDATING .
  • streamArn: The ARN of the stream to use when registering the stream consumer.
  • roleArn: The ARN of the role that should be assumed in order to consume the stream.

Example payload

{
  "status": "CREATING",
  "roleArn": "arn:aws:iam::012345678901:role/prod-ConsumeKinesisStreamRole",
  "streamArn": "arn:aws:kinesis:eu-west-1:012345678901:stream/prod-CustomerKinesisStream"
}

GET_STREAM_STATUS

Required role: Root

Fetches the status of the Kinesis stream.

API Endpoint: [GET]: /status

Request

Headers

  • Authorization: The Authorization token returned from /auth/login

Response

  • status: The stream creation status. Could be one of CREATING , ACTIVE , DELETING , UPDATING .
  • streamArn: The ARN of the stream to use when registering the stream consumer.
  • roleArn: The ARN of the role that should be assumed in order to consume the stream.

TEST_STREAM

Required role: Root

Put a test message on the stream.

API Endpoint: [POST]: /test

Request

Headers

  • Authorization: The Authorization token returned from /auth/login

Body

  • message: A string to put on the stream.required

Example payload

{
  "message": "Testing stream 123"
}

Response

  • message: Successfully put data on stream.

DISABLE_STREAM

Required role: Root

Stops observations from being published to the stream and removes the role required to consume the stream.

API Endpoint: [DELETE]: /setup

Request

Headers

  • Authorization: The Authorization token returned from /auth/login

Body

No body required

Response

  • message