Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include x-correlator #112

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 81 additions & 12 deletions code/API_definitions/device-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ paths:
summary: "Get the current connectivity status information"
description: Get the current connectivity status information
operationId: getConnectivityStatus
parameters:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-status:connectivity:read
Expand All @@ -139,6 +141,9 @@ paths:
responses:
"200":
description: Contains information about current connectivity status
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand Down Expand Up @@ -172,6 +177,8 @@ paths:
summary: "Get the current roaming status and the country information"
description: Get the current roaming status and the country information
operationId: getRoamingStatus
parameters:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-status:roaming:read
Expand All @@ -184,6 +191,9 @@ paths:
responses:
"200":
description: Contains information about current roaming status
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand Down Expand Up @@ -223,6 +233,8 @@ paths:
summary: "Create a device status event subscription for a device"
description: Create a device status event subscription for a device
operationId: createDeviceStatusSubscription
parameters:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-status:subscriptions:create
Expand All @@ -243,6 +255,8 @@ paths:
Important: this endpoint is to be implemented by the API consumer.
The Device status server will call this endpoint whenever any device status related event occurs.
operationId: postNotification
parameters:
- $ref: '#/components/parameters/x-correlator'
requestBody:
required: true
content:
Expand All @@ -269,6 +283,9 @@ paths:
responses:
"204":
description: Successful notification
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
"400":
$ref: "#/components/responses/Generic400"
"401":
Expand All @@ -286,12 +303,18 @@ paths:
responses:
"201":
description: Created
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
$ref: "#/components/schemas/SubscriptionInfo"
"202":
description: Request accepted to be processed. It applies for async creation process.
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand All @@ -314,12 +337,17 @@ paths:
summary: "Retrieve a list of device status event subscription"
description: Retrieve a list of device status event subscription(s)
operationId: retrieveSubscriptionList
parameters:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-status:subscriptions:read
responses:
"200":
description: List of event subscription details
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand Down Expand Up @@ -347,15 +375,14 @@ paths:
- openId:
- device-status:subscriptions:read
parameters:
- name: subscriptionId
in: path
description: Subscription identifier that was obtained from the create subscription operation
required: true
schema:
type: string
- $ref: "#/components/parameters/SubscriptionId"
- $ref: '#/components/parameters/x-correlator'
responses:
"200":
description: OK
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand Down Expand Up @@ -399,17 +426,19 @@ paths:
- openId:
- device-status:subscriptions:delete
parameters:
- name: subscriptionId
in: path
description: Subscription identifier that was obtained from the create event subscription operation
required: true
schema:
type: string
- $ref: "#/components/parameters/SubscriptionId"
- $ref: '#/components/parameters/x-correlator'
responses:
"204":
description: event subscription deleted
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
"202":
description: Request accepted to be processed. It applies for async deletion process.
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand Down Expand Up @@ -448,6 +477,25 @@ components:
openId:
type: openIdConnect
openIdConnectUrl: https://example.com/.well-known/openid-configuration
parameters:
SubscriptionId:
name: subscriptionId
in: path
description: Subscription identifier that was obtained from the create event subscription operation
required: true
schema:
$ref: '#/components/schemas/SubscriptionId'
x-correlator:
name: x-correlator
in: header
description: Correlation id for the different services
schema:
type: string
headers:
x-correlator:
description: Correlation id for the different services
schema:
type: string
schemas:
akoshunyadi marked this conversation as resolved.
Show resolved Hide resolved
RoamingStatusResponse:
type: object
Expand Down Expand Up @@ -927,6 +975,9 @@ components:
responses:
Generic400:
description: Problem with the client request
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand All @@ -937,6 +988,9 @@ components:
message: "Client specified an invalid argument, request body or query param"
Generic401:
description: Authentication problem with the client request
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand All @@ -947,6 +1001,9 @@ components:
message: "Request not authenticated due to missing, invalid, or expired credentials"
Generic403:
description: Client does not have sufficient permission
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand All @@ -957,6 +1014,9 @@ components:
message: "Client does not have sufficient permissions to perform this action"
Generic404:
description: Resource Not Found
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand All @@ -967,6 +1027,9 @@ components:
message: "The specified resource is not found"
Generic409:
description: Conflict
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand All @@ -977,6 +1040,9 @@ components:
message: "The specified resource is in a conflict"
Generic500:
description: Server error
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand All @@ -987,6 +1053,9 @@ components:
message: "Server error"
Generic503:
description: Service unavailable. Typically the server is down.
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
Expand Down