Skip to content

ATL-674:- Add SHIELD telemetry event API endpoints - #202

Merged
Pasha Zayko (pasha-zayko) merged 6 commits into
mainfrom
feature/ATL-674_Shield-Event-Endpoints-Description
Sep 10, 2026
Merged

ATL-674:- Add SHIELD telemetry event API endpoints#202
Pasha Zayko (pasha-zayko) merged 6 commits into
mainfrom
feature/ATL-674_Shield-Event-Endpoints-Description

Conversation

@JagdishKhunti

@JagdishKhunti Jagdish Khunti (JagdishKhunti) commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This pull request adds new telemetry support for SHIELD events to the Data Gateway API and updates the SDK version to 3.4.0. The main changes include new API endpoints for submitting and retrieving SHIELD event records, new schema definitions for telemetry events, and version updates in the OpenAPI spec and TypeScript SDK package files.

Telemetry SHIELD Event API additions:

  • Added new /Api/Telemetry/Shield/Event endpoint for creating (POST) and listing (GET) SHIELD telemetry events across all tenants, including request/response schemas and permission requirements.
  • Added /Api/Telemetry/Shield/Event/Tenant/{tenantId} endpoint for retrieving SHIELD event records for a specific tenant, with filtering and security details.

Schema and specification updates:

  • Added Telemetry.Shield.EventName enum and Telemetry.Shield.Event object schema to define SHIELD event names and event structure, including example data.
  • Updated the OpenAPI spec version from 3.3.1 to 3.4.0 in specs/Data-Gateway.json.

SDK version bump:

  • Bumped the TypeScript SDK package version to 3.4.0 in both package.json and package-lock.json to reflect the new API additions. [1] [2]

Introduces SHIELD telemetry event support in the Data Gateway OpenAPI spec, including new event schemas, event-name enum values, and endpoints to create events plus list events globally or by tenant with optional date filtering. Also bumps the API and TypeScript SDK package versions to 3.3.4 to publish the new contract.
Copilot AI lite review requested due to automatic review settings September 9, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SHIELD telemetry “event” support to the Data Gateway OpenAPI spec (new schemas + endpoints) and bumps the generated TypeScript SDK version to match the updated API surface.

Changes:

  • Added Telemetry.Shield.EventName enum and Telemetry.Shield.Event schema definitions.
  • Added /Api/Telemetry/Shield/Event (POST/GET) and /Api/Telemetry/Shield/Event/Tenant/{tenantId} (GET) endpoints to the OpenAPI spec.
  • Bumped Data Gateway spec + TypeScript SDK versions to 3.3.4.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/dataGateway/TypeScript/package.json Bumps SDK package version to 3.3.4.
src/dataGateway/TypeScript/package-lock.json Keeps lockfile version in sync with the SDK bump to 3.3.4.
specs/Data-Gateway.json Adds SHIELD telemetry event schemas/endpoints and updates spec version to 3.3.4.
Files not reviewed (1)
  • src/dataGateway/TypeScript/package-lock.json: Generated file
Suppressed comments (1)

specs/Data-Gateway.json:8131

  • The POST request body schema references Telemetry.Shield.Event, which also includes eventId, tenantId, and timestamps. Even if the service ignores them, the contract currently suggests clients can submit these fields, which risks tenant spoofing/misuse and generates misleading SDK types. Use an input schema that only accepts eventName.
                            "schema": {
                                "$ref": "#/components/schemas/Telemetry.Shield.Event"
                            }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread specs/Data-Gateway.json Outdated
Comment thread specs/Data-Gateway.json Outdated
Comment thread specs/Data-Gateway.json
Marks SHIELD event identifiers and timestamps as read-only in the OpenAPI schema. Updates the GET endpoint permission text to reflect the required Telemetry.Shield.Read.All and Telemetry.Shield.ReadWrite.All scopes, and adjusts the spec version metadata accordingly.
This change updates the Data Gateway schema descriptions for SHIELD event types and records to make the wording more concise and consistent. It removes redundant 'telemetry' phrasing and clarifies that the eventId uniquely identifies the event itself.
Update the Data Gateway OpenAPI specification and TypeScript SDK package metadata to version 3.4.0, keeping the published API version and generated package artifacts in sync.

@pasha-zayko Pasha Zayko (pasha-zayko) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small changes and we can publish this

Comment thread specs/Data-Gateway.json
"400": {
"$ref": "#/components/responses/400"
},
"401": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see code where it returns 401 or 403 - unless you plan to use them, which is acceptable, lets not confuse the behavior with unavailable/unplanned capabilities

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the existing middleware behaviour, and it looks like both 401 and 403 responses are already possible for this endpoint:

401 Unauthorized can be returned by the global clientAuthorization middleware when the bearer token is missing or malformed.
403 Forbidden can be returned by the scope enforcement middleware when the caller is authenticated but does not have the required telemetryShieldReadWrite permissions.

My intention was to document the endpoint's actual behaviour rather than introduce new functionality. That said, I'm happy to remove them from the documentation if you'd prefer to keep it focused on the endpoint-specific responses only.

For example, I called the endpoint with an invalid token and received the following response.

image

And this response was generated by the code in "bearerAuthentication.ts."

image

Comment thread specs/Data-Gateway.json Outdated
Comment thread specs/Data-Gateway.json
"400": {
"$ref": "#/components/responses/400"
},
"401": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as earlier, 401 and 403 are not response codes known in the code currently

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Comment thread specs/Data-Gateway.json Outdated
Comment thread specs/Data-Gateway.json
"400": {
"$ref": "#/components/responses/400"
},
"401": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as earlier, 401 and 403 are not response codes known in the code currently

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

This change adds example payloads for Shield event arrays in the Data-Gateway OpenAPI spec. The examples illustrate common event lifecycle entries such as installation and license report progress, improving discoverability and documentation for API consumers.
@pasha-zayko
Pasha Zayko (pasha-zayko) merged commit 10a4839 into main Sep 10, 2026
7 of 8 checks passed
@pasha-zayko
Pasha Zayko (pasha-zayko) deleted the feature/ATL-674_Shield-Event-Endpoints-Description branch September 10, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants