Skip to content

Commit d82ab0e

Browse files
authored
Push changes for SystemLink 2020 R2 release (#87)
2 parents 982bab5 + e70774a commit d82ab0e

File tree

16 files changed

+3098
-1159
lines changed

16 files changed

+3098
-1159
lines changed

alarm/nialarm.yml

Lines changed: 156 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,33 @@ definitions:
4242
type: array
4343
items:
4444
type: string
45+
resourceType:
46+
description: Type of resource associated with the error.
47+
This field is only present for entries in *innerErrors*.
48+
type: string
49+
enum: [instanceId]
50+
resourceId:
51+
description: Identifier of the resource associated with the error.
52+
This field is only present for entries in *innerErrors*.
53+
type: string
54+
innerErrors:
55+
description: Array of individual errors when a request results in multiple errors.
56+
This field is only present when *name* is 'Skyline.OneOrMoreErrorsOccurred'.
57+
type: array
58+
items:
59+
$ref: '#/definitions/Error'
4560
example:
46-
name: AlarmInstance.InstanceNotFound
47-
code: -253006
48-
message: An instance with instanceId '5c2cf7e0e0d64403b486fcb4' was not found.
61+
name: Skyline.OneOrMoreErrorsOccurred
62+
code: -251041
63+
message: One or more errors occurred. See the contained list for details of each error.
4964
args: []
65+
innerErrors:
66+
- name: AlarmInstance.InstanceNotFound
67+
code: -253006
68+
message: An instance with instanceId '5c2cf7e0e0d64403b486fcb4' was not found.
69+
resourceType: instanceId
70+
resourceId: 5c2cf7e0e0d64403b486fcb4
71+
args: [5c2cf7e0e0d64403b486fcb4]
5072
Operation:
5173
description: Operation provided by the API
5274
type: object
@@ -104,6 +126,11 @@ definitions:
104126
rule.
105127
type: string
106128
example: CRIO1.System.Health.DiskSpaceUsePercentage.Bdd9u!4aMd!$pYrf*CnaIZ2tbu$-Ct%?
129+
workspace:
130+
description: The ID of the workspace to which this alarm instance belongs. Added in version 3 of the
131+
readAlarmInstances operation.
132+
type: string
133+
example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841
107134
active:
108135
description: Whether or not the alarm instance is active. An active alarm deserves human or automated
109136
attention. Alarm instances always begin life with *active*/true. This field will be automatically
@@ -410,6 +437,16 @@ definitions:
410437
example:
411438
- keyword1
412439
- keyword2
440+
workspaces:
441+
type: array
442+
description: Workspace query. The service will return instances whose *workspace* field is one of
443+
the specified workspaces. By default, only instances in the default workspace are returned.
444+
Specify an array containing a single value of *\** to query all workspaces. Added in version 3 of the
445+
readAlarmInstances operation.
446+
items:
447+
type: string
448+
example:
449+
- '*'
413450
QueryRequest:
414451
title: Query Request
415452
description: Object describing the request body for an alarm instance query request
@@ -487,7 +524,6 @@ paths:
487524
summary: API information
488525
description: Returns information about API versions and available operations.
489526
operationId: RootEndpoint
490-
x-ni-request-all-privileges: true
491527
# Explicitly mark security as an empty array - this route does not require any privileges.
492528
# Marking it this way prevents it from inheriting the top-level security settings.
493529
security: []
@@ -516,7 +552,6 @@ paths:
516552
summary: API version information
517553
description: Returns available operations for a single version of the API.
518554
operationId: RootEndpointWithVersion
519-
x-ni-request-all-privileges: true
520555
# Explicitly mark security as an empty array - this route does not require any privileges.
521556
# Marking it this way prevents it from inheriting the top-level security settings.
522557
security: []
@@ -529,12 +564,81 @@ paths:
529564
description: Not Found
530565
schema:
531566
$ref: '#/definitions/Error'
532-
/v1/acknowledge-instances:
567+
/v1/acknowledge-instances-by-instance-id:
533568
post:
534569
tags: [alarm instances]
535570
summary: Acknowledge alarm instances
536571
description: Acknowledges one or more alarm instances, optionally forcing them clear and adding notes to
537-
them.
572+
them. Added in version 2 of the writeAlarmInstances operation.
573+
operationId: AcknowledgeInstancesByInstanceId
574+
x-ni-operation: writeAlarmInstances
575+
parameters:
576+
- in: body
577+
name: Request body
578+
required: true
579+
schema:
580+
type: object
581+
title: AcknowledgeByInstanceIdRequestBody
582+
required:
583+
- instanceIds
584+
properties:
585+
instanceIds:
586+
description: The *instanceId*s of the alarm instances which should be acknowledged.
587+
type: array
588+
items:
589+
type: string
590+
example: [5c33c212e0d6444320d9a9f4, 5c2cf7e0e0d64403b486fcb4]
591+
forceClear:
592+
description: Whether or not the affected alarm instances should have their *clear* field set
593+
to true.
594+
type: boolean
595+
default: false
596+
notes:
597+
description: Notes which should be added to the alarm instances.
598+
type: array
599+
items:
600+
$ref: '#/definitions/AlarmNote'
601+
responses:
602+
200:
603+
description: Success - Indicates the request to acknowledge was processed successfully.
604+
If any instances failed to be acknowledged, the included *error* object will contain
605+
an entry in the *innerErrors* array for each failed instance.
606+
schema:
607+
type: object
608+
title: AcknowledgeByInstanceIdResponse
609+
properties:
610+
acknowledged:
611+
description: The *instanceId*s of the alarm instances which were successfully acknowledged.
612+
type: array
613+
items:
614+
type: string
615+
example: [5c33c212e0d6444320d9a9f4]
616+
failed:
617+
description: The *instanceId*s of the alarm instances which were not acknowledged.
618+
See *error* for why each instance failed to be acknowledged. Reasons include the instance
619+
could not be found, the instance was already acknowledged, or the caller is not authorized
620+
to acknowledge the instance.
621+
type: array
622+
items:
623+
type: string
624+
example: [5c2cf7e0e0d64403b486fcb4]
625+
error:
626+
$ref: '#/definitions/Error'
627+
401:
628+
$ref: '#/responses/Unauthorized'
629+
default:
630+
$ref: '#/responses/Error'
631+
/v1/acknowledge-instances:
632+
post:
633+
tags: [deprecated]
634+
deprecated: true
635+
summary: Acknowledge alarm instances
636+
description: As of version 2 of the writeAlarmInstances operation, this route is deprecated.
637+
Instead, use the POST /v1/acknowledge-instances-by-instance-id route.
638+
639+
640+
Acknowledges one or more alarm instances in the default workspace by alarm id,
641+
optionally forcing them clear and adding notes to them.
538642
operationId: AcknowledgeInstances
539643
x-ni-operation: writeAlarmInstances
540644
parameters:
@@ -571,23 +675,23 @@ paths:
571675
title: AcknowledgeResponse
572676
properties:
573677
acknowledged:
574-
description: The *alarmIds* which were successfully acknowledged.
678+
description: The *alarmId*s which were successfully acknowledged.
575679
type: array
576680
items:
577681
type: string
578-
example: [5c40ec55e0d6441168b4c543, 5c40ec55e0d6441168b4c543]
682+
example: [System1.Health.DiskSpaceAlarm, System2.Health.DiskSpaceAlarm]
579683
alreadyAcknowledged:
580-
description: The *alarmIds* which had already been previously acknowledged.
684+
description: The *alarmId*s which had already been previously acknowledged.
581685
type: array
582686
items:
583687
type: string
584-
example: [5c40ec55e0d6441168b4c541]
688+
example: [System1.Health.DiskSpaceAlarm]
585689
notFound:
586-
description: A collection of *alarmIds* for which no active alarm instances were found.
690+
description: A collection of *alarmId*s for which no active alarm instances were found.
587691
type: array
588692
items:
589693
type: string
590-
example: [5c40ec55e0d6441168b4c549]
694+
example: [System2.Health.DiskSpaceAlarm]
591695
401:
592696
$ref: '#/responses/Unauthorized'
593697
default:
@@ -604,7 +708,7 @@ paths:
604708
- in: body
605709
name: Request body
606710
description: Container which holds data for the request. If an alarm instance is being updated, only
607-
alarmId and transition are applied.
711+
alarmId, workspace, and transition are applied.
608712
schema:
609713
type: object
610714
title: CreateOrUpdateInstanceRequest
@@ -614,11 +718,17 @@ paths:
614718
properties:
615719
alarmId:
616720
description: A value meant to uniquely identify the particular process or condition tracked
617-
by a given alarm. For example, alarms created by the Tag Rule Engine Service have their
618-
alarmIds set to the concatenation of the path of the tag which caused the rule to be
619-
triggered and the ID of the rule.
721+
by a given alarm within a workspace. For example, alarms created by the Tag Rule Engine
722+
Service have their alarmIds set to the concatenation of the path of the tag which caused
723+
the rule to be triggered and the ID of the rule.
620724
type: string
621725
example: CRIO1.System.Health.DiskSpaceMeanUsePercentage.Bdd9u!4aMd!$pYrf*CnaIZ2tbu$-Ct%?
726+
workspace:
727+
description: The ID of the workspace in which to create or update the alarm. When not specified,
728+
the default workspace is used based on the requesting user. Added in version 2 of the
729+
writeAlarmInstances operation.
730+
type: string
731+
example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841
622732
transition:
623733
$ref: '#/definitions/AlarmTransition'
624734
createdBy:
@@ -760,7 +870,7 @@ paths:
760870
tags: [alarm instances]
761871
summary: Query alarm instances
762872
description: Queries for alarm instances. Specifying an empty JSON object in the request body will
763-
result in all alarm instances being returned.
873+
result in all alarm instances in the default workspace being returned.
764874
operationId: QueryInstances
765875
x-ni-operation: readAlarmInstances
766876
parameters:
@@ -798,10 +908,36 @@ paths:
798908
type: string
799909
example:
800910
- 5c33c212e0d6444320d9a9f4
801-
- 5c33c212e0d6444320d9a9f5
911+
- 5c2cf7e0e0d64403b486fcb4
802912
responses:
913+
200:
914+
description: Partial Success - Indicates the request to delete was processed successfully,
915+
but one or more instances failed to delete. The included *error* object will contain
916+
an entry in the *innerErrors* array for each failed instance.
917+
schema:
918+
type: object
919+
title: DeleteInstancesByInstanceIdPartialSuccess
920+
properties:
921+
deleted:
922+
description: The *instanceId*s of the alarm instances that were successfully deleted.
923+
type: array
924+
items:
925+
type: string
926+
example:
927+
- 5c33c212e0d6444320d9a9f4
928+
failed:
929+
description: The *instanceId*s of the alarm instances that were not deleted.
930+
See *error* for why each instance failed to delete. Reasons include the
931+
instance could not be found or the caller is not authorized to delete the instance.
932+
type: array
933+
items:
934+
type: string
935+
example:
936+
- 5c2cf7e0e0d64403b486fcb4
937+
error:
938+
$ref: '#/definitions/Error'
803939
204:
804-
description: No Content
940+
description: Success - Indicates all requested instances were deleted successfully.
805941
401:
806942
$ref: '#/responses/Unauthorized'
807943
default:

asset-management-rule/niapmrule.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ definitions:
190190
type: string
191191
format: date-time
192192
example: '2018-05-07T18:58:05.219692Z'
193+
workspace:
194+
type: string
195+
description: The ID of the workspace.
196+
example: '5bc5e9092a4fa4c71cfa7197'
193197
RuleStateUpdateModel:
194198
title: Rule State Update Model
195199
description: The collection of rule identifiers and the enable/disable state to apply on them.
@@ -223,6 +227,13 @@ parameters:
223227
required: true
224228
schema:
225229
$ref: '#/definitions/RuleStateUpdateModel'
230+
Workspaces:
231+
in: query
232+
name: workspaces
233+
description: A string representing the collection of workspace IDs separated by comma used to filter the rules.
234+
required: false
235+
type: string
236+
x-example: '5bc5e9092a4fa4c71cfa7197,3a83d3fc174ae3491890f7ae'
226237
responses:
227238
BadRequest:
228239
description: The server was unable to process the request because of invalid syntax.
@@ -296,7 +307,6 @@ paths:
296307
summary: API information
297308
description: Returns information about API versions and available operations.
298309
operationId: RootEndpoint
299-
x-ni-request-all-privileges: true
300310
# Explicitly mark security as an empty array - this route does not require any privileges.
301311
# Marking it this way prevents it from inheriting the top-level security settings.
302312
security: []
@@ -326,7 +336,6 @@ paths:
326336
summary: API version information
327337
description: Returns available operations for a single version of the API.
328338
operationId: RootEndpointWithVersion
329-
x-ni-request-all-privileges: true
330339
security: []
331340
responses:
332341
200:
@@ -344,7 +353,9 @@ paths:
344353
description: Gets a list containing all rules specific to calibration.
345354
operationId: get-calibration-rules
346355
x-ni-operation: getCalibrationRule
347-
x-ni-privilege: assetrule.Read
356+
x-ni-auth: true
357+
parameters:
358+
- $ref: '#/parameters/Workspaces'
348359
responses:
349360
200:
350361
$ref: '#/responses/CalibrationRulesResponse'
@@ -361,7 +372,7 @@ paths:
361372
description: Gets the calibration rule with the specified identifier.
362373
operationId: get-calibration-rule-by-id
363374
x-ni-operation: getCalibrationRule
364-
x-ni-privilege: assetrule.Read
375+
x-ni-auth: true
365376
responses:
366377
200:
367378
$ref: '#/responses/CalibrationRuleResponse'
@@ -379,7 +390,7 @@ paths:
379390
description: Replaces a specific calibration rule with the given one.
380391
operationId: put-calibration-rule
381392
x-ni-operation: updateCalibrationRule
382-
x-ni-privilege: assetrule.Write
393+
x-ni-auth: true
383394
parameters:
384395
- in: body
385396
name: CalibrationRulePutRequestModel
@@ -405,7 +416,7 @@ paths:
405416
description: Sets specific calibration rules state by enabling or disabling them.
406417
operationId: set-calibration-rules-state
407418
x-ni-operation: updateCalibrationRule
408-
x-ni-privilege: assetrule.Write
419+
x-ni-auth: true
409420
parameters:
410421
- $ref: '#/parameters/SetRulesState'
411422
responses:

0 commit comments

Comments
 (0)