diff --git a/alarm/nialarm.yml b/alarm/nialarm.yml index 8acc1b7..8c697c6 100644 --- a/alarm/nialarm.yml +++ b/alarm/nialarm.yml @@ -42,11 +42,33 @@ definitions: type: array items: type: string + resourceType: + description: Type of resource associated with the error. + This field is only present for entries in *innerErrors*. + type: string + enum: [instanceId] + resourceId: + description: Identifier of the resource associated with the error. + This field is only present for entries in *innerErrors*. + type: string + innerErrors: + description: Array of individual errors when a request results in multiple errors. + This field is only present when *name* is 'Skyline.OneOrMoreErrorsOccurred'. + type: array + items: + $ref: '#/definitions/Error' example: - name: AlarmInstance.InstanceNotFound - code: -253006 - message: An instance with instanceId '5c2cf7e0e0d64403b486fcb4' was not found. + name: Skyline.OneOrMoreErrorsOccurred + code: -251041 + message: One or more errors occurred. See the contained list for details of each error. args: [] + innerErrors: + - name: AlarmInstance.InstanceNotFound + code: -253006 + message: An instance with instanceId '5c2cf7e0e0d64403b486fcb4' was not found. + resourceType: instanceId + resourceId: 5c2cf7e0e0d64403b486fcb4 + args: [5c2cf7e0e0d64403b486fcb4] Operation: description: Operation provided by the API type: object @@ -104,6 +126,11 @@ definitions: rule. type: string example: CRIO1.System.Health.DiskSpaceUsePercentage.Bdd9u!4aMd!$pYrf*CnaIZ2tbu$-Ct%? + workspace: + description: The ID of the workspace to which this alarm instance belongs. Added in version 3 of the + readAlarmInstances operation. + type: string + example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841 active: description: Whether or not the alarm instance is active. An active alarm deserves human or automated attention. Alarm instances always begin life with *active*/true. This field will be automatically @@ -410,6 +437,16 @@ definitions: example: - keyword1 - keyword2 + workspaces: + type: array + description: Workspace query. The service will return instances whose *workspace* field is one of + the specified workspaces. By default, only instances in the default workspace are returned. + Specify an array containing a single value of *\** to query all workspaces. Added in version 3 of the + readAlarmInstances operation. + items: + type: string + example: + - '*' QueryRequest: title: Query Request description: Object describing the request body for an alarm instance query request @@ -487,7 +524,6 @@ paths: summary: API information description: Returns information about API versions and available operations. operationId: RootEndpoint - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -516,7 +552,6 @@ paths: summary: API version information description: Returns available operations for a single version of the API. operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -529,12 +564,81 @@ paths: description: Not Found schema: $ref: '#/definitions/Error' - /v1/acknowledge-instances: + /v1/acknowledge-instances-by-instance-id: post: tags: [alarm instances] summary: Acknowledge alarm instances description: Acknowledges one or more alarm instances, optionally forcing them clear and adding notes to - them. + them. Added in version 2 of the writeAlarmInstances operation. + operationId: AcknowledgeInstancesByInstanceId + x-ni-operation: writeAlarmInstances + parameters: + - in: body + name: Request body + required: true + schema: + type: object + title: AcknowledgeByInstanceIdRequestBody + required: + - instanceIds + properties: + instanceIds: + description: The *instanceId*s of the alarm instances which should be acknowledged. + type: array + items: + type: string + example: [5c33c212e0d6444320d9a9f4, 5c2cf7e0e0d64403b486fcb4] + forceClear: + description: Whether or not the affected alarm instances should have their *clear* field set + to true. + type: boolean + default: false + notes: + description: Notes which should be added to the alarm instances. + type: array + items: + $ref: '#/definitions/AlarmNote' + responses: + 200: + description: Success - Indicates the request to acknowledge was processed successfully. + If any instances failed to be acknowledged, the included *error* object will contain + an entry in the *innerErrors* array for each failed instance. + schema: + type: object + title: AcknowledgeByInstanceIdResponse + properties: + acknowledged: + description: The *instanceId*s of the alarm instances which were successfully acknowledged. + type: array + items: + type: string + example: [5c33c212e0d6444320d9a9f4] + failed: + description: The *instanceId*s of the alarm instances which were not acknowledged. + See *error* for why each instance failed to be acknowledged. Reasons include the instance + could not be found, the instance was already acknowledged, or the caller is not authorized + to acknowledge the instance. + type: array + items: + type: string + example: [5c2cf7e0e0d64403b486fcb4] + error: + $ref: '#/definitions/Error' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v1/acknowledge-instances: + post: + tags: [deprecated] + deprecated: true + summary: Acknowledge alarm instances + description: As of version 2 of the writeAlarmInstances operation, this route is deprecated. + Instead, use the POST /v1/acknowledge-instances-by-instance-id route. + + + Acknowledges one or more alarm instances in the default workspace by alarm id, + optionally forcing them clear and adding notes to them. operationId: AcknowledgeInstances x-ni-operation: writeAlarmInstances parameters: @@ -571,23 +675,23 @@ paths: title: AcknowledgeResponse properties: acknowledged: - description: The *alarmIds* which were successfully acknowledged. + description: The *alarmId*s which were successfully acknowledged. type: array items: type: string - example: [5c40ec55e0d6441168b4c543, 5c40ec55e0d6441168b4c543] + example: [System1.Health.DiskSpaceAlarm, System2.Health.DiskSpaceAlarm] alreadyAcknowledged: - description: The *alarmIds* which had already been previously acknowledged. + description: The *alarmId*s which had already been previously acknowledged. type: array items: type: string - example: [5c40ec55e0d6441168b4c541] + example: [System1.Health.DiskSpaceAlarm] notFound: - description: A collection of *alarmIds* for which no active alarm instances were found. + description: A collection of *alarmId*s for which no active alarm instances were found. type: array items: type: string - example: [5c40ec55e0d6441168b4c549] + example: [System2.Health.DiskSpaceAlarm] 401: $ref: '#/responses/Unauthorized' default: @@ -604,7 +708,7 @@ paths: - in: body name: Request body description: Container which holds data for the request. If an alarm instance is being updated, only - alarmId and transition are applied. + alarmId, workspace, and transition are applied. schema: type: object title: CreateOrUpdateInstanceRequest @@ -614,11 +718,17 @@ paths: properties: alarmId: description: A value meant to uniquely identify the particular process or condition tracked - by a given alarm. For example, alarms created by the Tag Rule Engine Service have their - alarmIds set to the concatenation of the path of the tag which caused the rule to be - triggered and the ID of the rule. + by a given alarm within a workspace. For example, alarms created by the Tag Rule Engine + Service have their alarmIds set to the concatenation of the path of the tag which caused + the rule to be triggered and the ID of the rule. type: string example: CRIO1.System.Health.DiskSpaceMeanUsePercentage.Bdd9u!4aMd!$pYrf*CnaIZ2tbu$-Ct%? + workspace: + description: The ID of the workspace in which to create or update the alarm. When not specified, + the default workspace is used based on the requesting user. Added in version 2 of the + writeAlarmInstances operation. + type: string + example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841 transition: $ref: '#/definitions/AlarmTransition' createdBy: @@ -760,7 +870,7 @@ paths: tags: [alarm instances] summary: Query alarm instances description: Queries for alarm instances. Specifying an empty JSON object in the request body will - result in all alarm instances being returned. + result in all alarm instances in the default workspace being returned. operationId: QueryInstances x-ni-operation: readAlarmInstances parameters: @@ -798,10 +908,36 @@ paths: type: string example: - 5c33c212e0d6444320d9a9f4 - - 5c33c212e0d6444320d9a9f5 + - 5c2cf7e0e0d64403b486fcb4 responses: + 200: + description: Partial Success - Indicates the request to delete was processed successfully, + but one or more instances failed to delete. The included *error* object will contain + an entry in the *innerErrors* array for each failed instance. + schema: + type: object + title: DeleteInstancesByInstanceIdPartialSuccess + properties: + deleted: + description: The *instanceId*s of the alarm instances that were successfully deleted. + type: array + items: + type: string + example: + - 5c33c212e0d6444320d9a9f4 + failed: + description: The *instanceId*s of the alarm instances that were not deleted. + See *error* for why each instance failed to delete. Reasons include the + instance could not be found or the caller is not authorized to delete the instance. + type: array + items: + type: string + example: + - 5c2cf7e0e0d64403b486fcb4 + error: + $ref: '#/definitions/Error' 204: - description: No Content + description: Success - Indicates all requested instances were deleted successfully. 401: $ref: '#/responses/Unauthorized' default: diff --git a/asset-management-rule/niapmrule.yml b/asset-management-rule/niapmrule.yml index dfc9245..108aa4c 100644 --- a/asset-management-rule/niapmrule.yml +++ b/asset-management-rule/niapmrule.yml @@ -190,6 +190,10 @@ definitions: type: string format: date-time example: '2018-05-07T18:58:05.219692Z' + workspace: + type: string + description: The ID of the workspace. + example: '5bc5e9092a4fa4c71cfa7197' RuleStateUpdateModel: title: Rule State Update Model description: The collection of rule identifiers and the enable/disable state to apply on them. @@ -223,6 +227,13 @@ parameters: required: true schema: $ref: '#/definitions/RuleStateUpdateModel' + Workspaces: + in: query + name: workspaces + description: A string representing the collection of workspace IDs separated by comma used to filter the rules. + required: false + type: string + x-example: '5bc5e9092a4fa4c71cfa7197,3a83d3fc174ae3491890f7ae' responses: BadRequest: description: The server was unable to process the request because of invalid syntax. @@ -296,7 +307,6 @@ paths: summary: API information description: Returns information about API versions and available operations. operationId: RootEndpoint - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -326,7 +336,6 @@ paths: summary: API version information description: Returns available operations for a single version of the API. operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true security: [] responses: 200: @@ -344,7 +353,9 @@ paths: description: Gets a list containing all rules specific to calibration. operationId: get-calibration-rules x-ni-operation: getCalibrationRule - x-ni-privilege: assetrule.Read + x-ni-auth: true + parameters: + - $ref: '#/parameters/Workspaces' responses: 200: $ref: '#/responses/CalibrationRulesResponse' @@ -361,7 +372,7 @@ paths: description: Gets the calibration rule with the specified identifier. operationId: get-calibration-rule-by-id x-ni-operation: getCalibrationRule - x-ni-privilege: assetrule.Read + x-ni-auth: true responses: 200: $ref: '#/responses/CalibrationRuleResponse' @@ -379,7 +390,7 @@ paths: description: Replaces a specific calibration rule with the given one. operationId: put-calibration-rule x-ni-operation: updateCalibrationRule - x-ni-privilege: assetrule.Write + x-ni-auth: true parameters: - in: body name: CalibrationRulePutRequestModel @@ -405,7 +416,7 @@ paths: description: Sets specific calibration rules state by enabling or disabling them. operationId: set-calibration-rules-state x-ni-operation: updateCalibrationRule - x-ni-privilege: assetrule.Write + x-ni-auth: true parameters: - $ref: '#/parameters/SetRulesState' responses: diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index 5a41f5b..cfb6859 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -8,6 +8,7 @@ info: url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /niapm +x-ni-privilege-application: 'niws.niasset' consumes: - application/json produces: @@ -64,13 +65,12 @@ definitions: One or more errors occurred. See the contained list for details of each error. args: [] - ## TODO: populate with valid error code innerErrors: - - name: AssetPerformanceManagement.AssetNotFound - code: -253401 + - name: AssetPerformanceManagement.NonExistingAssetWithIdentifier + code: -253426 resourceType: AssetEntry resourceId: 29162;01B245D6;4243;0 - message: 'The asset with identifier 29162;01B245D6;4243;0 was not found.' + message: 'No asset found with the specified identifier: 29162;01B245D6;4243;0.' args: [29162;01B245D6;4243;0] Operation: description: An operation provided by the API. @@ -100,8 +100,6 @@ definitions: - writeAssets: Write information related to assets. - deleteAssets: Delete information related to assets. - - - readAssetUtilization: Read information related to asset utilization. type: object properties: readAssets: @@ -110,8 +108,6 @@ definitions: $ref: '#/definitions/Operation' deleteAssets: $ref: '#/definitions/Operation' - readAssetUtilization: - $ref: '#/definitions/Operation' BusType: title: Bus Type description: All supported bus types for an asset. @@ -133,8 +129,17 @@ definitions: - ACCESSORY - CAN - SWITCH_BLOCK_DEVICE - SystemConnectionState: - title: System Connection State + AssetType: + title: Asset Type + description: All supported asset types. + type: string + enum: + - GENERIC + - DEVICE_UNDER_TEST + - FIXTURE + - SYSTEM + SystemConnectionStatus: + title: System Connection Status description: Whether or not the minion is connected to the server and has updated the server with its data. type: string enum: @@ -149,21 +154,22 @@ definitions: title: Asset Presence Status description: The status of an asset's presence in a system. type: string + default: NOT_PRESENT enum: - INITIALIZING - UNKNOWN - NOT_PRESENT - PRESENT CalibrationHistoryModel: + title: Calibration History + description: The calibration history for an asset. allOf: - $ref: '#/definitions/ExternalCalibrationModel' - - title: Calibration History - - description: The calibration history for an asset. - type: object - - required: + required: - id - calibrationType - - properties: + properties: id: description: The calibration entry identifier. type: string @@ -175,6 +181,22 @@ definitions: type: string format: date-time example: '2018-05-07T18:58:05.219692Z' + example: + temperatureSensors: [ + { name: 'Sensor0' , reading: 25.7 } + ] + isLimited: false + date: '2018-05-07T18:58:05.000Z' + recommendedInterval: 12 + nextRecommendedDate: '2019-05-07T18:58:05.000Z' + comments: 'This is a comment.' + entryType: MANUAL + operator: + displayName: John Doe + userId: johnDoe2020 + id: 5c4f0834174ae321b8a95a03 + calibrationType: EXTERNAL_CALIBRATION + timestamp: '2018-05-07T18:58:05.219692Z' CalibrationStatus: title: Calibration Status description: The calibration category the asset belongs to based on the next due calibration date. @@ -197,15 +219,24 @@ definitions: enum: - SELF_CALIBRATION - EXTERNAL_CALIBRATION - AssetStateModel: - title: Asset State - description: The status of an asset and the system to which it is connected. + AssetPresenceModel: + title: Asset Presence Model + description: The presence of an asset. Wraps the AssetPresenceStatus into an object. type: object + required: + - assetPresence properties: - systemConnectionState: - $ref: '#/definitions/SystemConnectionState' assetPresence: $ref: '#/definitions/AssetPresenceStatus' + AssetPresenceWithSystemConnectionModel: + title: Asset Presence With System Connection Model + description: The presence of an asset and the connection of the system in which it resides. + allOf: + - $ref: '#/definitions/AssetPresenceModel' + - type: object + properties: + systemConnection: + $ref: '#/definitions/SystemConnectionStatus' TemperatureSensorModel: title: Temperature Sensor description: The sensor name and temperature reading in Celsius. @@ -222,10 +253,12 @@ definitions: type: number format: double example: 25.8 - AssetLocationModel: - title: Asset Location - description: Information about the asset and the system in which it resides. + BaseAssetLocationModel: + title: Base Asset Location Model + description: Basic information about the asset and the system in which it resides. Base class for other models. type: object + required: + - minionId properties: minionId: description: Identifier of the minion where the asset is located. @@ -243,12 +276,28 @@ definitions: description: The number of the slot in which the asset is located. type: integer example: 2 - systemName: - description: Hostname of the system. - type: string - example: APM-PXI1 - state: - $ref: '#/definitions/AssetStateModel' + AssetLocationWithPresenceModel: + title: Asset Location With Presence Model + description: Information about the asset location and presence. Used in create or update operations. + allOf: + - $ref: '#/definitions/BaseAssetLocationModel' + - type: object + properties: + state: + $ref: '#/definitions/AssetPresenceModel' + AssetLocationModel: + title: Asset Location Model + description: Information about the asset location, presence and the connection status of the system in which it resides. + allOf: + - $ref: '#/definitions/BaseAssetLocationModel' + - type: object + properties: + systemName: + description: Hostname of the system. + type: string + example: APM-PXI1 + state: + $ref: '#/definitions/AssetPresenceWithSystemConnectionModel' ExternalCalibrationOperatorModel: title: External Calibration Operator description: The information about the operator who performed the calibration. @@ -257,9 +306,11 @@ definitions: displayName: description: Display name of logged in user. type: string + example: John Doe userId: description: Identifier of the logged in user. type: string + example: johnDoe2020 SelfCalibrationModel: title: Self-Calibration description: Contains data from the last self-calibration. @@ -317,106 +368,201 @@ definitions: comments: description: Calibration comments provided by an operator. type: string + example: This is a comment. + example: + temperatureSensors: [ + { name: 'Sensor0' , reading: 25.7 } + ] + isLimited: false + date: '2018-05-07T18:58:05.000Z' + recommendedInterval: 12 + nextRecommendedDate: '2019-05-07T18:58:05.000Z' + comments: 'This is a comment.' ExternalCalibrationModel: + title: External Calibration + description: Data from the last external calibration. allOf: - $ref: '#/definitions/ExternalCalibrationBaseModel' - - title: External Calibration - - description: Data from the last external calibration - type: object - - properties: + properties: entryType: $ref: '#/definitions/CalibrationMode' operator: $ref: '#/definitions/ExternalCalibrationOperatorModel' + example: + temperatureSensors: [ + { name: 'Sensor0' , reading: 25.7 } + ] + isLimited: false + date: '2018-05-07T18:58:05.000Z' + recommendedInterval: 12 + nextRecommendedDate: '2019-05-07T18:58:05.000Z' + comments: 'This is a comment.' + entryType: MANUAL + operator: + displayName: John Doe + userId: johnDoe2020 + ExternalCalibrationWithChecksumModel: + title: External Calibration + description: Data from the last external calibration including checksum. + allOf: + - $ref: '#/definitions/ExternalCalibrationModel' + - type: object + properties: + checksum: + description: Checksum for the external calibration. + type: string + example: 7d9f4953655d48a6a5fd68e9dfd41345 + example: + temperatureSensors: [ + { name: 'Sensor0' , reading: 25.7 } + ] + isLimited: false + date: '2018-05-07T18:58:05.000Z' + recommendedInterval: 12 + nextRecommendedDate: '2019-05-07T18:58:05.000Z' + comments: 'This is a comment.' + entryType: MANUAL + operator: + displayName: John Doe + userId: johnDoe2020 + checksum: 7d9f4953655d48a6a5fd68e9dfd41345 + BaseAssetModel: + title: Base Asset Model + description: An object describing basic properties of an asset. Base class for other models. + allOf: + - $ref: '#/definitions/AssetIdentificationModel' + - type: object + properties: + name: + description: Name of the asset. + type: string + example: PCISlot2 + assetType: + $ref: '#/definitions/AssetType' + firmwareVersion: + description: Firmware version of the asset. + type: string + example: A1 + hardwareVersion: + description: Hardware version of the asset. + type: string + example: 12A + visaResourceName: + description: VISA resource name of the asset. + type: string + example : vs-1234 + temperatureSensors: + description: An array of temperature sensor information. + type: array + items: + $ref: '#/definitions/TemperatureSensorModel' + supportsSelfCalibration: + description: Whether the asset supports self-calibration. + type: boolean + example: true + supportsExternalCalibration: + description: Whether the asset supports external calibration. + type: boolean + example: true + selfCalibration: + $ref: '#/definitions/SelfCalibrationModel' + isNIAsset: + description: Whether this asset is an NI asset (true) or a third-party asset (false). + type: boolean + example: true + AssetCreateModel: + title: Asset Create Model + description: >- + An object describing the properties for creating an asset. + + + Unique Asset Identification is required to create an asset. See AssetIdentificationModel for details. + allOf: + - $ref: '#/definitions/BaseAssetModel' + - type: object + required: + - name + - location + properties: + location: + $ref: '#/definitions/AssetLocationWithPresenceModel' + externalCalibration: + $ref: '#/definitions/ExternalCalibrationWithChecksumModel' + AssetUpdateModel: + title: Asset Update Model + description: >- + An object describing the properties for updating an asset. + + + Unique Asset Identification is required to create an asset. If the id property is not specified, a set of properties are required to identify an asset. See AssetIdentificationModel for details. + If the id is specified on the model, the following properties will be ignored: busType, modelName, modelNumber, vendorName, vendorNumber and serialNumber. + allOf: + - $ref: '#/definitions/BaseAssetModel' + - type: object + properties: + id: + description: Unique identifier of the asset. + type: string + example: "123;01BB877A;4244;0" + location: + $ref: '#/definitions/AssetLocationWithPresenceModel' + externalCalibration: + $ref: '#/definitions/ExternalCalibrationWithChecksumModel' AssetModel: title: Asset Model description: An object describing an asset with all of its properties. + allOf: + - $ref: '#/definitions/BaseAssetModel' + - type: object + properties: + id: + description: Unique identifier of the asset. + type: string + example: "29162;01B245D6;4243;0" + location: + $ref: '#/definitions/AssetLocationModel' + calibrationStatus: + $ref: '#/definitions/CalibrationStatus' + isSystemController: + description: Whether this asset represents a System Controller. + type: boolean + example: true + externalCalibration: + $ref: '#/definitions/ExternalCalibrationModel' + workspace: + type: string + description: The ID of the workspace. + example: '5bc5e9092a4fa4c71cfa7197' + properties: + description: Key-value-pair metadata associated with an asset. + type: object + additionalProperties: + type: string + example: + Key1: Value1 + keywords: + description: Words or phrases associated with an asset. + type: array + items: + type: string + example: Keyword1 + lastUpdatedTimestamp: + description: ISO-8601 formatted timestamp specifying the last date that the asset has had a property update. + type: string + format: date-time + example: '2018-05-07T18:58:05.219692Z' + AssetMetadata: + title: Asset Metadata + description: Information about asset metadata type: object - required: - - id - - modelName - - modelNumber - - serialNumber - - vendorName - - vendorNumber - - busType properties: - id: - description: Unique identifier of the asset. - type: string - example: "29162;01B245D6;4243;0" - serialNumber: - description: Serial number of the asset. - type: string - example: "01BB877A" - modelName: - description: Model name of the asset. - type: string - example: "NI PXIe-6368" - modelNumber: - description: Model number of the asset. - type: integer - example : 123 - vendorName: - description: Vendor name of the asset. - type: string - example: National Instruments - vendorNumber: - description: Vendor number of the asset. - type: integer - example: 4244 - name: - description: Name of the asset. - type: string - example: PCISlot2 - firmwareVersion: - description: Firmware version of the asset. - type: string - example: A1 - hardwareVersion: - description: Hardware version of the asset. - type: string - example: 12A - busType: - $ref: '#/definitions/BusType' - visaResourceName: - description: VISA resource name of the asset. - type: string - example : vs-1234 - assetLocation: - $ref: '#/definitions/AssetLocationModel' - temperatureSensors: - description: An array of temperature sensor information. + keywords: + description: Words or phrases associated with an asset. type: array items: - $ref: '#/definitions/TemperatureSensorModel' - supportsSelfCalibration: - description: Whether the asset supports self-calibration. - type: boolean - example: true - supportsExternalCalibration: - description: Whether the asset supports external calibration. - type: boolean - example: true - selfCalibration: - $ref: '#/definitions/SelfCalibrationModel' - externalCalibration: - $ref: '#/definitions/ExternalCalibrationModel' - calibrationStatus: - $ref: '#/definitions/CalibrationStatus' - lastUpdatedTimestamp: - description: ISO-8601 formatted timestamp specifying the last date that the asset has had a property update. - type: string - format: date-time - example: '2018-05-07T18:58:05.219692Z' - isNIAsset: - description: Whether this asset is an NI asset (true) or a third-party asset (false). - type: boolean - example: true - isSystemController: - description: Whether this asset represents a System Controller. - type: boolean - example: true + type: string + example: Keyword1 properties: description: Key-value-pair metadata associated with an asset. type: object @@ -424,12 +570,6 @@ definitions: type: string example: Key1: Value1 - keywords: - description: Words or phrases associated with an asset. - type: array - items: - type: string - example: Keyword1 AssetWithAvailabilityHistoryModel: title: Asset With Availability History description: Information about the availability, or connection, history of an asset, which also contains information about each system in which the asset was present. @@ -452,6 +592,71 @@ definitions: - assetName - assetIdentifier - availabilityHistory + AvailabilityTimeInterval: + title: Availability Time Interval + description: Time interval containing a start and an end date. + type: object + properties: + startDate: + description: >- + A date value which can be used to specify the beginning of a timespan. + + This parameter is required to have the "ISO 8601" format in order to be considered valid. + + The time component of the request is ignored. + type: string + format: date-time + example: '2018-05-01T00:00:00Z' + endDate: + description: >- + A date value which can be used to specify the end of a timespan. + + This parameter is required to have the "ISO 8601" format in order to be considered valid. + + The time component of the request is ignored. + type: string + format: date-time + example: '2018-05-20T00:00:00Z' + required: + - startDate + - endDate + AssetWithAvailabilityInIntervalModel: + title: Asset With Availability In Interval + description: Information about the availability, or connection history, of an asset. This includes the name of each system in which the asset was present during an interval of time you specify. + type: object + properties: + assetName: + description: The asset name for which the availability was computed. + type: string + example: PCI-Slot2 + assetIdentifier: + description: The identifier of the asset for which the availability was computed. + type: string + example: 29162;01B245D6;4243;0 + interval: + $ref: '#/definitions/AvailabilityTimeInterval' + availabilityInSystems: + description: List containing the availability percentage of an asset for each system it was present in during a given time interval. + type: array + items: + $ref: '#/definitions/AssetAvailabilityInSystemModel' + AssetAvailabilityInSystemModel: + title: Asset Availability In System Model + description: Contains the availability percentage and the name of the system an asset was present in during an interval. + type: object + properties: + systemName: + description: Name of the system to which the availability data corresponds. + type: string + example: 'PXI1' + availabilityPercentage: + description: The percentage of time in which the asset was available in the system. + type: number + format: double + example: 7.38958 + required: + - systemName + - availabilityPercentage OverallAvailabilityInSystemModel: title: Overall Availability In System description: Availability information for an asset in a single system for the specified timespan. @@ -498,15 +703,34 @@ definitions: title: Request Destination description: The destination of the request. - "INLINE" (default) returns the list of assets as the body of the response. - "DOWNLOAD" returns the list of assets as the body of the response and indicates to the client that it should be downloaded as a file. - "FILE_SERVICE" sends the list of assets to the file ingestion service and returns the ID of the file to the client in a JSON object. + "INLINE" (default) returns the list of resources as the body of the response. + "DOWNLOAD" returns the list of resources as the body of the response and indicates to the client that it should be downloaded as a file. + "FILE_SERVICE" sends the list of resources to the file ingestion service and returns the ID of the file to the client in a JSON object. type: string default: INLINE enum: - INLINE - DOWNLOAD - FILE_SERVICE + FileIngestionWorkspace: + title: File Ingestion Workspace + description: The ID of the workspace to put the file into, if the destination is "FILE_SERVICE". + type: string + example: '5bc5e9092a4fa4c71cfa7197' + QueryHistoryRequestModel: + title: Query History Request Model + description: Object containing options for querying history. + type: object + properties: + responseFormat: + $ref: '#/definitions/ResponseFormat' + destination: + $ref: '#/definitions/Destination' + fileIngestionWorkspace: + $ref: '#/definitions/FileIngestionWorkspace' + example: + responseFormat: CSV + destination: DOWNLOAD ServicePolicyModel: title: Service policy description: An object containing the service policy. @@ -546,13 +770,112 @@ definitions: - START_TIMESTAMP example: START_TIMESTAMP + AssetIdentificationModel: + title: Asset Identification + description: >- + Object containing properties which identify an asset. + An asset is uniquely identified by a combination of: + - busType + - modelName or modelNumber + - vendorName or vendorNumber + - serialNumber or minionId (part of the Location) + type: object + properties: + modelName: + description: Model name of the asset. + type: string + example: "NI PXIe-6368" + modelNumber: + description: Model number of the asset. + type: integer + example : 123 + serialNumber: + description: Serial number of the asset. + type: string + example: "01BB877A" + vendorName: + description: Vendor name of the asset. + type: string + example: National Instruments + vendorNumber: + description: Vendor number of the asset. + type: integer + example: 4244 + busType: + $ref: '#/definitions/BusType' + UtilizationIdentifiersWithTimestampModel: + title: Utilization Identifiers With Timestamp + description: Object containing a collection of utilization identifiers with a timestamp. + type: object + required: + - utilizationIdentifiers + - utilizationTimestamp + properties: + utilizationIdentifiers: + description: Array representing the unique identifier of an asset utilization history record. + type: array + items: + type: string + example: "2916201B245D642430" + utilizationTimestamp: + description: >- + A date time value which can be used to specify the end of an asset utilization. + + This parameter must have the "ISO 8601" format in order to be considered valid. + type: string + format: date-time + example: '2019-05-01T00:00:00.519Z' + Skip: + description: + The number of resources to skip in the result when paging. + For example, a list of 100 resources with a skip value of 50 will return + entries 51 through 100. + type: integer + default: 0 + example: 0 + x-example: 0 + Take: + description: + How many resources to return in the result, or -1 to use a default + defined by the service. The maximum value for Take is 1000. + For example, a list of 100 resources with a take value of 25 will return + entries 1 through 25. + type: integer + default: -1 + example: -1 + x-example: -1 + maximum: 1000 + UtilizationTimeIntervalModel: + title: Utilization Time Interval + description: Time interval for which to retrieve asset/system utilization. + type: object + properties: + startDate: + description: >- + A date time value which can be used to specify the beginning of a timespan. + + This parameter is required to have the "ISO 8601" format in order to be considered valid. + + The time component of the request is ignored. + type: string + format: date-time + example: '2019-05-01T00:00:00.000Z' + endDate: + description: >- + A date time value which can be used to specify the end of a timespan. + + This parameter is required to have the "ISO 8601" format in order to be considered valid. + + The time component of the request is ignored. + type: string + format: date-time + example: '2019-05-20T00:00:000Z' parameters: TimespanGranularity: in: query name: granularity - description: The possible granularities that can be used to obtain asset availability. + description: The possible granularities that can be used to obtain asset availability. WEEK is used when no granularity is specified. type: string - default: WEEK enum: - NONE - WEEK @@ -565,49 +888,51 @@ parameters: required: true x-example: "29162;01B245D6;4243;0" Skip: - in: path + in: query name: skip description: The number of resources to skip in the result when paging. - For example, a list of 100 asssets with a skip value of 50 will return + For example, a list of 100 resources with a skip value of 50 will return entries 51 through 100. type: integer - required: true + default: 0 x-example: 0 Take: - in: path + in: query name: take description: How many resources to return in the result, or -1 to use a default - defined by the service. - For example, a list of 100 assets with a take value of 25 will return + defined by the service. The maximum value for Take is 1000. + For example, a list of 100 resources with a take value of 25 will return entries 1 through 25. type: integer - required: true - x-example: 0 + default: -1 + x-example: -1 + maximum: 1000 AssetAvailabilityComparison: in: body - name: assetIds + name: compareAvailability description: Request body consisting in a time interval and a list of assets to compute availability history for. schema: + title: Compare Asset Availability type: object required: - assetIds + - startDate + - endDate properties: assetIds: description: Multiple asset identifiers for which to compare availability history. type: array items: type: string - example: ["29162;01B245D6;4243;0"] + example: ["29162;01B245D6;4243;0", "29162;01B245D6;4243;1"] startDate: description: >- A date value which can be used to specify the beginning of a timespan. This parameter is required to have the "ISO 8601" format in order to be considered valid. - If the parameter is not specified, the value will be set to the 1st day of the current month. - The time component of the request is ignored. type: string example: '2018-05-01T00:00:00.519Z' @@ -617,12 +942,32 @@ parameters: This parameter is required to have the "ISO 8601" format in order to be considered valid. - If the parameter is not specified, the value will be set to the current date in UTC. - The time component of the request is ignored. type: string example: '2018-05-20T00:00:00Z' required: true + QueryAssetsAvailabilityRequestBody: + in: body + name: queryAssetsAvailability + description: Request body containing a list of asset identifiers and a list of time intervals. + schema: + title: Query Assets Availability Request Body + type: object + required: + - ids + - intervals + properties: + ids: + description: Multiple asset identifiers for which the availability data is retrieved. + type: array + items: + type: string + example: ["29162;01B245D6;4243;0", "29162;01B245D6;4243;1"] + intervals: + description: Time intervals for which the availability data is retrieved. + type: array + items: + $ref: '#/definitions/AvailabilityTimeInterval' DeleteAssetsRequestBody: in: body name: deleteAssets @@ -638,7 +983,37 @@ parameters: type: array items: type: string - example: [1234;4567;8456] + example: ["29162;01B245D6;4243;0"] + CreateAssetsRequestBody: + in: body + name: createAssets + description: Request body containing an array of assets that should be created. + required: true + schema: + title: Create Assets Request + description: Request body containing an array of assets that should be created. + type: object + properties: + assets: + description: Multiple assets that should be created. + type: array + items: + $ref: '#/definitions/AssetCreateModel' + UpdateAssetsRequestBody: + in: body + name: updateAssets + description: Request body containing an array of assets to update. + required: true + schema: + title: Update Assets Request + description: Request body containing an array of assets to update. + type: object + properties: + assets: + description: Multiple assets that should be updated. + type: array + items: + $ref: '#/definitions/AssetUpdateModel' DeleteCalibrationsRequestBody: in: body name: deleteCalibrationsRequestBody @@ -696,10 +1071,10 @@ parameters: QueryAssetsRequest: in: body name: queryAssets - description: Request body consisting of filters to apply when retrieving assets. + description: Request body consisting of filters to apply when retrieving assets. Currently, the valid combinations of ResponseFormat and Destination are [JSON;INLINE], [CSV;DOWNLOAD], [CSV;FILE_SERVICE]. schema: title: Query Assets Request - description: Object containing filters to apply when retrieving assets. + description: Object containing filters to apply when retrieving assets. If no assets match the filter and the destination is "DOWNLOAD" or "FILE_SERVICE", an empty report will be generated. type: object properties: ids: @@ -707,27 +1082,29 @@ parameters: type: array items: type: string - example: ["29162;01B245D6;4243;0"] + example: [] responseFormat: $ref: '#/definitions/ResponseFormat' destination: $ref: '#/definitions/Destination' + fileIngestionWorkspace: + $ref: '#/definitions/FileIngestionWorkspace' skip: - description: - How many assets to skip in the result when paging. - For example, a list of 100 asssets with a skip value of 50 will return - entries 51 through 100. - type: integer - default: 0 + $ref: '#/definitions/Skip' take: - description: - How many assets to return in the result, or -1 to use a default - defined by the service. - For example, a list of 100 assets with a take value of 25 will return - entries 1 through 25. - type: integer - default: -1 - maximum: 1000 + $ref: '#/definitions/Take' + calibratableOnly: + description: >- + Whether to generate a report with calibrated asset specific columns. + + When the destination is "DOWNLOAD or "FILE_SERVICE" this property is used as follows: + + - It determines the type of the report. When true, the file will be a calibration report. If this is false, the file will be an asset report. + + - If asset ids are in the request, this property will not be used for filtering. If no asset ids are in the request, setting this property to true will generate a report only for the calibrated assets. + + type: boolean + default: false filter: description: >- The filter criteria for assets. Consists of a string of queries composed using AND/OR operators. @@ -764,8 +1141,6 @@ parameters: - AssetIdentifier: String representing the unique identifier of an asset. - - AssetClass: String enumeration representing the class of an asset. Possible values are: UNDEFINED, DISCOVERED, ASSET, DUT, FIXTURE. - - SerialNumber: String representing the serial number of an asset. - ModelName: String representing the model name of an asset. @@ -820,23 +1195,17 @@ parameters: - ExternalCalibration.Operator.DisplayName: String representing the name of the operator which performed an external calibration on a third-party asset. type: string - example: AssetName = "APMPXI1Slot3" and ExternalCalibration.NextRecommendedDate > "2018-05-01T00:00:00.519Z" + example: IsSystemController = true QueryHistoryRequestBody: in: body name: queryHistory description: Request body consisting of options to be used for querying history for an asset. schema: - title: Query History Request Body - description: Object containing options for querying history. - type: object - properties: - responseFormat: - $ref: '#/definitions/ResponseFormat' - destination: - $ref: '#/definitions/Destination' + $ref: '#/definitions/QueryHistoryRequestModel' ServicePolicyUpdateRequestBody: in: body name: servicePolicyUpdateRequest + required: true description: The request to update properties of the current service policy. schema: $ref: '#/definitions/ServicePolicyModel' @@ -887,11 +1256,11 @@ parameters: - MinionId: String representing the identifier of a minion in which an asset might be located in. - - UtilizationCategory: String representing the utilization task category. + - Category: String representing the utilization task category. - - User: : String representing the name of the operator who utilized the asset. + - UserName: : String representing the name of the operator who utilized the asset. type: string - example: UtilizationCategory = "Test" + example: Category = "Test" assetFilter: description: >- The filter criteria for assets. Consists of a string of queries composed using AND/OR operators. @@ -928,8 +1297,6 @@ parameters: - AssetIdentifier: String representing the unique identifier of an asset. - - AssetClass: String enumeration representing the class of an asset. Possible values are: UNDEFINED, DISCOVERED, ASSET, DUT, FIXTURE. - - SerialNumber: String representing the serial number of an asset. - ModelName: String representing the model name of an asset. @@ -967,8 +1334,10 @@ parameters: - SupportsSelfCalibration: Boolean flag specifying whether the asset supports self-calibration. - SelfCalibration.CalibrationDate: ISO-8601 formatted timestamp string specifying the last date the asset was self-calibrated. Example: "2018-05-20T00:00:00Z" - + - SupportsExternalCalibration: Boolean flag specifying whether the asset supports external calibration. + + - CalibrationStatus: String enumeration representing the calibration status of an asset. Possible values are: OK, APPROACHING_RECOMMENDED_DUE_DATE, PAST_RECOMMENDED_DUE_DATE. - ExternalCalibration.CalibrationDate: ISO-8601 formatted timestamp string specifying the last date the asset was externally-calibrated. Example: "2018-05-20T00:00:00Z" @@ -982,30 +1351,160 @@ parameters: - ExternalCalibration.Operator.DisplayName: String representing the name of the operator which performed an external calibration on a third-party asset. type: string - example: AssetName = "APMPXI1Slot3" and ExternalCalibration.NextRecommendedDate > "2018-05-01T00:00:00.519Z" + example: IsNIAsset = true utilizationIntervals: description: Multiple time intervals for which to retrieve asset utilization. type: array items: - title: Utilization Time Interval - type: object - properties: - startDate: - description: >- - A date time value which can be used to specify the beginning of a timespan. + $ref: '#/definitions/UtilizationTimeIntervalModel' + QuerySystemUtilizationRequest: + in: body + name: queryBody + description: Request body consisting of filters for asset utilization, assets, and time intervals. + schema: + title: Query System Utilizations Request + description: Object containing filters for asset utilization, assets, and time intervals. + type: object + required: + - utilizationIntervals + properties: + utilizationFilter: + description: >- + The filter criteria for asset utilization. Consists of a string of queries composed using AND/OR operators. + String values and date strings need to be enclosed in double quotes. + Parenthesis can be used around filters to better define the order of operations. - This parameter is required to have the "ISO 8601" format in order to be considered valid. - type: string - format: date-time - example: '2019-05-01T00:00:00.519Z' - endDate: - description: >- - A date time value which can be used to specify the end of a timespan. + Filter syntax: '[property name][operator][operand] and [property name][operator][operand]' - This parameter is required to have the "ISO 8601" format in order to be considered valid. - type: string - format: date-time - example: '2019-05-20T00:00:00Z' + + Operators: + + - Equals operator '='. Example: 'x = y' + + - Not equal operator '!='. Example: 'x != y' + + - Greater than operator '>'. Example: 'x > y' + + - Greater than or equal operator '>='. Example: 'x >= y' + + - Less than operator '<'. Example: 'x < y' + + - Less than or equal operator '<='. Example: 'x <= y' + + - Logical AND operator 'and'. Example: 'x and y' + + - Logical OR operator 'or'. Example: 'x or y' + + - Contains operator '.Contains()', used to check whether a string contains another string. Example: 'x.Contains(y)' + + - Does not contain operator '!.Contains()', used to check whether a string does not contain another string. Example: '!x.Contains(y)' + + + Valid asset utilization properties that can be used in the filter: + + - MinionId: String representing the identifier of a minion in which an asset might be located in. + + - Category: String representing the utilization task category. + + - UserName: : String representing the name of the operator who utilized the asset. + type: string + example: Category = "Test" + assetFilter: + description: >- + The filter criteria for assets. Consists of a string of queries composed using AND/OR operators. + String values and date strings need to be enclosed in double quotes. + Parenthesis can be used around filters to better define the order of operations. + + Filter syntax: '[property name][operator][operand] and [property name][operator][operand]' + + + Operators: + + - Equals operator '='. Example: 'x = y' + + - Not equal operator '!='. Example: 'x != y' + + - Greater than operator '>'. Example: 'x > y' + + - Greater than or equal operator '>='. Example: 'x >= y' + + - Less than operator '<'. Example: 'x < y' + + - Less than or equal operator '<='. Example: 'x <= y' + + - Logical AND operator 'and'. Example: 'x and y' + + - Logical OR operator 'or'. Example: 'x or y' + + - Contains operator '.Contains()', used to check whether a string contains another string. Example: 'x.Contains(y)' + + - Does not contain operator '!.Contains()', used to check whether a string does not contain another string. Example: '!x.Contains(y)' + + + Valid asset properties that can be used in the filter: + + - AssetIdentifier: String representing the unique identifier of an asset. + + - SerialNumber: String representing the serial number of an asset. + + - ModelName: String representing the model name of an asset. + + - ModelNumber: Unsigned integer representing the model number of an asset. + + - VendorName: String representing the vendor name of an asset. + + - VendorNumber: Unsigned integer representing the vendor number of an asset. + + - AssetName: String representing the asset name. + + - FirmwareVersion: String representing the firmware version of an asset. + + - HardwareVersion: String representing the hardware version of an asset. + + - BusType: String enumeration representing the bus type of an asset. Possible values are: BUILT_IN_SYSTEM, PCI_PXI, USB, GPIB, VXI, SERIAL, TCP_IP, CRIO, SCXI, CDAQ, SWITCH_BLOCK, SCC, FIRE_WIRE, ACCESSORY, CAN, SWITCH_BLOCK_DEVICE. + + - IsNIAsset: Boolean flag specifying whether the asset is an NI asset or a third-party asset. + + - Keywords: Collection of string values representing asset metadata keywords. Example: 'Keywords=["keyword1", "keyword2"]'. + + - Properties: Collection of key-value pairs, each key-value pair representing an asset metadata property. Example: 'Properties=["key1":"value1", "key2":"value2"]'. + + - Location.MinionId: String representing the identifier of the minion in which the asset is located in. + + - Location.SystemName: String representing the name of the system that the asset is located in. + + - Location.SlotNumber: Unsigned integer representing the slot number the asset is located in. + + - Location.AssetState.SystemConnection: String enumeration representing the connection state of the system the asset is currently located in. Possible values are: APPROVED, DISCONNECTED, CONNECTED_UPDATE_PENDING, CONNECTED_UPDATE_SUCCESSFUL, CONNECTED_UPDATE_FAILED, UNSUPPORTED, ACTIVATED. + + - Location.AssetState.AssetPresence: String enumeration representing the present status of an asset in a system. Possible values are: INITIALIZING, UNKNOWN, NOT_PRESENT, PRESENT. + + - SupportsSelfCalibration: Boolean flag specifying whether the asset supports self-calibration. + + - SelfCalibration.CalibrationDate: ISO-8601 formatted timestamp string specifying the last date the asset was self-calibrated. Example: "2018-05-20T00:00:00Z" + + - SupportsExternalCalibration: Boolean flag specifying whether the asset supports external calibration. + + - CalibrationStatus: String enumeration representing the calibration status of an asset. Possible values are: OK, APPROACHING_RECOMMENDED_DUE_DATE, PAST_RECOMMENDED_DUE_DATE. + + - ExternalCalibration.CalibrationDate: ISO-8601 formatted timestamp string specifying the last date the asset was externally-calibrated. Example: "2018-05-20T00:00:00Z" + + - ExternalCalibration.NextRecommendedDate: ISO-8601 formatted timestamp string specifying the recommended date for the next external calibration. Example: "2018-05-20T00:00:00Z" + + - ExternalCalibration.RecommendedInterval: Integer representing the manufacturer-recommended calibration interval, in months. + + - ExternalCalibration.Comments: String representing any external calibration comments. + + - ExternalCalibration.IsLimited: Boolean flag specifying whether the last external calibration was a limited calibration. + + - ExternalCalibration.Operator.DisplayName: String representing the name of the operator which performed an external calibration on a third-party asset. + type: string + example: IsNIAsset = true + utilizationIntervals: + description: Multiple time intervals for which to retrieve system utilization. + type: array + items: + $ref: '#/definitions/UtilizationTimeIntervalModel' QueryAssetUtilizationHistoryRequest: in: body name: queryBody @@ -1109,8 +1608,6 @@ parameters: - AssetIdentifier: String representing the unique identifier of an asset. - - AssetClass: String enumeration representing the class of an asset. Possible values are: UNDEFINED, DISCOVERED, ASSET, DUT, FIXTURE. - - SerialNumber: String representing the serial number of an asset. - ModelName: String representing the model name of an asset. @@ -1150,6 +1647,8 @@ parameters: - SelfCalibration.CalibrationDate: ISO-8601 formatted timestamp string specifying the last date the asset was self-calibrated. Example: "2018-05-20T00:00:00Z" - SupportsExternalCalibration: Boolean flag specifying whether the asset supports external calibration. + + - CalibrationStatus: String enumeration representing the calibration status of an asset. Possible values are: OK, APPROACHING_RECOMMENDED_DUE_DATE, PAST_RECOMMENDED_DUE_DATE. - ExternalCalibration.CalibrationDate: ISO-8601 formatted timestamp string specifying the last date the asset was externally-calibrated. Example: "2018-05-20T00:00:00Z" @@ -1162,9 +1661,8 @@ parameters: - ExternalCalibration.IsLimited: Boolean flag specifying whether the last external calibration was a limited calibration. - ExternalCalibration.Operator.DisplayName: String representing the name of the operator which performed an external calibration on a third-party asset. - type: string - example: AssetName = "APMPXI1Slot3" and ExternalCalibration.NextRecommendedDate > "2018-05-01T00:00:00.519Z" + example: IsSystemController = true continuationToken: description: >- A token which allows the user to resume a query at the next item in @@ -1188,6 +1686,66 @@ parameters: type: boolean default: false example: false + StartUtilizationRequest: + in: body + name: utilizationBody + description: Request body specifying utilization start information for multiple assets. + schema: + title: Start Utilization Request + description: Object containing utilization unique identifier, the asset identifiers of the utilized assets and the details of the utilization type, such as category, task name and utilization start timestamp. + type: object + required: + - utilizationIdentifier + - minionId + - assetIdentifications + - utilizationCategory + - utilizationTimestamp + properties: + utilizationIdentifier: + description: String representing the unique identifier of an asset utilization history record. + type: string + example: "2916201B245D642430" + minionId: + description: Identifier of the minion where the utilized assets are located. + type: string + example: NI_PXIe-8135_Embedded_Controller--MAC-00-80-2F-23-52-65 + assetIdentifications: + description: Array of the identification information for the assets which are utilized. + type: array + items: + $ref: '#/definitions/AssetIdentificationModel' + utilizationCategory: + description: String representing the utilization category. + type: string + example: Test + taskName: + description: String representing the name of the task. + type: string + example: DUTTestingRoutine + userName: + description: String representing the name of the operator who utilized the asset. + type: string + example: johnDoe + utilizationTimestamp: + description: >- + A date time value which can be used to specify the start of an utilization. + + This parameter must have the "ISO 8601" format in order to be considered valid. + type: string + format: date-time + example: '2019-05-01T00:00:00.519Z' + EndUtilizationRequest: + in: body + name: utilizationBody + description: Request body consisting of data specifying the utilization end event for an asset. + schema: + $ref: '#/definitions/UtilizationIdentifiersWithTimestampModel' + HeartbeatUtilizationRequest: + in: body + name: utilizationBody + description: Request body consisting of data specifying the utilization heartbeat event for multiple ongoing utilizations. + schema: + $ref: '#/definitions/UtilizationIdentifiersWithTimestampModel' responses: Error: description: Error @@ -1216,15 +1774,14 @@ responses: properties: error: $ref: '#/definitions/Error' - PartialSuccess: - description: Partial Success is returned in the case when only a part of the request body information was processed successfully. - schema: - title: Partial Success Response - description: Partial success response containing error information. - type: object - properties: + example: error: - $ref: '#/definitions/Error' + name: AssetPerformanceManagement.NonExistingAssetWithIdentifier + code: -253426 + message: >- + No asset found with the specified identifier: 29162;01B245D6;4243;0. + args: [29162;01B245D6;4243;0] + innerErrors: [] Unauthorized: description: Not authorized headers: @@ -1257,12 +1814,12 @@ responses: AssetSummaryResponse: description: Asset summary response containing the count of active assets, inactive assets and the total number of assets. schema: - title: Asset Summary - description: Asset summary response containing the total number of assets, the number of assets which are active (present in a connected system) and the number of assets which are not active. + title: Asset Summary Response + description: Asset summary response containing the total number of assets, the number of assets which are active, i.e. present in a connected system, and the number of assets which are not active. type: object properties: active: - description: Number of assets which are active (present in a connected system). + description: Number of assets which are active, i.e. present in a connected system. type: integer example: 12 notActive: @@ -1273,6 +1830,29 @@ responses: description: Total number of managed assets. type: integer example: 17 + DeleteAssetsResponse: + description: Delete Assets Response containing the ids of the assets which were deleted, the ids of the assets which failed to be deleted and any errors encountered. + schema: + title: Delete Assets Response + description: Delete Assets Response containing the ids of the assets which were deleted, the ids of the assets which failed to be deleted and any errors encountered. + type: object + required: + - ids + properties: + ids: + description: Array of asset identifiers which were deleted + type: array + items: + type: string + example: "29162;01B245D6;4243;0" + failed: + description: Array of asset identifiers that failed to delete + type: array + items: + type: string + example: "13562;01B245D6;4243;0" + error: + $ref: '#/definitions/Error' AvailabilityInSystemResponse: description: >- Returns asset availability information in the specified timespan split based on the specified timespan granularity. @@ -1282,6 +1862,7 @@ responses: description: The response contains a collection of systems that an asset has been present during the timespan, along with the percentage of time the asset was present in the system in each timespan. type: array items: + title: Availability in System Model type: object properties: systemName: @@ -1296,7 +1877,7 @@ responses: CalibratedAssetSummaryResponse: description: Response containing summary of assets supporting calibration. Contains the count of assets approaching recommended calibration due date, assets past recommended calibration due date and count of assets supporting (any type of) calibration. schema: - title: Calibrated Asset Summary + title: Calibrated Asset Summary Response description: Asset summary of the total number of assets supporting calibration, the number of assets approaching recommended calibration date and the number of assets past their recommended calibration date. type: object properties: @@ -1331,6 +1912,48 @@ responses: description: The total number of calibration history entries for the requested asset. type: integer example: 1 + DeleteCalibrationsPartialSuccessResponse: + description: Delete Calibrations Partial Success Response + schema: + description: Delete Calibrations Partial Success Response + title: DeleteCalibrationsPartialSuccessResponse + type: object + required: + - calibrationIds + properties: + calibrationIds: + description: Array of calibration entry identifiers that were deleted + type: array + items: + type: string + example: "5c4f0834174ae321b8a95a03" + failed: + description: Array of calibration entry identifiers that failed to delete + type: array + items: + type: string + example: "5c4f0834174ae321b8a95a03" + error: + $ref: '#/definitions/Error' + CreateAssetsPartialSuccessResponse: + description: Create Assets Partial Success Response + schema: + title: CreateAssetsPartialSuccessResponse + description: Create Assets Partial Success Response + type: object + properties: + assets: + description: Array of created assets + type: array + items: + $ref: '#/definitions/AssetModel' + failed: + description: Array of assets create requests that failed + type: array + items: + $ref: '#/definitions/AssetCreateModel' + error: + $ref: '#/definitions/Error' SendToFileIngestionOrDownloadResponse: description: Response for the query operation that consists either in the file information for when the result was sent to the file ingestion service or the report file content for download. In the latter case, the name of the file is provided in the header of the resonse with key='Filename'. schema: @@ -1348,6 +1971,63 @@ responses: description: Service policy response containing the service calibration policy with the number of days for an asset to be considered as approaching calibration. schema: $ref: '#/definitions/ServicePolicyModel' + UpdateAssetsPartialSuccessResponse: + description: Update Assets Partial Success Response + schema: + title: UpdateAssetsPartialSuccessResponse + description: Update Assets Partial Success Response + type: object + properties: + assets: + description: Array of updated assets + type: array + items: + $ref: '#/definitions/AssetModel' + failed: + description: Array of assets update requests that failed + type: array + items: + $ref: '#/definitions/AssetUpdateModel' + error: + $ref: '#/definitions/Error' + UpdateAssetMetadataPartialSuccessResponse: + description: Update Asset Metadata Partial Success Response + schema: + description: Update Asset Metadata Partial Success Response + title: UpdateAssetMetadataPartialSuccessResponse + type: object + required: + - succeeded + properties: + succeeded: + $ref: '#/definitions/AssetMetadata' + failed: + $ref: '#/definitions/AssetMetadata' + error: + $ref: '#/definitions/Error' + example: + succeeded: + keywords: [ Keyword1 ] + properties: + Key1: Value1 + failed: + keywords: [ BadKeyword1 ] + properties: + BadKey1: BadValue1 + error: + name: Skyline.OneOrMoreErrorsOccurred + code: -251040 + message: >- + One or more errors occurred. See the contained list for details of each + error. + args: [] + innerErrors: + - name: AssetPerformanceManagement.InvalidKeywordInUpdateMetadataRequest + code: -253435 + resourceType: Asset + resourceId: BadKeyword1 + message: 'Invalid keyword value: BadKeyword1.' + args: [BadKeyword1] UtilizationWithPercentageResponse: description: Utilization response containing the collection of utilizations matching the provided filters, in a specific time interval. Besides a time interval, each element contains an asset identifier, a minion id, an utilization category, and a percentage of time that the asset was utilized in the time interval. schema: @@ -1355,13 +2035,12 @@ responses: description: Response for the utilization query containing the collection of utilizations. Besides a time interval, each element contains an asset identifier, a minion id, an utilization category, and a percentage of time that the asset was utilized in the time interval. type: array items: + title: Utilization with Percentage Model type: object required: - startTimestamp - endTimestamp - assetIdentifier - - minionId - - category - percentage properties: startTimestamp: @@ -1384,6 +2063,10 @@ responses: description: String representing the unique identifier of an asset. type: string example: "29162;01B245D6;4243;0" + assetName: + description: String representing the name of an asset. + type: string + example: PCISlot2 minionId: description: Identifier of the minion where the asset is located. type: string @@ -1397,6 +2080,54 @@ responses: type: number format: double example: 7.38958 + SystemUtilizationWithPercentageResponse: + description: Utilization response containing the collection of utilizations matching the provided filters, in a specific time interval. Besides a time interval, each element contains an asset identifier, a minion id, an utilization category, and a percentage of time that the system was utilized in the time interval. + schema: + title: System Utilization with Percentage Response + description: Response for the utilization query containing the collection of utilizations. Besides a time interval, each element contains an asset identifier, a minion id, an utilization category, and a percentage of time that the system was utilized in the time interval. + type: array + items: + title: System Utilization with Percentage Model + type: object + required: + - startTimestamp + - endTimestamp + - minionId + - percentage + properties: + startTimestamp: + description: >- + A date time value representing the beginning of a system utilization interval. + + This parameter has the "ISO 8601" format in order to be considered valid. + type: string + format: date-time + example: '2019-05-01T00:00:00.519Z' + endTimestamp: + description: >- + A date time value representing the end of a system utilization interval. + + This parameter has the "ISO 8601" format in order to be considered valid. + type: string + format: date-time + example: '2019-05-20T00:00:00Z' + minionId: + description: String representing the unique identifier of a system. + type: string + example: NI_PXIe-8135_Embedded_Controller--MAC-00-80-2F-23-52-65 + systemName: + description: String representing the alias of a system. + type: string + example: PXIe Alias + category: + description: String representing the utilization task category. + type: string + example: Test + percentage: + description: Percentage of time that the system was utilized in the specified time interval. + type: number + format: double + example: 7.38958 QueryUtilizationHistoryResponse: description: Asset Utilization History response containing the collection of utilizations records matching the provided filters. schema: @@ -1416,8 +2147,6 @@ responses: - assetIdentifier - minionId - category - - taskName - - userName - startTimestamp properties: utilizationIdentifier: @@ -1477,6 +2206,50 @@ responses: type: string example: token + UpdateUtilizationPartialSuccessResponse: + description: Update utilization partial success response. The update operation can be either a heartbeat update or a utilization end. + schema: + description: Update utilization partial success response. + title: UpdateUtilizationPartialSuccessResponse + type: object + required: + - updatedUtilizationIds + properties: + updatedUtilizationIds: + description: Array of utilization identifiers for the entries that were updated. + type: array + items: + type: string + example: "5c4f0834174ae321b8a95a03" + failed: + description: Array of utilization identifiers for the entries that failed to update. + type: array + items: + type: string + example: "5c4f0834174ae321b8a95a04" + error: + $ref: '#/definitions/Error' + StartUtilizationPartialSuccessResponse: + description: Start utilization partial success response. + schema: + description: Start utilization partial success response. + title: StartUtilizationPartialSuccessResponse + type: object + required: + - assetsWithStartedUtilization + properties: + assetsWithStartedUtilization: + description: Array containing the asset identification data for the assets that started being utilized. + type: array + items: + $ref: '#/definitions/AssetIdentificationModel' + failed: + description: Array containing the asset identification data for the assets that failed to start being utilized. + type: array + items: + $ref: '#/definitions/AssetIdentificationModel' + error: + $ref: '#/definitions/Error' paths: /: get: @@ -1484,7 +2257,6 @@ paths: summary: API information description: Returns information about API versions and available operations. operationId: RootEndpoint - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -1509,7 +2281,6 @@ paths: summary: API version information description: Returns available operations for a single version of the API. operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true security: [] responses: 200: @@ -1522,39 +2293,24 @@ paths: get: tags: [assets] summary: Gets assets - description: Gets a list of assets. Calibrated assets can be obtained by setting calibratableOnly=true. To obtain a report of the assets, reponseFormat=csv&destination=download should be sent as query parameters. + description: >- + Gets a list of assets. Calibrated assets can be obtained by setting calibratableOnly=true. To obtain a report of the assets, reponseFormat=csv&destination=download should be sent as query parameters. + + + Currently, the valid combinations of ResponseFormat and Destination are [JSON;INLINE], [CSV;DOWNLOAD], [CSV;FILE_SERVICE]. operationId: get-assets - x-ni-operation: readAssets - x-ni-privilege: Read + x-ni-auth: true parameters: - - in: query - name: skip - description: - How many files to skip in the result when paging. - For example, a list of 100 asssets with a skip value of 50 and a take - value of 25 will return entries 51 through 75. - type: integer - default: 0 - - in: query - name: take - description: - How many assets to return in the result, or -1 to use a default - defined by the service. - For example, a list of 100 assets with a skip value of 50 and a take - value of 25 will return entries 51 through 75. - type: integer - default: -1 - maximum: 1000 + - $ref: '#/parameters/Skip' + - $ref: '#/parameters/Take' - in: query name: calibratableOnly description: Whether to filter only assets which support calibration. type: boolean - default: false - in: query name: responseFormat description: The return type. Valid options are "JSON" and "CSV". type: string - default: JSON enum: - JSON - CSV @@ -1566,11 +2322,15 @@ paths: "DOWNLOAD" returns the list of assets as the body of the response and indicates to the client that it should be downloaded as a file. "FILE_SERVICE" sends the list of assets to the file ingestion service and returns the ID of the file to the client in a JSON object. type: string - default: INLINE enum: - INLINE - DOWNLOAD - FILE_SERVICE + - in: query + name: fileIngestionWorkspace + description: The ID of the workspace to put the file into, if the destination is "FILE_SERVICE". + type: string + x-example: '5bc5e9092a4fa4c71cfa7197' responses: 200: $ref: '#/responses/AssetsResponse' @@ -1578,14 +2338,87 @@ paths: $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' + post: + tags: [assets] + summary: Creates assets + description: >- + Creates new assets with the provided information. + + + If an asset with the provided identification does not exist on the server, a new asset is created. If an asset with the provided identification already exists on the server, no create or update operation will be performed for the respective identification and the final response will contain an error message describing the actual reason. + + + If the selfCalibration property is set, the supportsSelfCalibration property is automatically set to true by the service no matter if it is specified as false. The same is true for the externalCalibration and supportsExternalCalibration properties. + operationId: create-assets + x-ni-auth: true + parameters: + - $ref: '#/parameters/CreateAssetsRequestBody' + responses: + 200: + $ref: '#/responses/CreateAssetsPartialSuccessResponse' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v1/update-assets: + post: + tags: [assets] + summary: Updates multiple assets + description: >- + Updates multiple assets. To identify the assets that need to be updated, the following properties must be provided: + + - id + + OR + + - asset identification properties. See AssetIdentificationModel for details. + + If an asset with the provided identification does not exist, that asset is not created and an error is returned instead. + Any property that is not set or set to null is ignored. + + The properties that cannot be updated are: + + - busType + + - modelName + + - modelNumber + + - vendorName + + - vendorNumber + + - serialNumber + + - id + + + If the selfCalibration property is set, the supportsSelfCalibration property is automatically set to true by the service, no matter if it is specified as false. The same is true for the externalCalibration and supportsExternalCalibration properties. + + + Updating the assetPresence property to NOT_PRESENT succeeds only if it is updated with the same minionId, parent and slotNumber. Updating it to PRESENT always succeeds. + operationId: update-assets + x-ni-auth: true + parameters: + - $ref: '#/parameters/UpdateAssetsRequestBody' + responses: + 200: + $ref: '#/responses/UpdateAssetsPartialSuccessResponse' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' /v1/asset-summary: get: tags: [assets] summary: Gets a summary of assets - description: Gets asset summary response containing the total number of assets, the number of assets which are active (present in a connected system) and the number of assets which are not active. + description: Gets asset summary response containing the total number of assets, the number of assets which are active, i.e. present in a connected system, and the number of assets which are not active. operationId: get-asset-summary - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true responses: 200: $ref: '#/responses/AssetSummaryResponse' @@ -1599,8 +2432,7 @@ paths: summary: Gets a summary of assets supporting calibration description: Gets asset summary of the total number of assets supporting calibration, the number of assets approaching calibration date and the number of assets past their calibration date operationId: get-calibratable-asset-summary - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true responses: 200: $ref: '#/responses/CalibratedAssetSummaryResponse' @@ -1612,10 +2444,9 @@ paths: post: tags: [assets] summary: Query assets - description: Returns the assets satisfying the provided filtering criteria. If the the caller requests a JSON inline response, the returned assets are filtered based on the filter string and the ids property is not taken into consideration. When the caller requests a CSV response, the filter is not taken into consideration, but the ids property can used to filter the assets from the response. + description: Returns the assets satisfying the provided filtering criteria. If the the caller requests a JSON inline response, the returned assets are filtered based on the filter string and the ids and calibratableOnly properties are not taken into consideration. When the caller requests a CSV response, the filter is not taken into consideration, but the ids and calibratableOnly properties are used to filter the assets from the response. operationId: query-assets - x-ni-operation: readAssets - x-ni-privilege: Read + x-ni-auth: true parameters: - $ref: '#/parameters/QueryAssetsRequest' responses: @@ -1625,8 +2456,6 @@ paths: $ref: '#/responses/BadRequest' 401: $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' /v1/assets/{assetId}: @@ -1635,15 +2464,12 @@ paths: summary: Gets asset with identifier description: Gets the asset which has the given identifier. operationId: get-asset-with-identifier - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true parameters: - $ref: '#/parameters/AssetId' responses: 200: $ref: '#/responses/AssetDetailsResponse' - 400: - $ref: '#/responses/BadRequest' 401: $ref: '#/responses/Unauthorized' 404: @@ -1656,31 +2482,28 @@ paths: summary: Retrieves asset availability history description: Returns availability information for an asset in the specified timespan and split based on the specified time granularity. operationId: get-asset-availability-history - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true parameters: - $ref: '#/parameters/AssetId' - in: query name: startDate + required: true description: >- A date value which can be used to specify the beginning of a timespan. This parameter is required to have the "ISO 8601" format in order to be considered valid. - If the parameter is not specified, the value will be set to the 1st day of the current month. - The time component of the request is ignored. type: string - x-example: '2018-05-01T00:00:00.519Z' + x-example: '2018-05-01T00:00:00.000Z' - in: query name: endDate + required: true description: >- A date value which can be used to specify the end of a timespan. This parameter is required to have the "ISO 8601" format in order to be considered valid. - If the parameter is not specified, the value will be set to the current date in UTC. - The time component of the request is ignored. type: string x-example: '2018-05-20T00:00:00Z' @@ -1702,8 +2525,7 @@ paths: summary: Retrieves asset calibration history description: Returns the calibration history of the asset which has the given identifier. operationId: get-asset-calibration-history - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true parameters: - $ref: '#/parameters/AssetId' - $ref: '#/parameters/Skip' @@ -1724,8 +2546,8 @@ paths: summary: Creates a new calibration history entry for an asset description: Creates a new calibration history entry for a third-party asset. operationId: post-asset-calibration-history - x-ni-operation: writeAssets - x-ni-priviledge: Write + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER, USER_NAME] parameters: - $ref: '#/parameters/AssetId' - $ref: '#/parameters/ExternalCalibrationRequestBody' @@ -1746,14 +2568,13 @@ paths: summary: Deletes calibration history entries description: Deletes multiple calibration history entries for an asset. operationId: post-delete-asset-calibration-history - x-ni-operation: deleteAssets - x-ni-priviledge: Write + x-ni-auth: true parameters: - $ref: '#/parameters/AssetId' - $ref: '#/parameters/DeleteCalibrationsRequestBody' responses: 200: - $ref: '#/responses/PartialSuccess' + $ref: '#/responses/DeleteCalibrationsPartialSuccessResponse' 204: description: No Content 400: @@ -1768,10 +2589,9 @@ paths: post: tags: [assets] summary: Queries asset calibration history - description: Computes the calibration history of an asset in CSV format. If the destination is download, the response will contain the calibration history file content. If the destination is file ingestion, the CSV file is sent to the file storing service and an object containing the file identifier is returned. Any other format and destination combinations are not supported yet. + description: Computes the calibration history of an asset in CSV format. If the destination is download, the response will contain the calibration history file content. If the destination is file ingestion service, the CSV file is sent to the file storing service and an object containing the file identifier is returned. Any other format and destination combinations are not supported yet. operationId: post-asset-query-calibration-history - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true parameters: - $ref: '#/parameters/AssetId' - $ref: '#/parameters/QueryHistoryRequestBody' @@ -1792,10 +2612,9 @@ paths: post: tags: [assets] summary: Queries asset location history - description: Computes the location history of an asset in CSV format. If the destination is download, the response will contain the location history file content. If the destination is file ingestion, the CSV file is sent to the file storing service and an object containing the file identifier is returned. Any other format and destination combinations are not supported yet. + description: Computes the location history of an asset in CSV format. If the destination is download, the response will contain the location history file content. If the destination is file ingestion service, the CSV file is sent to the file storing service and an object containing the file identifier is returned. Any other format and destination combinations are not supported yet. operationId: post-asset-query-location-history - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true parameters: - $ref: '#/parameters/AssetId' - $ref: '#/parameters/QueryHistoryRequestBody' @@ -1818,8 +2637,7 @@ paths: summary: Updates asset metadata description: Performs a request to update the metadata information of an asset. operationId: update-asset-metadata - x-ni-operation: writeAssets - x-ni-priviledge: Write + x-ni-auth: true consumes: - application/merge-patch+json parameters: @@ -1827,7 +2645,7 @@ paths: - $ref: '#/parameters/UpdateMetadata' responses: 200: - $ref: '#/responses/PartialSuccess' + $ref: '#/responses/UpdateAssetMetadataPartialSuccessResponse' 204: description: No Content 400: @@ -1838,36 +2656,136 @@ paths: $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' + /v1/assets/start-utilization: + post: + tags: [utilization] + summary: Stores assets utilization start + description: >- + Stores information related to assets utilization start. The operation is succesful when utilization information can be stored for all asset identifiers provided in the request. + It will return a partial success when storing the utilization start information failed for one or more assets. + operationId: start-multiple-asset-utilization + x-ni-auth: true + parameters: + - $ref: '#/parameters/StartUtilizationRequest' + responses: + 200: + $ref: '#/responses/StartUtilizationPartialSuccessResponse' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v1/assets/end-utilization: + post: + tags: [utilization] + summary: Stores assets utilization end + description: >- + Stores information related to assets utilization end. The operation is succesful and will return No Content when end utilization information can be stored for all utilization identifiers provided in the request. + It will return a partial success when end utilization information can be stored for only a subset of the utilization identifiers provided in the request. + It will return a not found response when no stored utilizations matched the provided utilization identifiers. + operationId: end-multiple-asset-utilization + x-ni-auth: true + parameters: + - $ref: '#/parameters/EndUtilizationRequest' + responses: + 200: + $ref: '#/responses/UpdateUtilizationPartialSuccessResponse' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v1/assets/utilization-heartbeat: + post: + tags: [utilization] + summary: Stores asset utilization heartbeats + description: >- + Stores information related to ongoing asset utilizations. The operation is succesful and will return No Content when utilization heartbeat information can be stored for all utilization identifiers provided in the request. + It will return a partial success when utilization heartbeat information can be stored for only a subset of the utilization identifiers provided in the request. + It will return a not found response when no stored utilizations matched the provided utilization identifiers. + operationId: asset-utilization-multiple-heartbeats + x-ni-auth: true + parameters: + - $ref: '#/parameters/HeartbeatUtilizationRequest' + responses: + 200: + $ref: '#/responses/UpdateUtilizationPartialSuccessResponse' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' /v1/compare-assets-availability: post: tags: [assets] summary: Gets availability history for multiple assets. description: Gets availability history for multiple assets based on a specified timespan. operationId: compare-asset-availability - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true parameters: - $ref: '#/parameters/AssetAvailabilityComparison' responses: 200: description: Asset availability comparison response containing availability history for requested assets based on the requested timespan. schema: - title: Asset Comparison Response - description: Asset comparison response containing availability history for the requested assets. If availability history could not be resolved for some assets, the response contains error information on the assets which could not be resolved. + title: Asset Availability Comparison Response + description: Asset availability comparison response containing availability history for the requested assets. If availability history could not be resolved for some assets, the response contains error information on the assets which could not be resolved. type: object properties: availabilityComparisons: type: array items: $ref: '#/definitions/AssetWithAvailabilityHistoryModel' + failed: + description: Array of asset identifiers for which obtaining availability failed + type: array + items: + type: string + example: [ "13562;01B245D6;4243;0" ] + error: + $ref: '#/definitions/Error' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v1/assets/history/query-assets-availability: + post: + tags: [assets] + summary: Gets availability history for multiple assets. + description: Gets availability history for multiple assets based on the specified timespans. + operationId: query-assets-availability + x-ni-auth: true + parameters: + - $ref: '#/parameters/QueryAssetsAvailabilityRequestBody' + responses: + 200: + description: Query assets availability response containing information about the availability of the assets specified by their ids during the given time intervals. + schema: + title: Query Assets Availability Response + description: Query assets availability response containing availability history for the requested assets. If availability history could not be resolved for some assets, the response contains error information on the assets which could not be resolved. + type: object + properties: + availabilityData: + type: array + items: + $ref: '#/definitions/AssetWithAvailabilityInIntervalModel' + failed: + description: Array of asset identifiers for which obtaining availability failed. + type: array + items: + type: string + example: [ "13562;01B245D6;4243;0" ] error: $ref: '#/definitions/Error' 400: $ref: '#/responses/BadRequest' 401: $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' /v1/delete-assets: @@ -1876,19 +2794,16 @@ paths: summary: Deletes assets and all information associated with assets. description: Deletes all persisted data for the assets with the provided identifiers. This includes asset properties and all related historical information. operationId: delete-assets - x-ni-operation: deleteAssets - x-ni-priviledge: Write + x-ni-auth: true parameters: - $ref: '#/parameters/DeleteAssetsRequestBody' responses: 200: - $ref: '#/responses/PartialSuccess' + $ref: '#/responses/DeleteAssetsResponse' 400: $ref: '#/responses/BadRequest' 401: $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' /v1/query-asset-utilization: @@ -1897,8 +2812,7 @@ paths: summary: Query Asset Utilization description: Retrieves asset utilization matching the provided filters. operationId: read-asset-utilization - x-ni-operation: readAssetUtilization - x-ni-privilege: Read + x-ni-auth: true parameters: - $ref: '#/parameters/QueryAssetUtilizationRequest' responses: @@ -1908,8 +2822,24 @@ paths: $ref: '#/responses/BadRequest' 401: $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' + default: + $ref: '#/responses/Error' + /v1/query-system-utilization: + post: + tags: [utilization] + summary: Query System Utilization + description: Retrieves system utilization matching the provided filters. + operationId: read-system-utilization + x-ni-auth: true + parameters: + - $ref: '#/parameters/QuerySystemUtilizationRequest' + responses: + 200: + $ref: '#/responses/SystemUtilizationWithPercentageResponse' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' /v1/query-asset-utilization-history: @@ -1918,8 +2848,7 @@ paths: summary: Query Asset Utilization Historical Data description: Retrieves historical asset utilization data matching the provided filters. An empty request body queries all historical asset utilization data. operationId: query-asset-utilizations - x-ni-operation: readAssetUtilization - x-ni-privilege: Read + x-ni-auth: true parameters: - $ref: '#/parameters/QueryAssetUtilizationHistoryRequest' responses: @@ -1929,8 +2858,6 @@ paths: $ref: '#/responses/BadRequest' 401: $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' /v1/policy: @@ -1939,8 +2866,7 @@ paths: summary: Retrieves the service policy description: Retrieves the service policy. operationId: get-policy - x-ni-operation: readAssets - x-ni-priviledge: Read + x-ni-auth: true responses: 200: $ref: '#/responses/ServicePolicyResponse' @@ -1953,8 +2879,7 @@ paths: summary: Updates the service policy description: Performs a request to update the service policy. operationId: update-policy - x-ni-operation: writeAssets - x-ni-priviledge: Write + x-ni-auth: true consumes: - application/merge-patch+json parameters: diff --git a/file/nifile.yml b/file/nifile.yml index c68d841..8eb6813 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -27,6 +27,7 @@ security: - apiKeyAuth: [] - basicAuth: [] - cookieAuth: [] + x-ni-routing-key: Skyline.FileIngestion definitions: Link: @@ -431,8 +432,7 @@ paths: tags: [versioning] summary: API information description: Returns information about API versions and available operations. - operationId: RootEndpoint - x-ni-request-all-privileges: true + operationId: RootEndpoint # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -461,7 +461,6 @@ paths: summary: API version information description: Returns available operations for a single version of the API. operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -477,14 +476,13 @@ paths: /v1/service-groups: get: tags: [service groups] - summary: List service groups + summary: List service groups description: >- Returns an array of File service group names. Each service group is a distinct collection of files. operationId: ListServiceGroups + x-ni-auth: true x-ni-operation: listFiles - x-ni-privilege: ViewMetadata - x-ni-request-all-privileges: true responses: 200: description: OK @@ -521,9 +519,8 @@ paths: The orderBy and orderByDescending fields can be used to manage sorting the list by metadata objects. operationId: ListAvailableFiles_GET + x-ni-auth: true x-ni-operation: listFiles - x-ni-privilege: ViewMetadata - x-ni-request-all-privileges: true parameters: - in: query name: skip @@ -588,8 +585,8 @@ paths: summary: Delete file description: Deletes the file indicated by the resource ID. operationId: Delete + x-ni-auth: true x-ni-operation: deleteFiles - x-ni-privilege: DeleteFiles x-ni-request-variables: [REMOTE_USER, USER_NAME] responses: 204: @@ -610,9 +607,9 @@ paths: Use the inline parameter in the query string to control the download behavior. + x-ni-auth: true operationId: ReceiveFile x-ni-operation: downloadData - x-ni-privilege: DownloadFiles x-ni-request-variables: - REQUEST_METHOD parameters: @@ -658,8 +655,8 @@ paths: Use the replaceExisting element to determine the replace or merge behavior. operationId: UpdateMetadata + x-ni-auth: true x-ni-operation: updateMetadata - x-ni-privilege: ModifyFiles x-ni-request-variables: [REMOTE_USER, USER_NAME] parameters: - in: body @@ -709,8 +706,8 @@ paths: Deletes multiple files in a single API call. The request body contains an array of file ids to delete. operationId: DeleteMultiple + x-ni-auth: true x-ni-operation: deleteFiles - x-ni-privilege: DeleteFiles x-ni-request-variables: [REMOTE_USER, USER_NAME] parameters: - in: body @@ -757,9 +754,8 @@ paths: - propertiesQuery: a JSON array of query objects with string values. operationId: QueryAvailableFiles + x-ni-auth: true x-ni-operation: listFiles - x-ni-privilege: ViewMetadata - x-ni-request-all-privileges: true parameters: - in: query name: skip @@ -818,8 +814,8 @@ paths: Uploads a file using multipart/form-data headers to send the file payload in the HTTP body. operationId: Upload + x-ni-auth: true x-ni-operation: uploadFiles - x-ni-privilege: UploadFiles x-ni-request-variables: [REMOTE_USER, USER_NAME] consumes: - multipart/form-data @@ -833,6 +829,19 @@ paths: name: metadata description: JSON Dictionary with key/value pairs type: string + - in: formData + name: id + description: >- + Optional field that allows the client to specify the ID of the file + once it is uploaded. An ID is expected to be a 24-digit hex string, + which is unique among all files. + type: string + - in: query + name: workspace + description: The id of the workspace the file belongs to + type: string + default: null + x-example: 1f2641dd-a5ac-4869-835e-5340b4cd386c responses: 201: description: OK diff --git a/ni-notebook-execution/ninbexec.yml b/ni-notebook-execution/ninbexec.yml index f700f53..b9895e6 100644 --- a/ni-notebook-execution/ninbexec.yml +++ b/ni-notebook-execution/ninbexec.yml @@ -108,14 +108,14 @@ definitions: CreateExecutionOperation: title: Create Executions Operation description: Create Executions array object including export formats - allOf: + allOf: - $ref: '#/definitions/Operation' - type: object - properties: - exportFormats: - description: List of export formats + properties: + exportFormats: + description: List of export formats type: array - items: + items: $ref: '#/definitions/NotebookExportFormat' example: exportFormats: [PDF, HTML] @@ -389,7 +389,7 @@ definitions: filter: description: The query filter in Dynamic Linq type: string - example: (metadata.key1 == "value1") || ((parameters.key2 != "value2") && (updatedAt >= "2002-12-25T01:01:01.1234567Z")) + example: (metadata["key1"] == "value1") || ((parameters["key2"] != "value2") && (updatedAt >= "2002-12-25T01:01:01.1234567Z")) orderBy: $ref: '#/definitions/NotebookSortField' descending: @@ -706,7 +706,7 @@ definitions: filter: description: The query filter in Dynamic Linq type: string - example: ((status == "SUCCEEDED") && (result.key1 == "value1")) || ((status == "FAILED") && (completedAt >= "2002-12-25T01:01:01.1234567Z")) + example: ((status == "SUCCEEDED") && (result["key1"] == "value1")) || ((status == "FAILED") && (completedAt >= "2002-12-25T01:01:01.1234567Z")) orderBy: $ref: '#/definitions/ExecutionSortField' descending: @@ -969,7 +969,7 @@ paths: /: get: operationId: RootEndpoint - x-ni-request-all-privileges: true + x-ni-request-variables: [API_KEY] summary: API information description: Returns information about API versions and available operations. tags: [versioning] @@ -995,7 +995,7 @@ paths: summary: API version 1 information description: Returns available operations for version 1 of the API. operationId: RootEndpointV1 - x-ni-request-all-privileges: true + x-ni-request-variables: [API_KEY] # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -1014,7 +1014,7 @@ paths: summary: API version 2 information description: Returns available operations for version 2 of the API. operationId: RootEndpointV2 - x-ni-request-all-privileges: true + x-ni-request-variables: [API_KEY] # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -1032,8 +1032,8 @@ paths: - $ref: '#/parameters/notebookPath' get: operationId: GetNotebook + x-ni-auth: true x-ni-operation: queryNotebooks - x-ni-privilege: Read x-ni-oldest-compatible-version: 1 summary: Get information about the specified Jupyter notebook description: >- @@ -1051,8 +1051,8 @@ paths: /v2/query-notebooks: post: operationId: QueryNotebooksV2 + x-ni-auth: true x-ni-operation: queryNotebooks - x-ni-privilege: Read x-ni-request-variables: [REMOTE_USER] summary: Query Jupyter notebooks description: >- @@ -1099,8 +1099,8 @@ paths: Downloads a notebook file in a single HTTP response. Use the inline parameter in the query string to control the download behavior. operationId: DownloadNotebook + x-ni-auth: true x-ni-operation: downloadNotebook - x-ni-privilege: Read x-ni-request-variables: - REMOTE_USER - REQUEST_METHOD @@ -1137,8 +1137,8 @@ paths: - $ref: '#/parameters/executionId' get: operationId: GetExecution + x-ni-auth: true x-ni-operation: queryExecutions - x-ni-privilege: Read x-ni-oldest-compatible-version: 1 summary: Get information on the specified execution of a Jupyter notebook description: >- @@ -1156,7 +1156,6 @@ paths: delete: operationId: DeleteExecution x-ni-operation: deleteExecutions - x-ni-privilege: Write x-ni-oldest-compatible-version: 1 summary: Delete the specified execution of a Jupyter notebook description: Deletes the execution of a Jupyter notebook specified by an execution ID. @@ -1171,8 +1170,8 @@ paths: /v2/delete-executions: post: operationId: DeleteExecutions + x-ni-auth: true x-ni-operation: deleteExecutions - x-ni-privilege: Write x-ni-oldest-compatible-version: 1 summary: Delete executions of Jupyter notebooks description: >- @@ -1207,8 +1206,8 @@ paths: /v2/query-executions: post: operationId: QueryExecutionsV2 + x-ni-auth: true x-ni-operation: queryExecutions - x-ni-privilege: Read summary: Query executions of Jupyter notebooks description: >- Queries the executions of Jupyter notebooks. If no sort order is specified, @@ -1247,9 +1246,8 @@ paths: /v2/executions: post: operationId: CreateExecutions + x-ni-auth: true x-ni-operation: createExecutions - x-ni-privilege: Read - x-ni-request-all-privileges: true x-ni-request-variables: [REMOTE_USER] x-ni-oldest-compatible-version: 1 summary: Create one or more executions of Jupyter notebooks @@ -1288,8 +1286,8 @@ paths: /v2/cancel-executions: post: operationId: CancelExecutions + x-ni-auth: true x-ni-operation: cancelExecutions - x-ni-privilege: Write x-ni-oldest-compatible-version: 1 summary: Cancel executions of Jupyter notebooks description: >- @@ -1324,8 +1322,8 @@ paths: /v1/query-notebooks: post: operationId: QueryNotebooks + x-ni-auth: true x-ni-operation: queryNotebooks - x-ni-privilege: Read x-ni-request-variables: [REMOTE_USER] summary: Query Jupyter notebooks description: >- @@ -1384,8 +1382,8 @@ paths: /v1/query-executions: post: operationId: QueryExecutions + x-ni-auth: true x-ni-operation: queryExecutions - x-ni-privilege: Read summary: Query executions of Jupyter notebooks description: >- Queries the executions of Jupyter notebooks. If no execution IDs or notebook paths are diff --git a/opcclient/niopcclient.yml b/opcclient/niopcclient.yml index 1306410..6152100 100644 --- a/opcclient/niopcclient.yml +++ b/opcclient/niopcclient.yml @@ -16,7 +16,7 @@ securityDefinitions: apiKeyAuth: type: apiKey name: x-ni-api-key - in: header + in: header basicAuth: type: basic cookieAuth: @@ -33,7 +33,6 @@ paths: /: get: operationId: HandleGetVersionInfo - x-ni-request-all-privileges: true summary: Gets API information tags: [versioning] description: Returns permissions and operations for the OpcClientService @@ -62,7 +61,6 @@ paths: required: true get: operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true summary: API version information description: Returns available operations for a single version of the API. tags: [versioning] @@ -82,7 +80,7 @@ paths: /v1/client-certificate: get: operationId: HandleHttpGetClientCertificate - x-ni-privilege: Read + x-ni-auth: true tags: [certificate] summary: Gets SystemLink OPC UA client certificate description: Gets SystemLink OPC UA client certificate @@ -100,7 +98,7 @@ paths: /v1/server-certificates: get: operationId: HandleHttpGetServerCertificates - x-ni-privilege: Read + x-ni-auth: true tags: [certificate] summary: Gets list of certificates from the application's trusted store description: Returns list of certificates from the application's trusted store @@ -115,7 +113,7 @@ paths: $ref: '#/responses/Error' post: operationId: HandleHttpUploadServerCertificate - x-ni-privilege: Write + x-ni-auth: true tags: [certificate] summary: Uploads a certificate to application's trusted store description: Uploads the certificate file @@ -137,7 +135,7 @@ paths: /v1/delete-server-certificates: post: operationId: HandleHttpDeleteServerCertificates - x-ni-privilege: Write + x-ni-auth: true tags: [certificate] summary: Deletes certificates from application's trusted store description: Deletes specified certificates @@ -164,7 +162,7 @@ paths: /v1/endpoints: get: operationId: HandleHttpGetEndpoints - x-ni-privilege: Read + x-ni-auth: true tags: [sessions] summary: Gets OPC UA server endpoints description: Returns endpoints of an OPC UA server @@ -187,7 +185,7 @@ paths: /v1/sessions: get: operationId: HandleHttpGetSessionsRequest - x-ni-privilege: Read + x-ni-auth: true tags: [sessions] summary: Gets existing OPC UA sessions description: Returns information about in-progress OPC UA sessions @@ -202,7 +200,7 @@ paths: $ref: '#/responses/Error' post: operationId: HandleHttpCreateSessionRequest - x-ni-privilege: Write + x-ni-auth: true tags: [sessions] summary: Creates a new OPC UA session description: Connects to an OPC UA server to start a new session @@ -223,7 +221,7 @@ paths: /v1/delete-sessions: post: operationId: HandleHttpDeleteSessionsRequest - x-ni-privilege: Write + x-ni-auth: true tags: [sessions] summary: Deletes existing OPC UA sessions description: Deletes existing OPC UA sessions @@ -263,7 +261,7 @@ paths: /v1/update-sessions: post: operationId: HandleHttpUpdateSessionsRequest - x-ni-privilege: Write + x-ni-auth: true tags: [sessions] summary: Updates existing OPC UA sessions description: Modifies name and publishing interval of the existing session @@ -295,7 +293,7 @@ paths: /v1/sessions/{id}/nodes/{path}: get: operationId: HandleHttpBrowseRequest - x-ni-privilege: Read + x-ni-auth: true tags: [browse] summary: Gets child nodes of a node description: Gets child nodes of the node specified by {path} @@ -332,7 +330,7 @@ paths: /v1/sessions/{id}/attributes/{opcNodeId}: get: operationId: HandleHttpReadAttributesRequest - x-ni-privilege: Read + x-ni-auth: true tags: [read] summary: Reads attributes of a node description: Gets attributes for the node speicified by {opcNodeId} @@ -358,7 +356,7 @@ paths: /v1/sessions/{id}/monitors: get: operationId: HandleHttpGetMonitorsRequest - x-ni-privilege: Read + x-ni-auth: true tags: [monitors] summary: Gets existing monitored items description: Creates SystemLink tags with specified display names @@ -379,7 +377,7 @@ paths: $ref: '#/responses/Error' post: operationId: HandleHttpCreateMonitorsRequest - x-ni-privilege: Write + x-ni-auth: true x-ni-request-timeout: 50000 tags: [monitors] summary: Creates new monitored items @@ -415,7 +413,7 @@ paths: /v1/sessions/{id}/delete-monitors: post: operationId: HandleHttpDeleteMonitorRequest - x-ni-privilege: Write + x-ni-auth: true tags: [monitors] summary: Removes existing monitored items description: Removes OPC UA nodes from subscription to stop monitoring them. Can optionally remove the SystemLink tags @@ -451,7 +449,7 @@ paths: /v1/sessions/{id}/pause-monitors: post: operationId: HandleHttpPauseMonitorRequest - x-ni-privilege: Write + x-ni-auth: true tags: [monitors] summary: Pauses existing monitored items description: Pauses to update tag history for the specified OPC UA variables. Doesn't remove the SystemLink tags. @@ -483,7 +481,7 @@ paths: /v1/sessions/{id}/resume-monitors: post: operationId: HandleHttpResumeMonitorRequest - x-ni-privilege: Write + x-ni-auth: true tags: [monitors] summary: Resumes paused monitored items description: Resumes to update the tag history for the specified OPC UA variables. diff --git a/repo/nirepo.yml b/repo/nirepo.yml index 4f2351a..6e269dc 100644 --- a/repo/nirepo.yml +++ b/repo/nirepo.yml @@ -29,7 +29,6 @@ security: - cookieAuth: [] x-ni-routing-key: Skyline.Repository -x-ni-privilege-application: nirepo definitions: JobError: @@ -65,7 +64,7 @@ definitions: type: string example: 5c51be40781e2b0ad0b0108c operation: - description: The type of job you want to execute. + description: The type of the job that is going to be executeed. type: string enum: - CREATE_FEED @@ -96,16 +95,47 @@ definitions: created: description: The date when the job was created. type: string - example: "2019-01-30T15:09:52.391Z" + format: date-time + example: '2019-02-11T13:32:06.030958Z' resourceId: description: The ID of the feed or package which this job created or modified. type: string example: 58339eb8e0d6442db09f03f5 + resourceIds: + type: array + items: + description: The ID of the feed or package which this job created or modified. + type: string + example: 58339eb8e0d6442db09f03f5 returnType: description: The type of resource, such as a package or feed, that this job will return when completed. type: string enum: [FEED, FEEDS, PACKAGE, UPDATE_DESCRIPTORS, SIMPLE] example: FEED + JobResponse: + type: object + description: Contains a single job. + properties: + job: + $ref: '#/definitions/Job' + JobsResponse: + type: object + description: Points to the location of a jobs array. + properties: + jobs: + type: array + items: + $ref: '#/definitions/Job' + JobIdsResponse: + description: Points to the location of a job IDs array. + type: object + properties: + jobIds: + type: array + items: + type: string + description: The ID of a single job. + example: '5c66b6bd781e2b2ce42ca818' ErrorObject: description: Contains error information. type: object @@ -142,7 +172,7 @@ definitions: Platform: type: string enum: [windows, ni-linux-rt] - description: "Depending on the platform you select, you can only use specific package extensions. For Windows feeds, you must use .nipkg. For NI Linux RT feeds, you must use .ipk or .deb." + description: "Depending on the selected platform, the following package extensions are available: .nipkg for windows feeds, .ipk and .deb for ni-linux-rt feeds." example: windows PackageImportDescriptor: type: object @@ -155,32 +185,89 @@ definitions: description: description: The description of the package. type: string - example: Enter description here + example: "LabVIEW Runtime (32-bit) Resource contains support for non-English languages to display in dialog boxes, menus, and error messages that are part of the LabVIEW Runtime." feedUri: description: The path to the feed. type: string - example: "/path/to/feed" + example: "https://download.ni.com/support/nipkg/products/ni-l/ni-labview-nxg-3.0.0/6.4/released-critical" packageName: description: The package name. type: string - example: Package Name + example: "ni-labview-2015-runtime-engine-resource" packageUri: description: The path to the package. type: string - example: "/path/to/package" + example: "/nirepo/v1/files/packages/ni-labview-2015-runtime-engine-resource_15.6.0.49152-0+f0_windows_all.nipkg" version: description: The package version. type: string - example: "1.2.3" + example: "15.6.0.49152-0+f0" PackageImportDescriptors: type: object - description: An object that points to the location of a package importer array. + description: Points to the location of a package importer array. properties: packageImportDescriptors: description: An array containing objects which describe the packages in the remote feed. type: array items: $ref: '#/definitions/PackageImportDescriptor' + ArchitectureInformation: + type: object + description: An object defining the architecture the software can run on. + properties: + id: + type: string + description: The ID of this element. + example: "1" + value: + type: string + description: The architecture that this package can run on. + example: "64-bit" + LanguageInformation: + type: object + description: Contains information about the supported locale of the product. + properties: + id: + type: string + description: The ID of this element. + example: "2" + value: + type: string + description: The language the product supports. + example: English + SoftwareInformation: + type: object + description: Contains information about a piece of software that a store item contains. + properties: + storeItemId: + type: string + description: The ID of this element. + example: "654" + productName: + type: string + description: The name of one the products contained in the software suite. + example: LabVIEW NXG + shortDescription: + type: string + description: A short description of the product. + example: LabVIEW NXG enables engineers to quickly automate hardware, customize tests to project specifications, and easily view measurement results from anywhere. + downloadItemVersion: + type: string + description: The item version number. + example: "2.1" + packageName: + type: string + description: The name of the package to install. + example: ni-labview-nxg-2.0.0 + packageVersion: + type: string + description: The version of the package to install. + example: 5.3.1.49156-0+f4 + feeds: + type: array + description: The feeds where the suite contents are located at. + items: + $ref: '#/definitions/FeedNameAndUri' StoreItemInstaller: type: object properties: @@ -192,120 +279,22 @@ definitions: type: array description: An array containing information about the possible architectures the software can run on. items: - type: object - description: An object defining the architecture the software can run on. - properties: - id: - type: string - description: The ID of this element. - example: "1" - value: - type: string - description: The architecture that this package can run on. - example: "64-bit" + $ref: '#/definitions/ArchitectureInformation' languages: type: array description: An array containing objects that offer information about the supported locale of the product. items: - type: object - description: An object offering information about the supported locale of the product. - properties: - id: - type: string - description: The ID of this element. - example: "2" - value: - type: string - description: The language the product supports. - example: English + $ref: '#/definitions/LanguageInformation' suiteContents: type: array description: Array of descriptions about what this store item contains. items: - type: object - description: An object containing information about a piece of software that this store item contains. - properties: - storeItemId: - type: number - description: The ID of this element. - example: 654 - productName: - type: string - description: The name of one the products contained in the software suite. - example: LabVIEW NXG - shortDescription: - type: string - description: A short description of the product. - example: LabVIEW NXG enables engineers to quickly automate hardware, customize tests to project specifications, and easily view measurement results from anywhere. - updateDate: - type: string - description: The last date this product was updated at. - example: '2018-01-23T14:33:29.000-06:00' - packageName: - type: string - description: The name of the package to install. - example: ni-labview-nxg-2.0.0 - packageVersion: - type: string - description: The version of the package to install. - example: 5.3.1.49156-0+f4 - architecture: - type: string - description: The architecture this product works on. - example: windows_x64 - preSelect: - type: string - description: The designation of whether the product will be automatically set to install. Select "yes" to preselect the product. - example: "yes" - repositories: - type: array - description: An array containing information about where to locate the repositories and packages to install them. - items: - type: object - description: An object containing information about one of the repositories where the packages of this product are located. - properties: - packageName: - type: string - description: The name of one of the packages. - example: ni-labview-nxg-2.0.0-2.1-released-critical - file: - type: string - description: | - The location of the file, including the file extension. - Depending on the platform you select, you will be able to use the following package extensions: .nipkg for windows feeds, .ipk and .deb for ni-linux-rt feeds. - example: "http://127.0.0.1/en/ni-labview-nxg-2.0.0-2.1-released-critical.nipkg" - md5Checksum: - description: The MD5 fingerprint of the file. - type: string - example: 233b2aa7d1c23cbef93874a7ecdce61a - repositoryPath: - type: string - description: The path to the repository where the package is found. - example: "http://download.ni.com/products/ni-labview-nxg-2.0.0/2.1/released-critical" - feedType: - type: string - enum: [RELEASED, RELEASED-CRITICAL] - description: The release type of the feed. - example: RELEASED - downloadItemVersion: - type: string - description: The item version number. - example: "2.1" + $ref: '#/definitions/SoftwareInformation' feeds: type: array description: The feeds where the suite contents are located at. items: - type: object - description: Item containing information about the feed. - properties: - feedName: - type: string - description: The name of the feed. Feed names must begin with an alphabetical character and contain only alphanumeric characters, spaces, underscores, and hyphens. - example: "SystemLink 19.0" - uri: - type: string - description: The path to the feed. - example: "/path/to/feed" + $ref: '#/definitions/FeedNameAndUri' StoreDownloadItems: type: object properties: @@ -334,6 +323,7 @@ definitions: enum: - ADD - UPGRADE + default: ADD example: UPGRADE description: The operation type. fromVersion: @@ -350,7 +340,7 @@ definitions: description: The path to the package. packageId: type: string - example: PackageId + example: 5de11fd6a47a402c643e4b62 description: The unique ID of the package. packageToReplace: type: string @@ -364,38 +354,133 @@ definitions: type: boolean description: Whether it is local or remote. example: false + FeedBasicData: + type: object + description: | + Only one of the 'name' and 'feedName' properties is requested. + There are both 'name' and 'feedName' for backwards compatibility. + The 'feedName' parameter will be considered if both of them are provided. + properties: + feedName: + type: string + description: Name of the feed. + example: My LabVIEW feed + name: + type: string + description: Name of the feed. + example: My LabVIEW feed + description: + type: string + description: A short description of the feed. + example: Feed containing all the necessary packages for configuring LabVIEW 2015 + workspace: + type: string + description: The workspace's id where the feed belongs to + example: 3651818c-9b31-4d25-8b35-0afc4e305f2d FeedData: type: object + description: | + Only one of the 'name' and 'feedName' properties is requested. + There are both 'name' and 'feedName' for backwards compatibility. + The 'feedName' parameter will be considered if both of them are provided. properties: feedName: type: string - description: A string value representing the feed's name. - example: Feed Name + description: The name of this feed. + example: My LabVIEW feed + name: + type: string + description: The name of this feed. + example: My LabVIEW feed description: type: string description: A short description of the feed. - example: Enter description here + example: Feed containing all the necessary packages for configuring LabVIEW 2015 platform: $ref: '#/definitions/Platform' + workspace: + type: string + description: The workspace's id where the feed belongs to + example: 3651818c-9b31-4d25-8b35-0afc4e305f2d FeedDataWithURI: type: object + description: | + Only one of the 'name' and 'feedName' properties is requested. + There are both 'name' and 'feedName' for backwards compatibility. + The 'feedName' parameter will be considered if both of them are provided. properties: + feedName: + type: string + description: The name of this feed. + example: My LabVIEW feed name: type: string description: The name of the feed. - example: Feed Name + example: My LabVIEW feed description: type: string description: A short description of the feed. - example: Enter description here + example: Feed containing all the necessary packages for configuring LabVIEW 2015 platform: $ref: '#/definitions/Platform' + workspace: + type: string + description: The workspace's id where the feed belongs to + example: 3651818c-9b31-4d25-8b35-0afc4e305f2d uri: type: string description: 'The path of the feed to replicate. Appending /Packages to the URI should yield the "Packages" file of the feed.' - example: '/path/to/feed' + example: "https://download.ni.com/support/nipkg/products/ni-l/ni-labview-nxg-3.0.0/6.4/released-critical" + FeedUrisAndIds: + type: object + description: Contains the list of URIs and the list of IDs for a group of feeds. + properties: + feedUris: + type: array + items: + type: string + description: The URI of a single feed. + example: "https://download.ni.com/support/nipkg/products/ni-l/ni-labview-nxg-3.0.0/6.4/released-critical" + feedIds: + type: array + items: + type: string + description: The ID of a single feed. + example: 5c62bf36781e2b1c7c57daf4 + FeedUriObject: + type: object + description: Contains the URI of a single feed. + properties: + feedUri: + type: string + example: /path/to/feed + description: The URI of a feed. + FeedNameAndUri: + type: object + description: | + Only one of the 'name' and 'feedName' properties is requested. + There are both 'name' and 'feedName' for backwards compatibility. + The 'feedName' parameter will be considered if both of them are provided. + properties: + feedName: + type: string + description: The name of the feed. Feed names must begin with an alphabetical character and contain only alphanumeric characters, spaces, underscores, and hyphens. + example: "SystemLink 19.0" + name: + type: string + description: The name of this feed. + example: My LabVIEW feed + uri: + type: string + description: The path to the feed. + example: "https://download.ni.com/support/nipkg/products/ni-l/ni-labview-nxg-3.0.0/6.4/released-critical" + StoreItemRequest: type: object + description: | + Only one of the 'name' and 'feedName' properties is requested. + There are both 'name' and 'feedName' for backwards compatibility. + The 'feedName' parameter will be considered if both of them are provided. properties: storeItemId: type: string @@ -412,11 +497,19 @@ definitions: feedName: type: string description: If "split" is false, the name of the feed which will be created. If "split" is true, this field is ignored. - example: Feed Name + example: My LabVIEW feed + name: + type: string + description: The name of this feed. + example: My LabVIEW feed description: type: string description: If "split" is false, the description of the feed which will be created. If "split" is true, this field is ignored. - example: Feed Description + example: Feed containing all the necessary packages for configuring LabVIEW 2015 + workspace: + type: string + description: The workspace's id where the feed belongs to + example: 3651818c-9b31-4d25-8b35-0afc4e305f2d StoreItem: type: object properties: @@ -448,6 +541,36 @@ definitions: type: array items: $ref: '#/definitions/StoreDownloadItems' + StoreItemsExtendedResponse: + type: object + description: Contains a list of StoreItem elements together with the coresponding paging information. + properties: + items: + type: array + items: + $ref: '#/definitions/StoreItem' + pageSize: + description: The number of the records contained by one page. Maximum is 1000. + type: integer + example: 100 + pageNumber: + description: The number of the current page. + type: integer + example: 5 + totalPages: + description: The total number of pages. + type: integer + example: 20 + totalItems: + description: The total number of items. + type: integer + example: 1975 + StoreItemResponse: + type: object + description: Contains a single StoreItem. + properties: + storeItem: + $ref: '#/definitions/StoreItem' StoreItemDescriptor: type: object properties: @@ -463,6 +586,14 @@ definitions: type: string description: Value uniquely identifying the specific store item installer to replicate. example: LABVIEWPKGBLDR10 + StoreItemDescriptorsObject: + type: object + description: An array of objects which describe which specific store items to replicate. + properties: + storeItemDescriptors: + type: array + items: + $ref: '#/definitions/StoreItemDescriptor' UpdateDescriptorRequest: type: object description: An array of update descriptors. @@ -472,7 +603,10 @@ definitions: items: $ref: '#/definitions/UpdateDescriptor' Feed: - description: A single feed. + description: | + Only one of the 'name' and 'feedName' properties is requested. + There are both 'name' and 'feedName' for backwards compatibility. + The 'feedName' parameter will be considered if both of them are provided. type: object properties: id: @@ -482,7 +616,11 @@ definitions: feedName: type: string description: The name of this feed. - example: Feed Name + example: My LabVIEW feed + name: + type: string + description: The name of this feed. + example: My LabVIEW feed directoryUri: type: string description: The location of this feed. @@ -490,9 +628,13 @@ definitions: description: type: string description: The description of this feed. - example: Feed Description + example: Feed that contains all the necessary packages for configuring LabVIEW 2015 platform: $ref: '#/definitions/Platform' + workspace: + type: string + description: The workspace's id where the feed belongs to + example: 3651818c-9b31-4d25-8b35-0afc4e305f2d packageReferences: type: array description: An array containing the IDs of the packages in this feed. @@ -500,17 +642,25 @@ definitions: type: string description: The ID of a package. example: "5c652e1f781e2b05cc4d589e" + packageSources: + type: array + description: IDs and/or external URIs of package sources + items: + description: The source of a package. + type: string + example: https://download.ni.com/support/nipkg/products/idne/idnet-ad/17.5/released lastUpdated: type: string description: The date this feed was last updated at. - example: "2019-01-28T14:37:55.043000Z" + format: date-time + example: '2019-02-11T13:32:06.030958Z' ready: type: boolean description: If the job that creates this feed is complete. example: true Unauthorized: type: string - description: A not authorized response from a web page you use to log in. + description: A not authorized response from a web log in page. example: Web Page with login information. Feeds: description: An object containing an array of feeds. @@ -521,6 +671,12 @@ definitions: type: array items: $ref: '#/definitions/Feed' + FeedObject: + description: Contains a feed. + type: object + properties: + feed: + $ref: '#/definitions/Feed' JobID: description: An object containing the Job ID. type: object @@ -529,6 +685,156 @@ definitions: description: The ID of the job that was created for tracking the status of the operation. type: string example: "5c666def781e2b2f64208709" + PackageMetadata: + type: object + description: Information about the metadata of this package. + properties: + packageName: + type: string + description: The name of the package. + example: "ni-securityupdate-kb67l8lcqw-killbits" + version: + type: string + description: The version of the package. + example: "2.0.0.22-0+d22" + architecture: + type: string + description: The architecture of the package. + example: windows_x64 + breaks: + type: array + description: An array containing information about other packages this package breaks. + items: + type: string + description: The name of a package that this package breaks. This also contains information about the version of the package. + example: "ni-sysapi (>= 18.0.0)" + conflicts: + type: array + description: An array containing information about other packages this package conflicts with. + items: + type: string + description: The name of a package that this package conflicts with. This also contains information about the version of the package. + example: "ni-msvcrt-2015 (>= 14.1.4)" + depends: + type: array + description: An array containing information about other packages this package depends on. + items: + type: string + description: The name of a package that this package depends on. This also contains information about the version of the package. + example: "ni-metauninstaller (>= 18.0.1)" + description: + type: string + description: The description of the package. + example: This is an infrastructure package for NI Software. + enhances: + type: array + description: An array containing information about other packages this package enhances. + items: + type: string + description: The name of a package that this package enhances. This also contains information about the version of the package. + example: "ni-msiproperties (>= 18.0.1)" + essential: + type: boolean + description: Whether this package is essential. + example: true + fileName: + type: string + description: | + The location of the file, including the file extension. + Depending on the selected platform, the following package extensions are available: .nipkg for windows feeds, .ipk and .deb for ni-linux-rt feeds. + example: ni-securityupdate-kb67l8lcqw-killbits_2.0.0.22-0+d22_windows_x64.nipkg + homepage: + type: string + description: The website of the maintainers for this package. + example: "http://www.ni.com" + installedSize: + type: integer + description: The size of this package after install. + example: 0 + maintainer: + type: string + description: The maintainer of this package. + example: "National Instruments " + predepends: + type: array + description: An array containing information about other packages this package predepends. + items: + description: The name of a package that this package predepends. This also contains information about the version of the package. + type: string + example: "ni-teststand-2017-tools (>= 17.0.0)" + priority: + type: integer + description: The priority of the package. + example: 4 + provides: + type: array + description: An array containing information about other packages that this package provides. + items: + type: string + example: "ni-curl (= 17.0.0.49152-0+f0)" + description: One of the packages that the containing package provides. This also contains information about the version of the package. + recommends: + type: array + description: An array containing information about other packages this package recommends. + items: + type: string + description: The name of a package that this package recommends. This also contains information about the version of the package. + example: "ni-systemlink-client-2018.5-realtime-bin (>= 18.5.0)" + releaseNotes: + type: string + description: A page containing the release notes of the package. + example: Refer to the NI website at http://www.ni.com/r/slrm185 for installation instructions, known issues, bug fixes, compatibility information, and other important notices about this product. + replaces: + type: array + description: An array containing information about other packages this package replaces. + items: + type: string + description: The name of a package that this package replaces. This also contains information about the version of the package. + example: "b235b862-6a92-4a04-a8b2-6d71f777de67 (< 16.99.65535)" + section: + type: string + description: The section of the package. + example: Infrastructure + size: + type: integer + description: The size of the package in bytes. + example: 750070 + source: + type: string + description: The source of this package, if any. + example: "thunar-archive-plugin_0.3.1.bb" + suggests: + type: array + description: An array containing information about other packages this package suggests. + items: + type: string + description: The name of a package that this package suggests. This also contains information about the version of the package. + example: "ni-systemlink-client-2018.5-realtime-bin (>= 18.5.0)" + tags: + type: string + description: Tags of the package. + example: "KillBits, Security Update 2013" + attributes: + type: object + description: Attributes of the package. + example: + Architecture: windows_x64 + Description: An infrastructure package for NI Software. + Filename: 71e47fbf-2782-4c10-873e-dba414213dc9.nipkg + Homepage: http://www.ni.com + MD5Sum: 672a667ca32b6915ae9a968c55f80825 + Maintainer: National Instruments + Package: ni-securityupdate-kb67l8lcqw-killbits + Priority: standard + Section: Infrastructure + Size: '750070' + Version: 2.0.0.22-0+d22 + XB-DisplayName: NI Security Update (KB 67L8LCQW) + XB-DisplayVersion: 2.0.0 + XB-LanguageSupport: en + XB-Plugin: wininst + XB-Tags: KillBits, Security Update 2013 + FileName: ni-securityupdate-kb67l8lcqw-killbits_2.0.0.22-0+d22_windows_x64.nipkg Package: description: A single package. type: object @@ -551,163 +857,16 @@ definitions: lastUpdated: type: string description: The date this package was last updated. - example: "2016-11-02T22:26:33.668Z" + format: date-time + example: '2019-02-11T13:32:06.030958Z' metadata: - type: object - description: Information about the metadata of this package. - properties: - packageName: - type: string - description: The name of the package. - example: "ni-securityupdate-kb67l8lcqw-killbits" - version: - type: string - description: The version of the package. - example: "2.0.0.22-0+d22" - architecture: - type: string - description: The architecture of the package. - example: windows_x64 - breaks: - type: array - description: An array containing information about other packages this package breaks. - items: - type: string - description: The name of a package that this package breaks. This also contains information about the version of the package. - example: "ni-sysapi (>= 18.0.0)" - conflicts: - type: array - description: An array containing information about other packages this package conflicts with. - items: - type: string - description: The name of a package that this package conflicts with. This also contains information about the version of the package. - example: "ni-msvcrt-2015 (>= 14.1.4)" - depends: - type: array - description: An array containing information about other packages this package depends on. - items: - type: string - description: The name of a package that this package depends on. This also contains information about the version of the package. - example: "ni-metauninstaller (>= 18.0.1)" - description: - type: string - description: The description of the package. - example: This is an infrastructure package for NI Software. - enhances: - type: array - description: An array containing information about other packages this package enhances. - items: - type: string - description: The name of a package that this package enhances. This also contains information about the version of the package. - example: "ni-msiproperties (>= 18.0.1)" - essential: - type: boolean - description: Whether this package is essential. - example: true - fileName: - type: string - description: | - The location of the file, including the file extension. - Depending on the platform you select, you will be able to use the following package extensions: .nipkg for windows feeds, .ipk and .deb for ni-linux-rt feeds. - example: ni-securityupdate-kb67l8lcqw-killbits_2.0.0.22-0+d22_windows_x64.nipkg - homepage: - type: string - description: The website of the maintainers for this package. - example: "http://www.ni.com" - installedSize: - type: number - description: The size of this package after install. - example: 0 - maintainer: - type: string - description: The maintainer of this package. - example: "National Instruments " - predepends: - type: array - description: An array containing information about other packages this package predepends. - items: - description: The name of a package that this package predepends. This also contains information about the version of the package. - type: string - example: "ni-teststand-2017-tools (>= 17.0.0)" - priority: - type: number - description: The priority of the package. - example: 4 - provides: - type: array - description: An array containing information about other packages that this package provides. - items: - type: string - example: "ni-curl (= 17.0.0.49152-0+f0)" - description: One of the packages that the containing package provides. This also contains information about the version of the package. - recommends: - type: array - description: An array containing information about other packages this package recommends. - items: - type: string - description: The name of a package that this package recommends. This also contains information about the version of the package. - example: "ni-systemlink-client-2018.5-realtime-bin (>= 18.5.0)" - releaseNotes: - type: string - description: A page containing the release notes of the package. - example: Refer to the NI website at http://www.ni.com/r/slrm185 for installation instructions, known issues, bug fixes, compatibility information, and other important notices about this product. - replaces: - type: array - description: An array containing information about other packages this package replaces. - items: - type: string - description: The name of a package that this package replaces. This also contains information about the version of the package. - example: "b235b862-6a92-4a04-a8b2-6d71f777de67 (< 16.99.65535)" - section: - type: string - description: The section of the package. - example: Infrastructure - size: - type: number - description: The size of the package in bytes. - example: 750070 - source: - type: string - description: The source of this package, if any. - example: "thunar-archive-plugin_0.3.1.bb" - suggests: - type: array - description: An array containing information about other packages this package suggests. - items: - type: string - description: The name of a package that this package suggests. This also contains information about the version of the package. - example: "ni-systemlink-client-2018.5-realtime-bin (>= 18.5.0)" - tags: - type: string - description: Tags of the package. - example: "KillBits, Security Update 2013" - attributes: - type: object - description: Attributes of the package. - example: - Architecture: windows_x64 - Description: An infrastructure package for NI Software. - Filename: 71e47fbf-2782-4c10-873e-dba414213dc9.nipkg - Homepage: http://www.ni.com - MD5Sum: 672a667ca32b6915ae9a968c55f80825 - Maintainer: National Instruments - Package: ni-securityupdate-kb67l8lcqw-killbits - Priority: standard - Section: Infrastructure - Size: '750070' - Version: 2.0.0.22-0+d22 - XB-DisplayName: NI Security Update (KB 67L8LCQW) - XB-DisplayVersion: 2.0.0 - XB-LanguageSupport: en - XB-Plugin: wininst - XB-Tags: KillBits, Security Update 2013 - FileName: ni-securityupdate-kb67l8lcqw-killbits_2.0.0.22-0+d22_windows_x64.nipkg - description: - type: string - description: Description of the package. - example: Package Description. - platform: - $ref: '#/definitions/Platform' + $ref: '#/definitions/PackageMetadata' + PackageResponse: + description: Contains a single package. + type: object + properties: + package: + $ref: '#/definitions/Package' Packages: description: An object containing an array of packages. type: object @@ -717,12 +876,37 @@ definitions: type: array items: $ref: '#/definitions/Package' - UpdateDescriptorResponse: - description: An array of update descriptors. - type: array - items: - $ref: '#/definitions/UpdateDescriptor' - + PackageReferencesObject: + type: object + description: Points to the location of a package references array. + properties: + packageReferences: + type: array + items: + type: string + description: The reference of a package. + example: 5c62bf36781e2b1c7c57daf4 + PackageSourcesObject: + type: object + description: Points to the location of a package sources array. + properties: + packageSources: + description: IDs and/or external URIs of package sources + type: array + items: + description: The source of a package. + type: string + example: https://nuget.org/api/v2/ + UpdateDescriptorsResponse: + type: object + description: Object containing an array of update descriptors. + properties: + updateDescriptors: + description: An array of update descriptors. + type: array + items: + $ref: '#/definitions/UpdateDescriptor' + responses: JobIdResponse: description: Response with a JobID in it. This is the usual result after executing a write operation. @@ -737,7 +921,6 @@ paths: /v1/ping: get: operationId: Ping - x-ni-privilege: Read x-ni-operation: ping tags: [ping] summary: Ping the service @@ -750,10 +933,10 @@ paths: 404: description: Service is down. 500: - description: The request encountered an error. + description: The request encountered an error. default: $ref: '#/definitions/Error' - /v1/files/{pathToFile}: + /v1/files: parameters: - in: path name: pathToFile @@ -762,8 +945,11 @@ paths: required: true x-example: "filePath" get: - x-ni-privilege: Download + operationId: DownloadFiles x-ni-operation: getResource + x-ni-route-type: Static + x-ni-static-download: true + x-ni-static-alias: /files tags: [files] summary: Download files located in Package Repository description: Download files located in Package Repository. @@ -775,57 +961,35 @@ paths: schema: type: file 404: - description: File not found. - default: - $ref: '#/definitions/Error' - /v1/files/packages/{pathToPackage}: - parameters: - - in: path - name: pathToPackage - description: The path to the file to download. - type: string - required: true - x-example: "pathToPackage.extension" - get: - x-ni-privilege: Download - x-ni-operation: getResource - tags: [files] - summary: Download files located in Package Repository in the packages folder - description: Download files located in Package Repository in the packages folder. - produces: - - application/octet-stream - responses: - 200: - description: The request has succeeded. - schema: - type: file - 404: - description: File not found. + description: File not found. default: $ref: '#/definitions/Error' /v1/feeds: get: - x-ni-privilege: Read + operationId: ListFeeds + x-ni-auth: true x-ni-operation: getFeeds tags: [feeds] summary: List all feeds - description: Returns a JSON array of all of the feeds in the service. + description: Returns a JSON array of all the feeds in the service. parameters: - in: query name: omitPackageReferences type: boolean - required: false default: false - description: Whether the "packageReferences" array for each feed, which contains the ids of all of the packages in that feed, should be omitted. + description: Whether the "packageReferences" array for each feed, which contains the IDs of all of the packages in that feed, should be omitted. responses: 200: - $ref: '#/definitions/Feeds' + description: The request has succeeded. + schema: + $ref: '#/definitions/Feeds' 401: $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' post: - x-ni-privilege: Write + operationId: CreateFeed + x-ni-auth: true x-ni-operation: createFeed tags: [feeds] summary: Create a feed @@ -841,32 +1005,36 @@ paths: 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}: + /v1/feeds/{feedId}: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" get: - x-ni-privilege: Read + operationId: GetFeed + x-ni-auth: true x-ni-operation: getFeeds tags: [feeds] summary: Get feed description: Returns a JSON representation of a feed. responses: 200: - $ref: '#/definitions/Feed' + description: The request has succeeded. + schema: + $ref: '#/definitions/FeedObject' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' delete: - x-ni-privilege: Write + operationId: DeleteFeed + x-ni-auth: true x-ni-operation: deleteFeeds tags: [feeds] summary: Remove a feed @@ -881,19 +1049,20 @@ paths: 202: $ref: '#/responses/JobIdResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/clone: + /v1/feeds/{feedId}/clone: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: CloneFeed + x-ni-auth: true x-ni-operation: cloneFeed tags: [feeds] summary: Clone a feed @@ -902,35 +1071,27 @@ paths: - in: body name: feedRequestData schema: - type: object - properties: - name: - type: string - description: The name for the cloned feed. - example: Feed Name - description: - type: string - description: A description for the cloned feed. - example: Feed Description + $ref: '#/definitions/FeedBasicData' responses: 202: $ref: '#/responses/JobIdResponse' 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/packages: + /v1/feeds/{feedId}/packages: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" get: - x-ni-privilege: Read + operationId: ListFeedPackages + x-ni-auth: true x-ni-operation: getPackages tags: [feeds, packages] summary: Get all packages in a feed @@ -946,21 +1107,19 @@ paths: type: boolean description: Whether the array of feed reference will be omitted from each package. If true, they will be omitted. default: false - - in: query - name: returnUnreferencedOnly - type: boolean - description: A query parameter that determines whether only packages without referencing feeds should be returned. - default: false responses: 200: - $ref: '#/definitions/Packages' + description: The request has succeeded. + schema: + $ref: '#/definitions/Packages' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' /v1/replicate-feed: post: - x-ni-privilege: Write + operationId: ReplicateFeed + x-ni-auth: true x-ni-operation: replicateFeed tags: [feeds] summary: Replicate a feed @@ -986,19 +1145,20 @@ paths: 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/import-packages: + /v1/feeds/{feedId}/import-packages: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: ImportPackages + x-ni-auth: true x-ni-operation: importPackages tags: [feeds, packages] summary: Import packages into a feed @@ -1024,19 +1184,20 @@ paths: 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/import-feeds: + /v1/feeds/{feedId}/import-feeds: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: ImportFeedsAlternative + x-ni-auth: true x-ni-operation: importFeeds tags: [feeds] summary: Import feeds into an existing feed @@ -1045,49 +1206,36 @@ paths: - in: query name: shouldCleanSourceFeeds type: boolean - required: false description: A value indicating whether only the most recent version of every package in the source feed should be added to the destination feed. If true, only the most recent version of each package will be added. If false, all versions of each package will be added. default: true - in: query name: shouldOverwrite type: boolean - required: false description: A query parameter that determines if existing packages with the same filename as a package to be added to the pool should be overwritten. default: false - in: query name: ignoreImportErrors type: boolean - required: false description: A query parameter that determines whether the service should abort the request if errors occur while importing some packages. If true, the service will abort and roll back the request if an error occurs while importing a package. If false, the service will import as many packages as it can, and return an error describing which packages could not be imported. default: false - in: body name: feedUris description: An array containing the URIs of remote feeds whose packages should be added to the destination feed. Appending /Packages to each URI should yield the "Packages" file for that feed. schema: - type: object - properties: - feedUris: - type: array - items: - type: string - example: path/to/feed - feedIds: - type: array - items: - type: string - example: 5c62bf36781e2b1c7c57daf4 + $ref: '#/definitions/FeedUrisAndIds' responses: 202: $ref: '#/responses/JobIdResponse' 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' /v1/packages: get: - x-ni-privilege: Read + operationId: ListPackages + x-ni-auth: true x-ni-operation: getPackages tags: [packages] summary: Get all packages @@ -1112,40 +1260,26 @@ paths: 200: description: The request has succeeded. schema: - type: array - items: - $ref: '#/definitions/Package' + $ref: '#/definitions/Packages' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/packages/{id}: + /v1/packages/{packageId}: parameters: - in: path - name: id + name: packageId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" get: - x-ni-privilege: Read + operationId: GetPackage + x-ni-auth: true x-ni-operation: getPackages tags: [packages] summary: Get package details description: Get package details. - parameters: - - in: query - name: omitAttributes - type: boolean - description: If true, the "Attributes" dictionary for the package will be omitted. - default: false - required: false - - in: query - name: omitFeedReferences - type: boolean - description: If true, the array of feed references will be omitted from the package. - default: false - required: false responses: 200: description: | @@ -1154,30 +1288,35 @@ paths: Do not rely on all of these fields being available in any application as some may be null, empty, or nonexistent. However, key properties such as _id, name, owners, and FileName will never be null. schema: - type: object - properties: - package: - $ref: '#/definitions/Package' + $ref: '#/definitions/PackageResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' delete: - x-ni-privilege: Write + operationId: DeletePackage + x-ni-auth: true x-ni-operation: deletePackage tags: [packages] summary: Remove a package description: Remove a package. The package will be removed from all of the feeds that reference it, potentially creating feeds with unsatisfied dependencies. + parameters: + - in: query + name: autoRemoveReferences + type: boolean + description: If true, the "References" will be automatically removed. + default: false responses: 202: $ref: '#/responses/JobIdResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' /v1/upload-packages: post: - x-ni-privilege: Write + operationId: UploadPackage + x-ni-auth: true x-ni-operation: uploadPackage tags: [packages] summary: Upload packages to the pool @@ -1190,12 +1329,11 @@ paths: type: boolean description: A query parameter that determines if existing packages with the same filename as a package to be added to the pool should be overwritten. default: false - required: false - in: formData name: filename type: file required: true - description: The name of this parameter is the name of the file that will be uploaded. If the file you upload is test.ipkg, put instead of filename that name. + description: The name of this parameter is the name of the file that will be uploaded. If the uploaded file is test.ipkg, put instead of filename that name. - in: header name: X-File-Name type: string @@ -1216,34 +1354,24 @@ paths: type: string description: Contains the relative URI of the job that was created for tracking the status of the operation. Execute GET against this URI to get information about the status of the operation. schema: - type: object - properties: - jobIds: - type: array - items: - type: string - example: '5c66b6bd781e2b2ce42ca818' + $ref: '#/definitions/JobIdsResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' /v1/get-package-import-descriptors: post: - x-ni-privilege: Read + operationId: ObtainPackageImportDescriptorsFromFeedUri + x-ni-auth: true x-ni-operation: getPackageImportDescriptors tags: [packages] - summary: Get package import descriptors - description: Route for getting a description of the packages in a remote feed. + summary: Returns the package import descriptors from the specified feed URI + description: Returns a list of PackageImportDescriptor objects based on the specified feed URI. parameters: - in: body name: feedUri schema: - type: object - properties: - feedUri: - type: string - example: /path/to/feed - description: The URI of the feed to get package import descriptors from. + $ref: '#/definitions/FeedUriObject' responses: 200: description: The request has succeeded. @@ -1252,56 +1380,49 @@ paths: 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/metadata: + /v1/feeds/{feedId}/metadata: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" put: - x-ni-privilege: Write + operationId: UpdateFeed + x-ni-auth: true x-ni-operation: getFeedMetadata tags: [feeds] - summary: Update a feed's name and/or description - description: Asynchronously updates a feed's name and/or description. Returns the ID of a resource which can be queried to determine the status of the operation. + summary: Update a feed's name and/or description and/or workspace + description: Asynchronously updates a feed's name and/or description and/or workspace. Returns the ID of a resource which can be queried to determine the status of the operation. parameters: - in: body name: updateData schema: - type: object - properties: - name: - type: string - description: A string value representing the new name for the feed. Must be unique. - example: Feed Name - description: - type: string - description: A short description of the feed. If you want to clear the description for the feed, provide a null or empty value for the description key. - example: Feed Description + $ref: '#/definitions/FeedBasicData' responses: 202: $ref: '#/responses/JobIdResponse' 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/add-package-references: + /v1/feeds/{feedId}/add-package-references: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: AddPackageReferences + x-ni-auth: true x-ni-operation: addPackageReferences tags: [feeds, packages] summary: Add package references to feed @@ -1309,34 +1430,29 @@ paths: parameters: - in: body name: packageReferences - description: An array of the IDs of the packages to be added to the feed. + description: Array of IDs of the packages that are going to be added to the feed. schema: - type: object - properties: - packageReferences: - type: array - items: - type: string - example: 5c62bf36781e2b1c7c57daf4 + $ref: '#/definitions/PackageReferencesObject' responses: 202: $ref: '#/responses/JobIdResponse' 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/remove-package-references: + /v1/feeds/{feedId}/remove-package-references: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: RemovePackageReferences + x-ni-auth: true x-ni-operation: removePackageReferences tags: [feeds, packages] summary: Remove package references @@ -1345,39 +1461,33 @@ paths: - in: query name: deleteIfLastReference type: boolean - required: false description: A value indicating whether any packages that are no longer referenced after being removed from the feeds should be deleted. default: true - in: body name: packageReferences description: An array of package IDs to be removed from the feeds. schema: - type: object - properties: - packageReferences: - type: array - items: - type: string - example: 5c62bf36781e2b1c7c57daf4 + $ref: '#/definitions/PackageReferencesObject' responses: 202: $ref: '#/responses/JobIdResponse' 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/import: + /v1/feeds/{feedId}/import: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: ImportFeeds + x-ni-auth: true x-ni-operation: importFeeds tags: [feeds] summary: Import feeds into an existing feed @@ -1386,90 +1496,73 @@ paths: - in: query name: shouldCleanSourceFeeds type: boolean - required: false description: A value indicating whether only the most recent version of every package in the source feed should be added to the destination feed. If true, only the most recent version of each package will be added. If false, all versions of each package will be added. default: true - in: query name: shouldOverwrite type: boolean - required: false description: A query parameter that determines if existing packages with the same filename as a package to be added to the pool should be overwritten. default: false - in: query name: ignoreImportErrors type: boolean - required: false description: A query parameter that determines whether the service should abort the request if errors occur while importing some packages. If true, the service will abort and roll back the request if an error occurs while importing a package. If false, the service will import as many packages as it can, and return an error describing which packages could not be imported. default: false - in: body name: feeds description: An array containing the URIs of remote feeds whose packages should be added to the destination feed. Appending /Packages to each URI should yield the "Packages" file for that feed. schema: - type: object - properties: - feedUris: - type: array - items: - type: string - example: path/to/feed - feedIds: - type: array - items: - type: string - example: 5c62bf36781e2b1c7c57daf4 + $ref: '#/definitions/FeedUrisAndIds' responses: 202: $ref: '#/responses/JobIdResponse' 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/update-check: + /v1/feeds/{feedId}/update-check: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Read + operationId: CheckForUpdates + x-ni-auth: true x-ni-operation: checkForUpdates tags: [feeds] summary: Check for updates to a feed - description: Asynchronously checks for updates to a feed, based on the latest versions of the packages available in the package sources for that feed. Offers to upgrade packages in the feed to the latest version available, as well as add any new packages to the feed if new packages were added to the package sources. Returns the ID of a resource which can be queried to determine the status of the operation. Upon completion, the resource redirects to an array of UpdateDescriptor objects, describing the updates available for the feed. Remove any updates you don't want to apply, and then send the modified array to the "Apply updates to a feed" route below. + description: Asynchronously checks for updates to a feed, based on the latest versions of the packages available in the package sources for that feed. Offers to upgrade packages in the feed to the latest version available, as well as add any new packages to the feed if new packages were added to the package sources. Returns the ID of a resource which can be queried to determine the status of the operation. Upon completion, the resource redirects to an array of UpdateDescriptor objects, describing the updates available for the feed. Any routes that are not intended to be applied can be removed, and then send the modified array to the "Apply updates to a feed" route below. parameters: - in: body name: packageSources - description: An optional array of the IDs and/or external URIs of package sources which should be queried for updates. If not given, all of the feed's package sources will be checked. Package sources that are not present in the feed's array of package sources will be ignored. If you would like to add additional package sources to a feed, use the import route. + description: An optional array of the IDs and/or external URIs of package sources which should be queried for updates. If not given, all of the feed's package sources will be checked. Package sources that are not present in the feed's array of package sources will be ignored. Import route can be used for adding additional package sources. schema: - type: object - properties: - packageSources: - type: array - items: - type: string + $ref: '#/definitions/PackageSourcesObject' responses: 202: $ref: '#/responses/JobIdResponse' 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/update-apply: + /v1/feeds/{feedId}/update-apply: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: ApplyUpdates + x-ni-auth: true x-ni-operation: applyUpdates tags: [feeds] summary: Apply updates @@ -1478,13 +1571,11 @@ paths: - in: query name: shouldOverwrite type: boolean - required: false description: A query parameter that determines if existing packages with the same filename as a package to be added to the pool should be overwritten. default: false - in: query name: ignoreImportErrors type: boolean - required: false description: A query parameter that determines whether the service should abort the request if errors occur while importing some packages. If true, the service will abort and roll back the request if an error occurs while importing a package. If false, the service will import as many packages as it can, and return an error describing which packages could not be imported. default: false - in: body @@ -1498,19 +1589,20 @@ paths: 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/clean: + /v1/feeds/{feedId}/clean: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: CleanFeed + x-ni-auth: true x-ni-operation: cleanFeed tags: [feeds] summary: Clean a feed @@ -1519,19 +1611,20 @@ paths: 202: $ref: '#/responses/JobIdResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/feeds/{id}/import-store-items: + /v1/feeds/{feedId}/import-store-items: parameters: - in: path - name: id + name: feedId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" post: - x-ni-privilege: Write + operationId: ImportStoreItems + x-ni-auth: true x-ni-operation: importStoreItems tags: [feeds, store] summary: Import store items @@ -1539,20 +1632,13 @@ paths: parameters: - in: query name: shouldOverwrite - type: string - required: false - description: A query parameter that determines if existing packages with the same filename as a package to be added to the pool should be overwritten. + type: boolean + description: Determines if the existing packages with the same filename as the package to be added to the pool should be overwritten. default: false - in: body name: storeItemDescriptors schema: - type: object - description: A required array of objects which describe which specific store items to replicate. - properties: - storeItemDescriptors: - type: array - items: - $ref: '#/definitions/StoreItemDescriptor' + $ref: '#/definitions/StoreItemDescriptorsObject' responses: 202: $ref: '#/responses/JobIdResponse' @@ -1564,7 +1650,8 @@ paths: $ref: '#/definitions/Error' /v1/jobs: get: - x-ni-privilege: Read + operationId: ListJobs + x-ni-auth: true x-ni-operation: listJobs tags: [jobs] summary: List all jobs @@ -1574,7 +1661,7 @@ paths: name: id type: string required: false - description: A comma-delimited list of job ids. + description: A comma-delimited list of job IDs. - in: query name: operation type: string @@ -1589,31 +1676,27 @@ paths: name: resourceId type: string required: false - description: A comma-delimited list of resource ids. + description: A comma-delimited list of resource IDs. responses: 200: description: The request has succeeded. schema: - type: object - properties: - jobs: - type: array - items: - $ref: '#/definitions/Job' + $ref: '#/definitions/JobsResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/jobs/{id}: + /v1/jobs/{jobId}: parameters: - in: path - name: id + name: jobId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" get: - x-ni-privilege: Read + operationId: GetJob + x-ni-auth: true x-ni-operation: getJobs tags: [jobs] summary: Get job details @@ -1626,10 +1709,7 @@ paths: type: string description: Contains the relative URI of the job that was created for tracking the status of the operation. Execute a GET against this URI to get information about the status of the operation. schema: - type: object - properties: - job: - $ref: '#/definitions/Job' + $ref: '#/definitions/JobResponse' 303: description: If the job has completed, see Other with the Location header set to the URI of the created or modified resource. headers: @@ -1637,17 +1717,15 @@ paths: type: string description: Contains the relative URI of the job that was created for tracking the status of the operation. Execute a GET against this URI to get information about the status of the operation. schema: - type: object - properties: - job: - $ref: '#/definitions/Job' + $ref: '#/definitions/JobResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' /v1/can-write: get: - x-ni-privilege: Write + operationId: CheckWritePermission + x-ni-auth: true x-ni-operation: canWrite tags: [misc] summary: Check if the logged user can write @@ -1656,19 +1734,20 @@ paths: 200: description: The request has succeeded. 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/updates/{id}: + /v1/updates/{updateDescriptorListId}: parameters: - in: path - name: id + name: updateDescriptorListId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" get: - x-ni-privilege: Read + operationId: GetUpdateDescriptors + x-ni-auth: true x-ni-operation: getUpdateDescriptors tags: [updates] summary: Retrieve updates for a feed @@ -1677,14 +1756,15 @@ paths: 200: description: The request has succeeded. schema: - $ref: '#/definitions/UpdateDescriptorResponse' + $ref: '#/definitions/UpdateDescriptorsResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' /v1/store/items: get: - x-ni-privilege: Read + operationId: QueryStoreItems + x-ni-auth: true x-ni-operation: getStoreItems tags: [store] summary: Query store items @@ -1694,49 +1774,37 @@ paths: name: query type: string description: A search string. E.g., "labview". - required: false + default: "" - in: query name: pageSize - type: number + type: integer description: How many results should be returned in the response. - required: false + default: 10 - in: query name: pageNumber - type: number + type: integer description: The page of the response to return. - required: false + default: 0 responses: 200: description: The request has succeeded. schema: - type: object - properties: - items: - type: array - items: - $ref: '#/definitions/StoreItem' - pageSize: - type: number - pageNumber: - type: number - totalPages: - type: number - totalItems: - type: number + $ref: '#/definitions/StoreItemsExtendedResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' - /v1/store/items/{id}: + /v1/store/items/{storeItemId}: parameters: - in: path - name: id + name: storeItemId description: The ID of this resource. type: string required: true x-example: "5c5d49f2781e2b2cd045267b" get: - x-ni-privilege: Read + operationId: GetStoreItem + x-ni-auth: true x-ni-operation: getStoreItems tags: [store] summary: Get a store item @@ -1745,17 +1813,15 @@ paths: 200: description: The request has succeeded. schema: - type: object - properties: - storeItem: - $ref: '#/definitions/StoreItem' + $ref: '#/definitions/StoreItemResponse' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' /v1/replicate-store-item: post: - x-ni-privilege: Write + operationId: ReplicateStoreItem + x-ni-auth: true x-ni-operation: replicateStoreItem tags: [store] summary: Replicate a store item @@ -1766,13 +1832,11 @@ paths: type: boolean description: A query parameter that determines if existing packages with the same filename as a package to be added to the pool should be overwritten. default: false - required: false - in: query name: split type: boolean description: A query parameter that determines if the store item should be merged into one feed, or if each feed in the store item should be copied into a separate feed. default: false - required: false - in: body name: feedRequest schema: @@ -1783,6 +1847,6 @@ paths: 400: $ref: '#/definitions/Error' 401: - $ref: '#/definitions/Unauthorized' + $ref: '#/definitions/Unauthorized' default: $ref: '#/definitions/Error' diff --git a/service-registry/niserviceregistry.yml b/service-registry/niserviceregistry.yml new file mode 100644 index 0000000..4db5893 --- /dev/null +++ b/service-registry/niserviceregistry.yml @@ -0,0 +1,116 @@ +swagger: '2.0' +info: + version: '1' + title: Service Registry Web Service + description: View information about installed SystemLink services + contact: + name: National Instruments + url: 'https://www.ni.com/systemlink' + email: support@ni.com +basePath: /niserviceregistry +consumes: + - application/json +produces: + - application/json +definitions: + Statement: + description: Contains information about a statement + type: object + properties: + actions: + description: Contains information about actions that can be performed + type: array + items: + type: string + example: ['asset:*'] + type: + description: Contains information about the resource type for which the statement applies + type: string + example: "asset" + Translation: + description: Contains translation information for a permission configuration + type: object + properties: + en-us: + description: The united states english permission name translation + type: string + example: "All" + zn-ch: + description: The traditional chinese permission name translation + type: string + example: "所有" + de: + description: The german permission name translation + type: string + example: "Alle" + ja: + description: The japanese permission name translation + type: string + example: "すべて" + Permission: + description: Contains information about a installed permission + type: object + properties: + id: + description: The ID of the permission + type: string + example: "1242342" + translation: + $ref: '#/definitions/Translation' + statements: + type: array + items: + $ref: '#/definitions/Statement' + Privilege: + description: Contains information about a installed privilege + type: object + properties: + id: + description: The ID of the privilege + type: string + example: "12314121" + show: + description: Specifies whether this privilege is user visible + type: boolean + example: true + showResource: + description: Specifies whether the resource specificity to be shown + type: boolean + example: false + permissions: + type: array + items: + $ref: '#/definitions/Permission' +responses: + PrivilegeResponse: + description: Response containing a list of installed privileges + schema: + description: Response containing a list of installed privileges + title: Privilege Response + type: object + required: + - privileges + properties: + privileges: + description: Array of installed privilege information + type: array + items: + $ref: '#/definitions/Privilege' + Unauthorized: + description: Not authorized + headers: + WWW_Authenticate: + description: Information for how to authenticate + type: string +paths: + /v1/privileges: + get: + tags: [privileges] + summary: Get installed SystemLink privilege configuration + description: Gets information about installed privileges + operationId: get-privileges + responses: + 200: + $ref: '#/responses/PrivilegeResponse' + 401: + $ref: '#/responses/Unauthorized' \ No newline at end of file diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index 712d646..9a02235 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -193,6 +193,8 @@ definitions: timeout: 600 refresh_minion_cache: grains: true + error: + $ref: '#/definitions/Error' required: [jid, tgt, fun] RegisterSystemsRequest: @@ -210,6 +212,13 @@ definitions: description: Whether to activate the systems or not. default: false example: true + workspaces: + description: List containing the corresponding workspace for each system credential information. + type: array + items: + type: string + description: The ID of the workspace. + example: '5bc5e9092a4fa4c71cfa7197' required: [systemsCredentials] SystemCredentials: @@ -243,6 +252,8 @@ definitions: description: The ID of the registration request. type: string example: '068530b9-b059-4c0e-9820-9e9cc4e0832c' + error: + $ref: '#/definitions/Error' required: [requestId] UnregisterSystemsRequest: @@ -691,6 +702,10 @@ definitions: description: The alias of the system. type: string example: testVM + workspace: + type: string + description: The ID of the workspace. + example: '5bc5e9092a4fa4c71cfa7197' activation: description: Activation information. type: object @@ -846,7 +861,7 @@ definitions: example: owner: admin required: [lastUpdatedTimestamp, data] - required: [id, createdTimestamp, lastUpdatedTimestamp, connected] + required: [id, createdTimestamp, lastUpdatedTimestamp, connected, workspace] ReportType: title: Report Type @@ -1040,6 +1055,10 @@ definitions: type: string description: A string representing the public authorization key. If this field is specified, verification that the system ID is associated with this auth key will happen before the desired action is executed. example: -----BEGIN PUBLIC KEY-----↵MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlFgEKiRwWBD/QSDHCpNQ↵Zml9q224YzIxG6reByDV16BNsQoH0lc2bT9LZ7o6xf6dTpQl7shIMc/abSAcl4/F↵VpKguH1yRmOG2Nhout/9wMP6kYBTlThzpop93rlxIo/I7nDkQDz07cMhNWYDvrut↵PVnjRg70xOCAzQRCHRy4GW3TLvfp2WAbCuoQ5oPHQLx+YBSRYDcgfo9jiW8vNzt4↵Bcg72c2PmHEJjGslzJeqcKdRjK0z4/VFgLYfMUBz4LCoy7DohU/uc9ZbHSlOy/BK↵1/S8O1vUyk8DEq+/kQumJWKh1Cl0SWcZGSDkdhQhoTiWqXGb1BBtU7vkxYgQoYjM↵rwIDAQAB↵-----END PUBLIC KEY----- + workspace: + type: string + description: The ID of the workspace. + example: '5bc5e9092a4fa4c71cfa7197' required: [id, action] required: [keyActions] @@ -1068,7 +1087,42 @@ definitions: description: The new alias of the system. type: string example: testVM - + workspace: + type: string + description: The ID of the workspace. + example: '5bc5e9092a4fa4c71cfa7197' + + UpdateSystemsRequest: + description: List of systems and metadata to be updated. + title: Update Systems Request + type: object + properties: + SystemsUpdateInformation: + description: The list of system ids and changes. + type: array + items: + description: System ids and changes that need to be applied to the systems. + title: SystemUpdateInformation + type: object + properties: + systemId: + type: string + description: The system id. + example: 'VMware_Virtual_Platform--SN-VMware-56_4d_d2_08_ce_89_1b_70-e6_32_fc_21_6c_d0_d9_f9--MAC-00-0C-29-D0-D9-F9' + systemMetadata: + $ref: '#/definitions/SystemMetadata' + + SystemMetadata: + description: System metadata to be updated. + title: SystemMetadata + x-ni-sparse: true + type: object + properties: + workspace: + type: string + description: The ID of the workspace. + example: '5bc5e9092a4fa4c71cfa7197' + QueryAvailablePackagesRequest: title: Get Available Packages Request description: Request to get the available packages from the feeds specified in the request. @@ -1484,7 +1538,13 @@ definitions: projection: type: string example: 'new(id,grains,lastUpdatedTimestamp)' - description: Specifies the projection for resources. This field can be used if we don't want to receive the entire model but only certain properties of the model. + description: >- + Specifies the projection for resources. Use this field to receive specific properties of the model. + + Examples: + - 'new(id,connected)' + - 'new(id,alias,grains.data.host as host)' + - 'new(id,lastUpdatedTimestamp,properties.data.location as location)' orderBy: type: string example: 'lastUpdatedTimestamp descending' @@ -1576,7 +1636,13 @@ definitions: projection: type: string example: 'new(id,jid,state,lastUpdatedTimestamp,config.fun as fun)' - description: Specifies the projection for resources. This field can be used if we don't want to receive the entire model but only certain properties of the model. + description: >- + Specifies the projection for resources. Use this field to receive specific properties of the model. + + Examples: + - 'new(id,jid,state)' + - 'new(id,jid,config.user as user)' + - 'new(id,jid,state,lastUpdatedTimestamp,metadata.queued as queued)' orderBy: type: string example: 'lastUpdatedTimestamp descending' @@ -1626,7 +1692,6 @@ paths: /: get: operationId: HandleGetVersionInfo - x-ni-request-all-privileges: true summary: API information tags: [versioning] security: [] @@ -1649,7 +1714,6 @@ paths: /{version}: get: operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true summary: API version information description: Returns available operations for a single version of the API. tags: [versioning] @@ -1673,7 +1737,7 @@ paths: /v1/jobs: post: operationId: CreateJob - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: createOrCancelJobs x-ni-request-timeout: 300000 x-ni-request-variables: [REMOTE_USER, USER_NAME] @@ -1700,7 +1764,7 @@ paths: $ref: '#/responses/Error' get: operationId: GetJobs - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getJobs x-ni-request-timeout: 120000 tags: [jobs] @@ -1741,7 +1805,7 @@ paths: /v1/systems: get: operationId: GetSystems - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems x-ni-request-timeout: 120000 tags: [systems] @@ -1769,7 +1833,7 @@ paths: /v1/register-systems: post: operationId: RegisterSystems - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: manageSystems tags: [systems] summary: Register systems @@ -1795,9 +1859,10 @@ paths: /v1/remove-systems: post: operationId: UnregisterSystems - x-ni-privilege: Write + x-ni-auth: true x-ni-request-timeout: 180000 x-ni-operation: manageSystems + x-ni-request-variables: [REMOTE_USER, USER_NAME] tags: [systems] summary: Unregister Systems description: Request to unregister systems. @@ -1822,7 +1887,7 @@ paths: /v1/cancel-jobs: post: operationId: CancelJobs - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: createOrCancelJobs x-ni-request-timeout: 120000 tags: [jobs] @@ -1853,7 +1918,7 @@ paths: /v1/activate-systems: post: operationId: ActivateSystems - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: activateSystems x-ni-request-timeout: 120000 tags: [systems] @@ -1887,7 +1952,7 @@ paths: /v1/get-discovered-systems: get: operationId: GetDiscoveredSystems - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems tags: [systems] summary: Get discovered systems @@ -1906,7 +1971,7 @@ paths: /v1/get-systems-summary: get: operationId: GetSystemsSummary - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems tags: [systems] summary: Get systems summary @@ -1923,7 +1988,7 @@ paths: /v1/get-jobs-summary: get: operationId: GetJobsSummary - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getJobs tags: [jobs] summary: Get jobs summary @@ -1940,7 +2005,7 @@ paths: /v1/configure-feeds: post: operationId: ConfigureAndUpdateMultipleFeeds - x-ni-privilege: Read + x-ni-auth: true x-ni-request-timeout: 360000 x-ni-operation: manageFeeds tags: [feeds] @@ -1967,7 +2032,7 @@ paths: /v1/get-discovered-systems-summary: get: operationId: GetDiscoveredSystemsSummary - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems tags: [systems] summary: Get discovered systems summary @@ -1984,7 +2049,7 @@ paths: /v1/get-pending-systems-summary: get: operationId: GetPendingSystemsSummary - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems x-ni-request-timeout: 120000 tags: [systems] @@ -2002,7 +2067,7 @@ paths: /v1/generate-systems-report: post: operationId: GetSystemsReport - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems x-ni-request-timeout: 120000 tags: [systems] @@ -2015,9 +2080,6 @@ paths: required: true schema: $ref: '#/definitions/SystemsReportRequest' - produces: - - text/csv - - application/json responses: 200: description: OK. @@ -2025,8 +2087,8 @@ paths: description: The file data type: file examples: - application/octet-stream: - File data + text/csv: + Systems report file data 400: $ref: '#/responses/BadRequest' 401: @@ -2036,7 +2098,7 @@ paths: /v1/create-groups: post: operationId: CreateGroups - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: createOrUpdateGroups tags: [groups] summary: Create groups @@ -2066,7 +2128,7 @@ paths: /v1/groups: get: operationId: GetGroups - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getGroups tags: [groups] summary: Get groups @@ -2094,7 +2156,7 @@ paths: /v1/remove-groups: post: operationId: RemoveGroups - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: createOrUpdateGroups tags: [groups] summary: Remove groups @@ -2125,7 +2187,7 @@ paths: /v1/add-systems-to-groups: post: operationId: AddSystemsToGroups - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: createOrUpdateGroups tags: [groups] summary: Add systems to groups @@ -2153,7 +2215,7 @@ paths: /v1/remove-systems-from-groups: post: operationId: RemoveSystemsFromGroups - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: createOrUpdateGroups tags: [groups] summary: Remove systems from groups @@ -2181,7 +2243,7 @@ paths: /v1/obtain-systems-info: post: operationId: GetSystemsInfo - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems tags: [systems] summary: Get systems info @@ -2211,7 +2273,7 @@ paths: /v1/get-systems-keys: get: operationId: GetSystemsKeys - x-ni-privilege: Read + x-ni-auth: true x-ni-request-timeout: 120000 tags: [systems] x-ni-operation: getSystems @@ -2229,7 +2291,7 @@ paths: /v1/manage-systems-keys: post: operationId: ManageSystemsKeys - x-ni-privilege: Write + x-ni-auth: true x-ni-request-timeout: 300000 x-ni-operation: manageSystems tags: [systems] @@ -2258,7 +2320,7 @@ paths: /v1/systems/managed/{id}: patch: operationId: UpdateMetadata - x-ni-privilege: Write + x-ni-auth: true x-ni-operation: updateSystemMetadata consumes: - application/merge-patch+json @@ -2291,10 +2353,34 @@ paths: $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' + /v1/update-systems: + post: + operationId: UpdateSystemsMetadata + x-ni-auth: true + x-ni-operation: updateSystemMetadata + tags: [systems] + summary: Update systems metadata + description: Update metadata for a list of systems. + parameters: + - in: body + name: UpdateSystemsRequest + required: true + description: The new metadata associated with a list of systems. + schema: + $ref: '#/definitions/UpdateSystemsRequest' + responses: + 200: + $ref: '#/responses/PartialSuccess' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' /v1/query-available-packages: post: operationId: GetAvailablePackagesByQuery - x-ni-privilege: Read + x-ni-auth: true x-ni-request-timeout: 300000 x-ni-operation: manageFeeds tags: [feeds] @@ -2325,7 +2411,7 @@ paths: /v1/query-jobs: post: operationId: GetJobsByQuery - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getJobs x-ni-request-timeout: 120000 tags: [jobs] @@ -2354,7 +2440,7 @@ paths: /v1/query-systems: post: operationId: GetSystemsByQuery - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getSystems x-ni-request-timeout: 120000 tags: [systems] diff --git a/systems-state/nisystemsstate.yml b/systems-state/nisystemsstate.yml index 576b84d..e776e98 100644 --- a/systems-state/nisystemsstate.yml +++ b/systems-state/nisystemsstate.yml @@ -1,6 +1,6 @@ swagger: '2.0' info: - description: "Creates and manages states you can apply applied to managed systems." + description: "Creates and manages states you can apply to managed systems." version: "1" title: "SystemLink Systems State Manager" contact: @@ -299,6 +299,10 @@ definitions: type: string format: date-time example: '2018-05-07T18:58:05.219692Z' + workspace: + type: string + description: The ID of the workspace. This property is available starting with version 3 of the getStates operation. + example: '5bc5e9092a4fa4c71cfa7197' required: - id - name @@ -307,6 +311,7 @@ definitions: - architecture - createdTimestamp - lastUpdatedTimestamp + - workspace StateDescriptionListResponse: description: The response containing a list of state metadata. @@ -330,6 +335,7 @@ definitions: architecture: x64 createdTimestamp: '2018-05-07T18:58:05.219692Z' lastUpdatedTimestamp: '2018-05-07T18:58:05.219692Z' + workspace: '5bc5e9092a4fa4c71cfa7197' - id: '5bcde471fc13379595ce9b13' name: emacs description: Having Emacs installed on the windows system. @@ -337,6 +343,7 @@ definitions: architecture: x86 createdTimestamp: '2018-05-07T18:58:05.219692Z' lastUpdatedTimestamp: '2018-05-07T18:58:05.219692Z' + workspace: '5bc5e9092a4fa4c71cfa7198' required: - totalCount - states @@ -366,6 +373,10 @@ definitions: type: array items: $ref: '#/definitions/Package' + workspace: + type: string + description: The ID of the workspace. This property is available starting with version 3 of the createOrUpdateStates operation. + example: '5bc5e9092a4fa4c71cfa7197' required: - name - distribution @@ -401,6 +412,10 @@ definitions: type: string description: Description of the change operation. example: I've changed the state + workspace: + type: string + description: The ID of the workspace. This property is available starting with version 3 of the createOrUpdateStates operation. + example: '5bc5e9092a4fa4c71cfa7197' StateResponse: description: System state object. @@ -449,6 +464,10 @@ definitions: type: boolean description: Whether the state contains extra operations in addition to feeds and packages. example: true + workspace: + type: string + description: The ID of the workspace. This property is available starting with version 3 of the getStates operation. + example: '5bc5e9092a4fa4c71cfa7197' required: - id - name @@ -458,6 +477,7 @@ definitions: - createdTimestamp - lastUpdatedTimestamp - containsExtraOperations + - workspace StateVersion: description: A given version of a state. @@ -550,11 +570,11 @@ paths: /: get: operationId: HandleGetVersionInfo - x-ni-request-all-privileges: true + x-ni-auth: true summary: API information tags: [versioning] security: [] - description: Gets permissions and operations for the States Service. + description: Gets permissions and operations for the States Service. This API now includes organizational modeling, starting with version 3 of getStates and createOrUpdateStates operations. This route doesn't return granular permissions, but the operation is available if the current user has the corresponding access to at least one resource, regardless of the workspace. We recommend using the User Service API instead. responses: 200: description: OK @@ -573,9 +593,9 @@ paths: /{version}: get: operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true + x-ni-auth: true summary: API version information - description: Returns available operations for a single version of the API. + description: Returns available operations for a single version of the API. This API now includes organizational modeling, starting with version 3 of getStates and createOrUpdateStates operations. This route doesn't return granular permissions, but the operation is available if the current user has the corresponding access to at least one resource, regardless of the workspace. We recommend using the User Service API instead. tags: [versioning] security: [] parameters: @@ -597,7 +617,7 @@ paths: /v1/states: get: operationId: GetStates - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getStates tags: [states] summary: Get all system states @@ -626,7 +646,7 @@ paths: $ref: '#/responses/Error' post: operationId: CreateState - x-ni-privilege: nisystemsstate.Write + x-ni-auth: true x-ni-operation: createOrUpdateStates tags: [states] summary: Create a new system state @@ -654,11 +674,11 @@ paths: /v1/states/{id}: get: operationId: GetState - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getStates tags: [states] summary: Get system state - description: Returns the metadata, feeds, and packages from the state content. If the state contains only feed and package entries, the containsExtraOperations property of the response will be false. Otherwise, it will be true. You may use the export route to get all state content. + description: Returns the metadata, feeds, and packages from the state content. If the state contains only feed and package entries, the containsExtraOperations property of the response will be false. You may use the export route to get all state content. parameters: - name: id in: path @@ -678,7 +698,7 @@ paths: $ref: '#/responses/Error' patch: operationId: UpdateState - x-ni-privilege: nisystemsstate.Write + x-ni-auth: true x-ni-operation: createOrUpdateStates consumes: - application/merge-patch+json @@ -714,7 +734,7 @@ paths: $ref: '#/responses/Error' delete: operationId: DeleteState - x-ni-privilege: nisystemsstate.Write + x-ni-auth: true x-ni-operation: deleteStates tags: [states] summary: Delete state @@ -737,7 +757,7 @@ paths: /v1/replace-state-content: post: operationId: ReplaceContent - x-ni-privilege: nisystemsstate.Write + x-ni-auth: true x-ni-operation: createOrUpdateStates tags: [states] summary: Replace the content of a state @@ -775,7 +795,7 @@ paths: /v1/states/{id}/history: get: operationId: GetStateHistory - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getStates tags: [history] summary: Get state history @@ -812,11 +832,11 @@ paths: /v1/states/{id}/history/{version}: get: operationId: GetStateVersion - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getStates tags: [history] summary: Get state by version - description: Returns the snapshot of a state at a specific version. Returns the metadata, feeds, and packages from the state content. If the state contains only feed and package entries, the containsExtraOperations property of the response will be false. Otherwise, it will be true. You may use the export route to get all state content. + description: Returns the snapshot of a state at a specific version. Returns the metadata, feeds, and packages from the state content. If the state contains only feed and package entries, the containsExtraOperations property of the response will be false. You may use the export route to get all state content. parameters: - name: id in: path @@ -842,7 +862,7 @@ paths: /v1/export-state: post: operationId: ExportState - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getStates tags: [states] summary: Export a state @@ -873,7 +893,7 @@ paths: /v1/import-state: post: operationId: ImportState - x-ni-privilege: nisystemsstate.Write + x-ni-auth: true x-ni-operation: createOrUpdateStates tags: [states] summary: Import a state @@ -907,6 +927,9 @@ paths: - x64 - x86 required: true + - in: formData + name: workspace + type: string responses: 201: description: Created @@ -923,7 +946,7 @@ paths: /v1/export-state-from-system: post: operationId: ExportStateFromSystem - x-ni-privilege: Read + x-ni-auth: true x-ni-operation: getStates tags: [states] summary: Export the state of a system by providing its ID. @@ -935,9 +958,6 @@ paths: required: true schema: $ref: '#/definitions/ExportStateFromSystemRequest' - produces: - - text/x-yaml - - application/json responses: 200: description: OK @@ -945,8 +965,8 @@ paths: description: The file data type: file examples: - application/octet-stream: - File data + text/x-yaml: + State file data 401: $ref: '#/responses/Unauthorized' default: @@ -954,7 +974,7 @@ paths: /v1/delete-states: post: operationId: DeleteStates - x-ni-privilege: nisystemsstate.Write + x-ni-auth: true x-ni-operation: deleteStates tags: [states] summary: Delete states @@ -984,7 +1004,7 @@ paths: /v1/revert-state-version: post: operationId: RevertStateToVersion - x-ni-privilege: nisystemsstate.Write + x-ni-auth: true x-ni-operation: createOrUpdateStates tags: [history] summary: Revert a state diff --git a/tag-rule/nitagrule.yml b/tag-rule/nitagrule.yml index 54b8ce7..95e49b1 100644 --- a/tag-rule/nitagrule.yml +++ b/tag-rule/nitagrule.yml @@ -42,11 +42,33 @@ definitions: type: array items: type: string + resourceType: + description: Type of resource associated with the error. + This field is only present for entries in *innerErrors*. + type: string + enum: [tagRule] + resourceId: + description: Identifier of the resource associated with the error. + This field is only present for entries in *innerErrors*. + type: string + innerErrors: + description: Array of individual errors when a request results in multiple errors. + This field is only present when *name* is 'Skyline.OneOrMoreErrorsOccurred'. + type: array + items: + $ref: '#/definitions/Error' example: - name: TagRuleEngine.RuleNotFound - code: -253103 - message: A rule with ID '5c2cf7e0e0d64403b486fcb4' was not found. + name: Skyline.OneOrMoreErrorsOccurred + code: -251041 + message: One or more errors occurred. See the contained list for details of each error. args: [] + innerErrors: + - name: TagRuleEngine.RuleNotFound + code: -253103 + message: A rule with ID '5c2cf7e0e0d64403b486fcb4' was not found. + resourceType: tagRule + resourceId: 5c2cf7e0e0d64403b486fcb4 + args: [5c2cf7e0e0d64403b486fcb4] Operation: description: Operation provided by the API type: object @@ -162,7 +184,7 @@ definitions: key1: value1 RuleCommonFields: title: Rule Common Fields - description: A single-sourced definition of available fields in both an udpate request and the rule type + description: A single-sourced definition of available fields in both an update request and the rule type itself. properties: searchPath: @@ -170,6 +192,11 @@ definitions: a single tag's path, or a string containing wildcard characters which can match multiple tags. type: string example: '*.System.Health.DiskUsePercentage' + workspace: + description: The ID of the workspace to which this rule belongs. Added in version 2 of the + readRules operation. + type: string + example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841 tagDataType: $ref: '#/definitions/TagDataType' conditions: @@ -241,7 +268,6 @@ paths: summary: API information description: Returns information about API versions and available operations. operationId: RootEndpoint - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -271,7 +297,6 @@ paths: summary: API version information description: Returns available operations for a single version of the API. operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -308,6 +333,12 @@ paths: a single tag's path, or a string containing wildcard characters which can match multiple tags. type: string example: '*.System.Health.DiskUsePercentage' + workspace: + description: The ID of the workspace in which to create or update the rule. When not specified, + the default workspace is used based on the requesting user. Added in version 2 of the + writeRules operation. + type: string + example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841 tagDataType: $ref: '#/definitions/TagDataType' conditions: @@ -439,8 +470,34 @@ paths: type: string example: [5c40ec55e0d6441168b4c543, 5c40ec55e0d6441168b4c543] responses: + 200: + description: Partial Success - Indicates the request to delete was processed successfully, + but one or more rules failed to delete. The included *error* object will contain + an entry in the *innerErrors* array for each failed rule. + schema: + type: object + title: DeleteRulesPartialSuccess + properties: + deleted: + description: The *ruleId*s of the rules that were successfully deleted. + type: array + items: + type: string + example: + - 5c33c212e0d6444320d9a9f4 + failed: + description: The *ruleId*s of the rules that were not deleted. + See *error* for why each rule failed to delete. Reasons include the + rule could not be found or the caller is not authorized to delete the rule. + type: array + items: + type: string + example: + - 5c2cf7e0e0d64403b486fcb4 + error: + $ref: '#/definitions/Error' 204: - description: No Content + description: Success - Indicated all requested rules were deleted successfully. 401: $ref: '#/responses/Unauthorized' default: @@ -493,6 +550,8 @@ paths: items: type: string example: [5c40ec55e0d6441168b4c541] + error: + $ref: '#/definitions/Error' 401: $ref: '#/responses/Unauthorized' default: @@ -551,6 +610,14 @@ paths: example: - keyword1 - keyword2 + workspaces: + type: array + description: Workspace query. The service will return rules whose *workspace* field is one of + the specified workspaces. Added in version 2 of the readRules operation. + items: + type: string + example: + - '*' skip: description: Number of entries to skip in the response list. Typically used in combination with the take parameter to implement pagination. @@ -582,3 +649,61 @@ paths: $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' + /v1/duplicate-rules: + post: + tags: [rules] + summary: Duplicate rules + description: Duplicates multiple rules into a given workspace + operationId: DuplicateRules + x-ni-operation: writeRules + parameters: + - in: body + name: Request body + required: true + schema: + title: DuplicateRequestBody + type: object + required: + - ids + - workspace + properties: + ids: + description: The IDs of the rules which should be duplicated. + type: array + items: + type: string + example: [5c40ec55e0d6441168b4c543, 5c40ec55e0d6441168b4c543] + workspace: + description: The ID of the workspace in which to duplicate the specified rules. + type: string + example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841 + responses: + 200: + description: OK + schema: + title: DuplicateResponse + type: object + properties: + duplicatedIds: + description: A dictionary where the keys are the IDs of the rules which were successfully + duplicated, and the values are the IDs of the new duplicate rules. + type: object + additionalProperties: + type: string + example: + 5c40ec55e0d6441168b4c543: 5c40ec55e0d6441168b4c545 + 5c40ec55e0d6441168b4c544: 5c40ec55e0d6441168b4c546 + failed: + description: The IDs of the rules which were failed to be duplicated. + See *error* for why each rule failed to duplicate. Reasons include the + rule could not be found or the caller is not authorized to create the rule. + type: array + items: + type: string + example: [5c40ec55e0d6441168b4c541] + error: + $ref: '#/definitions/Error' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' \ No newline at end of file diff --git a/tag/nitag.yml b/tag/nitag.yml index ebfc674..331c19a 100644 --- a/tag/nitag.yml +++ b/tag/nitag.yml @@ -910,6 +910,12 @@ paths: description: Number of entries to include in the response list. Typically used in combination with the skip parameter to implement pagination. type: integer default: 100000 + - in: query + name: workspace + description: Workspace to search for tags + type: string + required: false + x-example: "b71390c0-977b-4153-a939-487b0b7a1fa5" responses: 200: $ref: '#/responses/GetTagsResponse' @@ -981,12 +987,47 @@ paths: description: Number of entries to include in the response list. Typically used in combination with the skip parameter to implement pagination. type: integer default: 100000 - /v2/tags-with-values/{path}: + - in: query + name: workspace + description: Workspace to search for tags + type: string + required: false + x-example: "b71390c0-977b-4153-a939-487b0b7a1fa5" + /v2/tags-with-values/{workspace}/{path}: get: tags: - tags description: Get a tag and its value summary: Returns a tag and its current value + operationId: GetTagWithValueInWorkspace + parameters: + - in: path + name: workspace + type: string + required: true + x-example: "b71390c0-977b-4153-a939-487b0b7a1fa5" + - in: path + name: path + type: string + required: true + x-example: my-tag-1 + responses: + 200: + schema: + $ref: '#/definitions/TagWithValue' + description: Success + 400: + description: Bad Request + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v2/tags-with-values/{path}: + get: + tags: + - tags + description: Get a tag and its value from the default workspace + summary: Returns a tag and its current value operationId: GetTagWithValue parameters: - in: path @@ -1075,13 +1116,41 @@ paths: tags: - tags summary: Get the aggregates and current value of a tag - description: Returns the current aggregate values for the tag at the path. + description: Returns the current aggregate values for the tag at the path from the default workspace. operationId: GetTagValues parameters: - in: path name: path type: string required: true + x-example: my-tag-1 + responses: + 200: + description: Success + schema: + $ref: '#/definitions/TagCurrentAndAggregateValue' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v2/tags/{workspace}/{path}/values: + get: + tags: + - tags + summary: Get the aggregates and current value of a tag + description: Returns the current aggregate values for the tag at the path. + operationId: GetTagValuesInWorkspace + parameters: + - in: path + name: workspace + type: string + required: true + x-example: "b71390c0-977b-4153-a939-487b0b7a1fa5" + - in: path + name: path + type: string + required: true + x-example: my-tag-1 responses: 200: description: Success @@ -1288,7 +1357,7 @@ paths: tags: - tag aggregates summary: Reset the aggregates of a tag - description: Resets aggregate values for a tag. + description: Resets aggregate values for a tag from the default workspace. operationId: ResetTagAggregates parameters: - in: path @@ -1296,6 +1365,35 @@ paths: description: Tag path type: string required: true + x-example: my-tag-1 + responses: + 200: + description: Success + 204: + description: No content (Sent only from SystemLink Server) + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v2/tags/{workspace}/{path}/reset-aggregates: + post: + tags: + - tag aggregates + summary: Reset the aggregates of a tag + description: Resets aggregate values for a tag. + operationId: ResetTagAggregatesInWorkspace + parameters: + - in: path + name: workspace + type: string + required: true + x-example: "b71390c0-977b-4153-a939-487b0b7a1fa5" + - in: path + name: path + description: Tag path + type: string + required: true + x-example: my-tag-1 responses: 200: description: Success @@ -1413,6 +1511,87 @@ paths: schema: $ref: '#/definitions/TagQuery' required: true + /v2/tags/{workspace}/{path}: + put: + tags: + - tags + summary: Create or replace a tag in the given workspace + description: Replaces the tag at the location path specifies. If a tag does not exist where the path specifies, one is created. + operationId: CreateOrReplaceTagInWorkspace + parameters: + - in: path + name: workspace + description: Workspace + type: string + required: true + - in: path + name: path + description: Tag path + type: string + required: true + - in: body + name: tag + description: Tag to create or replace. A complete resource representation must be sent (no partial updates). + schema: + $ref: '#/definitions/Tag' + required: true + responses: + 201: + description: 'Created: Tag created successfully' + 204: + description: 'No Content: Tag replaced successfully' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + get: + tags: + - tags + summary: Get a tag from the given workspace + description: Returns the metadata for a tag. + operationId: GetTagInWorkspace + parameters: + - in: path + name: workspace + description: Workspace + type: string + required: true + - in: path + name: path + description: Tag path + type: string + required: true + responses: + 200: + description: Success + schema: + $ref: '#/definitions/Tag' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + delete: + tags: + - tags + summary: Delete a tag from the given workspace + description: Deletes a tag + operationId: DeleteTagInWorkspace + parameters: + - in: path + name: workspace + description: Workspace + type: string + required: true + - in: path + name: path + description: Tag path + type: string + required: true + responses: + 204: + description: 'No content: Tag deleted successfully' + default: + $ref: '#/responses/Error' definitions: Error: @@ -1502,6 +1681,12 @@ definitions: count: description: Count value from the tag's aggregates type: integer + workspace: + type: string + example: + path: foo + count: 1 + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithCurrentAndAggregateValue: description: Tag path with its current value and aggregates type: object @@ -1513,6 +1698,8 @@ definitions: $ref: '#/definitions/TimestampedTagValue' aggregates: $ref: '#/definitions/V2TagAggregates' + workspace: + type: string example: path: foo current: @@ -1524,6 +1711,7 @@ definitions: max: "5.0" avg: 2.0 count: 5 + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithTimestampedValue: description: Tag path with timestamped value type: object @@ -1534,6 +1722,16 @@ definitions: description: Tag path current: $ref: '#/definitions/TimestampedTagValue' + workspace: + type: string + example: + path: foo + current: + value: + type: DOUBLE + value: "3.14" + timestamp: '2018-09-04T18:45:08Z' + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithValue: description: Tag path with value type: object @@ -1544,6 +1742,14 @@ definitions: description: Tag path current: $ref: '#/definitions/TagValue' + workspace: + type: string + example: + path: foo + current: + type: DOUBLE + value: "3.14" + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithTimestamp: type: object title: Tag Path with Timestamp @@ -1556,6 +1762,12 @@ definitions: example: '2018-09-04T18:45:08Z' path: type: string + workspace: + type: string + example: + timestamp: '2018-09-04T18:45:08Z' + path: foo + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithMaxAggregate: type: object title: Tag Path With Max Aggregate @@ -1565,6 +1777,12 @@ definitions: max: description: Maximum value from the tag's aggregates type: string + workspace: + type: string + example: + path: foo + max: "1" + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithMinAggregate: type: object title: Tag Path with Min Aggregate @@ -1574,6 +1792,12 @@ definitions: min: description: Minimum value from the tag's aggregates type: string + workspace: + type: string + example: + path: foo + min: "1" + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithMeanAggregate: type: object title: Tag Path with Mean Aggregate @@ -1584,6 +1808,12 @@ definitions: description: Mean value from the tag's aggregates type: number format: double + workspace: + type: string + example: + path: foo + avg: 1 + workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagQuery: type: object title: Tag Query @@ -1631,13 +1861,15 @@ definitions: - keywords: Tag keywords. Example: keywords.Contains(x) - properties: Tag properties. Example: properties['x'] = 'y' + + - workspace : The workspace of the tags. Example: 88974b87-07d4-4f84-b54f-48eec89b11ed orderBy: description: >- The tag value property to order results by; value and timestamp are from the current tag value. When ordering by value, tags will be grouped by type, first numbers (INT, DOUBLE, U_INT64), then strings, then booleans, then times. Null values will be at the end of the list regardless of type. type: string - enum: [PATH, VALUE, TIMESTAMP] + enum: [PATH, VALUE, TIMESTAMP, WORKSPACE] default: PATH descending: description: A Boolean that determines whether to return the tags in descending order @@ -1767,6 +1999,8 @@ definitions: type: string collectAggregates: type: boolean + workspace: + type: string example: type: DOUBLE properties: @@ -1775,6 +2009,7 @@ definitions: path: foo keywords: [fooKeyword, barKeyword] collectAggregates: true + workspace: "10e020d7-64df-45e9-b717-c537f374ca2f" TagUpdate: description: Object containing a tag's path, and one or more values to update the tag with at times you specify. type: object @@ -1787,6 +2022,8 @@ definitions: type: array items: $ref: '#/definitions/TimestampedTagValue' + workspace: + type: string example: path: foo updates: @@ -1798,6 +2035,7 @@ definitions: type: DOUBLE value: "5.0" timestamp: '2018-09-04T18:45:08Z' + workspace: "bbcd6db8-10f6-4caf-af28-81157b741a5a" V1SubscriptionUpdate: description: Updates for a subscriptions type: object @@ -1942,10 +2180,14 @@ definitions: alias: description: Name of the subscription type: string + workspace: + description: Workspace of the tags to subscribe to + type: string example: updatesOnly: true tags: [tag1, tag2, tag3] alias: foo + workspace: "3e884a30-5623-4403-932b-375a715ef065" SubscriptionIds: type: object properties: @@ -1971,7 +2213,11 @@ definitions: default: 900 id: type: string + workspace: + description: Workspace of the tags to select + type: string example: searchPaths: [tag1, tag2, tag3] inactivityTimeout: 1000 id: 22520497-e85b-427f-980c-ca328fc72f75 + workspace: "3e884a30-5623-4403-932b-375a715ef065" diff --git a/tdm-reader/nitdmreader.yml b/tdm-reader/nitdmreader.yml index d960a4a..41a78cc 100644 --- a/tdm-reader/nitdmreader.yml +++ b/tdm-reader/nitdmreader.yml @@ -141,38 +141,46 @@ definitions: type: integer description: Number of values on the x axis. This determines the number of points that can be displayed. example: 1000 - default: 0 + default: null format: int32 decimatey: type: integer description: Number of values on the y axis. This determines the number of points that can be displayed. example: 1000 - default: 0 + default: null format: int32 xmin: type: number - default: 0 + default: null format: double description: Minimum x value of the display x axis. example: -1 xmax: type: number - default: 0 + default: null format: double description: Maximum x value of the display x axis. example: 1 ymin: type: number - default: 0 + default: null format: double description: Minimum y value of the display y axis. example: -1 ymax: type: number - default: 0 + default: null format: double description: Maximum y value of the display y axis. example: 1 + xlog: + type: boolean + default: false + description: Logrithmic X channel. + ylog: + type: boolean + default: false + description: Logrithmic Y channel. showLines: type: boolean description: Represent data as lines. When decimation is performed, the data returned represents the min and max values for that x-axis increment. @@ -192,6 +200,85 @@ definitions: $ref: '#/definitions/OneChannelSpecifier' default: null description: Channels to use only to filter. Values from these channels are not returned. + function: + type: string + default: null + description: Function to perform on the channel data. + example: y0-y1 + outputObjectNames: + type: array + items: + type: string + default: null + description: Transpose the returned data for the channels with the specified names. + example: + - name1 + - name2 + xminStringData: + description: >- + ISO-8601 formatted timestamp indicating the starting point for x data + type: string + example: '2018-05-09T15:07:42.527921Z' + xmaxStringData: + description: >- + ISO-8601 formatted timestamp indicating the ending point for x data + type: string + example: '2018-05-09T15:07:42.527921Z' + sort: + type: string + default: null + description: Specify how to sort values before returning them. + example: '-y0,x,s0' + sortChannels: + type: array + items: + $ref: '#/definitions/OneChannelSpecifier' + default: null + description: Channels to use only to sort. Values from these channels are not returned. + useWaveformProperties: + type: boolean + description: Look for specific properties in a channel that define the start and increment x values to use for each channel. + default: false + groupBy: + type: string + description: List of channels to group by. + default: null + example: 'y0,x' + groupStride: + type: integer + description: Number of samples per group. + default: null + format: int32 + example: 100 + groupChannels: + type: array + items: + $ref: '#/definitions/OneChannelSpecifier' + default: null + description: Channels to use only to group. Values from these channels are not returned. + maxGroupsToReturn: + type: integer + default: null + format: int32 + description: Maximum number of groups to return when grouping. + example: 100 + groupItemIndexStart: + type: integer + default: null + format: int32 + description: Index of first item in each group to return. + example: 100 + groupItemMaxCount: + type: integer + default: null + format: int32 + description: Maximum number of items to return per group. + example: 100 + ignoreXForDecimation: + type: boolean + default: null + description: If true, x is not used in decimation. Instead, indices are returend for x. + example: true OneChannelSpecifier: description: Specification for a channel of data properties: @@ -209,8 +296,6 @@ definitions: example: Channel 1 required: - fileId - - groupName - - channelName ChannelSpecifications: description: Array of x-y channel groups. The x channel of each grouping is optional. properties: @@ -230,6 +315,22 @@ definitions: $ref: '#/definitions/DataWindow' required: - yChannels + minItems: 1 + required: + - xyChannels + QueryChannelsRequest: + description: Object containing the channels to request metadata for. + properties: + channelSpecifications: + type: array + items: + $ref: '#/definitions/OneChannelSpecifier' + calculateChannelLength: + type: boolean + description: Determines whether or not to calculate the channel length + default: false + required: + - channelSpecifications OneChannelData: properties: dataType: @@ -273,10 +374,22 @@ definitions: timeUtcOffsetHours: type: number description: Time zone offset applied to local time values + error: + $ref: '#/definitions/Error' QueryDataSpecifier: properties: channelSpecifications: $ref: '#/definitions/ChannelSpecifications' + required: + - channelSpecifications + CreateCalculatedResultSpecifier: + properties: + channelSpecifications: + $ref: '#/definitions/ChannelSpecifications' + workspaceId: + type: string + required: + - channelSpecifications ReturnedUniqueValues: properties: uniqueValues: @@ -357,7 +470,6 @@ paths: summary: API information description: Returns information about API versions and available operations. operationId: RootEndpoint - x-ni-request-all-privileges: true security: [] responses: 200: @@ -385,7 +497,6 @@ paths: summary: API version information description: Returns available operations for a single version of the API. operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true security: [] responses: 200: @@ -396,16 +507,19 @@ paths: description: Not Found schema: $ref: '#/definitions/Error' - /v1/files/{file-id}: + /v1/files/{fileId}: get: tags: [metadata] summary: Gets file, group, and channel information description: 'Gets all group names, channel names, channel information, and properties at all levels. This does not return channel data.' operationId: getAllFileInfo + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 produces: - application/json parameters: - - name: file-id + - name: fileId description: File ID in: path type: string @@ -425,6 +539,9 @@ paths: summary: Gets file, group, and channel information description: 'Gets all group names, channel names, channel information, and properties at all levels. This does not return channel data.' operationId: getMultipleFileInfo + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 produces: - application/json parameters: @@ -443,16 +560,46 @@ paths: description: Error schema: $ref: '#/definitions/Error' - /v1/files/{file-id}/groups: + /v1/query-channels: + post: + tags: [metadata] + summary: Gets channel information + description: 'Gets all channel names, channel information, and properties for the channel. This does not return channel data.' + operationId: queryChannels + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 + produces: + - application/json + parameters: + - name: QueryChannelsRequest + description: Channel request parameters + in: body + required: true + schema: + $ref: '#/definitions/QueryChannelsRequest' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/FileInformation' + default: + description: Error + schema: + $ref: '#/definitions/Error' + /v1/files/{fileId}/groups: get: tags: [metadata] summary: Lists all groups in the file description: Lists all group names in the file. operationId: getChannelPropertiesCount + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 produces: - application/json parameters: - - name: file-id + - name: fileId description: File ID in: path required: true @@ -481,21 +628,24 @@ paths: description: Error schema: $ref: '#/definitions/Error' - /v1/files/{file-id}/groups/{group-name}/channels: + /v1/files/{fileId}/groups/{groupName}/channels: get: tags: [metadata] summary: Lists all channels in the group description: Lists all channel names for a group in a specific file. operationId: getChannels + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 produces: - application/json parameters: - - name: file-id + - name: fileId description: File ID in: path required: true type: string - - name: group-name + - name: groupName description: Group name in: path required: true @@ -530,6 +680,9 @@ paths: summary: Returns data from channels. description: Queries files based on channel and window specifications and returns channel data that matches the query. The channel specifications select channels by group and channel relationships. Window specifications determine a bounding box of minimum and maximum x and y values, as well as specify the type of decimation performed on data within the window. operationId: queryData + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 produces: - application/json parameters: @@ -554,6 +707,9 @@ paths: summary: Returns unique data from channels. description: Queries files based on channel specifications and returns unique channel data values. The channel specifications select channels by group and channel relationships. The maximum number of unique values to return is determined by MaxNumberOfUniqueValues. If there are more unique values, then the first MaxNumberOfUniqueValues + 1 values are returned. operationId: queryUniqueValues + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 produces: - application/json parameters: @@ -572,3 +728,30 @@ paths: description: Error schema: $ref: '#/definitions/Error' + /v1/create-calculated-result: + post: + tags: [data] + summary: Returns a calculated result channel. + description: Creates a channel based on values from other channels. + operationId: createCalculatedResult + x-ni-auth: true + x-ni-request-variables: [REMOTE_USER] + x-ni-request-timeout: 60000 + produces: + - application/json + parameters: + - name: ChannelSpecifications + description: Channel specifications and window information + in: body + required: true + schema: + $ref: '#/definitions/CreateCalculatedResultSpecifier' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ReturnedUniqueValues' + default: + description: Error + schema: + $ref: '#/definitions/Error' \ No newline at end of file diff --git a/test-monitor/nitestmonitor-v1.yml b/test-monitor/nitestmonitor-v1.yml index 2309ea1..56358a2 100644 --- a/test-monitor/nitestmonitor-v1.yml +++ b/test-monitor/nitestmonitor-v1.yml @@ -349,7 +349,7 @@ definitions: type: array items: type: string - example: [df1b63da-4fd8-4466-b721-5a28de036f56] + example: [5e30934193cac8046851acb2] startedAt: description: ISO-8601 formatted timestamp indicating when the test result began type: string @@ -386,11 +386,11 @@ definitions: id: description: Id of the test result type: string - example: df1b63da-4fd8-4466-b721-5a28de036f56 + example: 5e30938d93cac80468534720 systemId: description: Id of the system type: string - example: 9c75f1b5-5882-490e-a2e2-1c14123d68b2 + example: 5e30931993cac8046850a996 hostName: description: Host name of the system type: string @@ -450,7 +450,7 @@ definitions: id: description: Test result id to update type: string - example: df1b63da-4fd8-4466-b721-5a28de036f56 + example: 5e30938d93cac80468534720 programName: description: Program name type: string @@ -497,7 +497,7 @@ definitions: type: array items: type: string - example: [df1b63da-4fd8-4466-b721-5a28de036f56] + example: [5e30934193cac8046851acb2] startedAt: description: ISO-8601 formatted timestamp indicating when the test result began type: string @@ -519,7 +519,7 @@ definitions: items: type: string example: - - 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + - 5e30938d93cac80468534720 programNames: description: Array of program names type: array @@ -554,7 +554,7 @@ definitions: items: type: string example: - - 9c75f1b5-5882-490e-a2e2-1c14123d68b2 + - 5e30931993cac8046850a996 hostNames: description: Array of host names type: array @@ -616,10 +616,10 @@ definitions: properties: stepId: type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30934193cac8046851acb4 resultId: type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 StepDataObject: title: Step Data description: Data returned by the test step @@ -683,14 +683,14 @@ definitions: items: type: string example: - - 3265bc91-f214-4efa-adfd-56f8ea717349 + - 5e30934193cac8046851acb4 resultIds: description: Array of result ids type: array items: type: string example: - - 9c75f1b5-5882-490e-a2e2-1c14123d68b2 + - 5e30938d93cac80468534720 path: description: Step path type: string @@ -701,8 +701,8 @@ definitions: items: type: string example: - - 9c75f1b5-5882-490e-a2e2-1c14123d68b2 - - 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + - 5e30934193cac8046851acb2 + - 5e30931993cac8046850a996 statuses: description: Array of step statuses type: array @@ -782,7 +782,7 @@ definitions: resultId: description: Result id type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 children: description: Nested child steps type: array @@ -860,7 +860,7 @@ definitions: resultId: description: Result id type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 path: description: Step path type: string @@ -1085,7 +1085,6 @@ paths: summary: API version 1 information description: Returns available operations for version 1 of the API. operationId: root-endpoint-v1 - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -1105,7 +1104,7 @@ paths: description: Uses input criteria to filter and return test results. An empty request body queries all test results. operationId: query-results x-ni-operation: queryResults - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -1139,7 +1138,7 @@ paths: description: Gets a list of test results. operationId: get-results x-ni-operation: getResults - x-ni-privilege: Read + x-ni-auth: true parameters: - in: query name: skip @@ -1166,7 +1165,7 @@ paths: description: Updates existing test results by merging or replacing values. operationId: update-results x-ni-operation: updateResults - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1205,7 +1204,7 @@ paths: description: Creates new test results from the supplied models. The server automatically generates the result ids. The server will populate the start time if one is not provided. operationId: create-results x-ni-operation: createResults - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1239,7 +1238,7 @@ paths: description: Deletes the test result with the specified id. The request succeeds for result ids that do not exist. operationId: DeleteResult x-ni-operation: deleteResult - x-ni-privilege: Write + x-ni-auth: true parameters: - in: path name: resultId @@ -1265,7 +1264,7 @@ paths: description: Deletes multiple test results in a single request. operationId: delete-results x-ni-operation: deleteResults - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1283,7 +1282,7 @@ paths: type: array items: type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 deleteSteps: description: Indicates whether to delete the test steps associated with the test result type: boolean @@ -1304,7 +1303,7 @@ paths: description: Uses input criteria to filter and return test steps. An empty request body queries all test steps. operationId: query-steps x-ni-operation: querySteps - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -1338,7 +1337,7 @@ paths: description: Gets a list of test steps. operationId: get-steps x-ni-operation: getSteps - x-ni-privilege: Read + x-ni-auth: true parameters: - in: query name: skip @@ -1365,7 +1364,7 @@ paths: description: Updates existing test steps by replacing values for the specified fields. operationId: update-steps x-ni-operation: updateSteps - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1391,7 +1390,7 @@ paths: description: Creates new test steps from the supplied models. The result associated with the step must exist prior to step creation. The server automatically generates step ids if not supplied. operationId: create-steps x-ni-operation: createSteps - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1420,7 +1419,7 @@ paths: description: Deletes the test step with the specified id. The request succeeds for step ids that do not exist. operationId: DeleteStep x-ni-operation: deleteStep - x-ni-privilege: Write + x-ni-auth: true parameters: - in: path name: resultId @@ -1451,7 +1450,7 @@ paths: description: Deletes multiple test steps in a single request. operationId: delete-steps x-ni-operation: deleteSteps - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1479,7 +1478,6 @@ paths: summary: Pings the test monitor service description: Deprecated. Pings the test monitor service to ensure that it is online. operationId: ping - x-ni-privilege: Read deprecated: true responses: 204: diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index bc53516..611ced4 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -59,8 +59,8 @@ definitions: items: $ref: '#/definitions/Error' example: - name: Skyline.OneOrMoreErrorsOccurred - code: -251040 + name: TestMonitorErrorCodes.OneOrMoreErrorsOccurred + code: -252921 message: >- One or more errors occurred. See the contained list for details of each error. @@ -244,6 +244,7 @@ definitions: - PROPERTIES - FILE_IDS - STATUS_TYPE_SUMMARY + - WORKSPACE example: PROGRAM_NAME StepField: @@ -267,6 +268,7 @@ definitions: - DATA_MODEL - DATA - HAS_CHILDREN + - WORKSPACE example: STEP_TYPE PathField: @@ -348,7 +350,7 @@ definitions: id: description: ID of the product type: string - example: 0365cee9-0e5d-4802-b0f6-9fedb8f08800 + example: 5e30931793cac80468509487 partNumber: description: The part number of the product type: string @@ -388,7 +390,7 @@ definitions: type: array items: type: string - example: [5ccb19ce5aa0a3348872c3e3] + example: [5e30934193cac8046851acb2] ProductUpdateRequestObject: title: Product Update Request type: object @@ -396,7 +398,7 @@ definitions: id: description: ID of the product to update type: string - example: 0365cee9-0e5d-4802-b0f6-9fedb8f08800 + example: 5e30931793cac80468509487 name: description: The name of the product type: string @@ -425,7 +427,7 @@ definitions: type: array items: type: string - example: [5ccb19ce5aa0a3348872c3e3] + example: [5e30934193cac8046851acb2] TestResultRequestObject: title: Test Result Request type: object @@ -476,7 +478,7 @@ definitions: type: array items: type: string - example: [df1b63da-4fd8-4466-b721-5a28de036f56] + example: [5e30934193cac8046851acb2] startedAt: description: ISO-8601 formatted timestamp indicating when the test result began type: string @@ -488,6 +490,10 @@ definitions: format: double default: 0 example: 29.9 + workspace: + description: The workspace the test result belongs to + type: string + example: f94b178e-288c-4101-afb1-833992413aa7 TestResultResponseObject: title: Test Result Response type: object @@ -513,11 +519,11 @@ definitions: id: description: Id of the test result type: string - example: df1b63da-4fd8-4466-b721-5a28de036f56 + example: 5e30938d93cac80468534720 systemId: description: Id of the system type: string - example: 9c75f1b5-5882-490e-a2e2-1c14123d68b2 + example: 5e30931993cac8046850a996 hostName: description: Host name of the system type: string @@ -568,6 +574,10 @@ definitions: format: int32 example: FAILED: 5 + workspace: + description: The workspace the test result belongs to + type: string + example: f94b178e-288c-4101-afb1-833992413aa7 TestResultUpdateRequestObject: title: Test Result Update type: object @@ -577,7 +587,7 @@ definitions: id: description: Test result id to update type: string - example: df1b63da-4fd8-4466-b721-5a28de036f56 + example: 5e30938d93cac80468534720 programName: description: Program name type: string @@ -624,7 +634,7 @@ definitions: type: array items: type: string - example: [df1b63da-4fd8-4466-b721-5a28de036f56] + example: [5e30934193cac8046851acb2] startedAt: description: ISO-8601 formatted timestamp indicating when the test result began type: string @@ -636,6 +646,10 @@ definitions: format: double default: 0 example: 29.9 + workspace: + description: The workspace the test result belongs to + type: string + example: f94b178e-288c-4101-afb1-833992413aa7 UpdateTestResultsRequest: title: Update Test Results Request type: object @@ -662,11 +676,11 @@ definitions: type: $ref: '#/definitions/ValueType' min: - description: The minimum recorded value, if ValueType is "NUMBER." + description: The minimum recorded value, if `type` is "NUMBER." type: number example: 1.3 max: - description: The maximum recorded value, if ValueType is "NUMBER." + description: The maximum recorded value, if `type` is "NUMBER." type: number example: 2.6 PathResponseObject: @@ -674,7 +688,9 @@ definitions: type: object properties: id: - description: The unique ID of this path. + description: >- + The unique ID of this path. Note that this value may change if + the collection is repaired. type: string example: 507f191e810c19729de860ea path: @@ -763,7 +779,7 @@ definitions: type: integer format: int32 default: 1000 - minimum: 0 + minimum: -1 example: 1000 continuationToken: description: >- @@ -787,7 +803,7 @@ definitions: filter: description: The query filter in Dynamic Linq type: string - example: programName == "MyTests.seq" || product == "cRIO-9030" + example: programName == "MyTests.seq" || partNumber == "cRIO-9030" substitutions: description: >- Makes substitutions in the query filter expression. Substitutions for the query expression @@ -823,7 +839,7 @@ definitions: type: integer format: int32 default: 1000 - minimum: 0 + minimum: -1 example: 1000 continuationToken: description: >- @@ -899,7 +915,7 @@ definitions: type: integer format: int32 default: 1000 - minimum: 0 + minimum: -1 example: 1000 continuationToken: description: >- @@ -980,7 +996,7 @@ definitions: type: integer format: int32 default: 1000 - minimum: 0 + minimum: -1 example: 1000 continuationToken: description: >- @@ -1101,10 +1117,10 @@ definitions: properties: stepId: type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30934193cac8046851acb4 resultId: type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 StepDataObject: title: Step Data description: Data returned by the test step @@ -1125,9 +1141,16 @@ definitions: example: key1: value1 example: - - key1: value1 - key2: value2 - - key1: value3 + - name: Voltage + status: Passed + measurement: "3.725" + lowLimit: "3.65" + highLimit: "3.8" + nominalValue: "3.7" + units: volt + comparisonType: GELE + - nitmParameterType: ADDITIONAL_RESULTS + additionalProp: myValue TestStepsDeleteRequest: title: Test Steps Delete Request type: object @@ -1154,7 +1177,7 @@ definitions: resultId: description: Result id type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 children: description: Nested child steps type: array @@ -1236,7 +1259,7 @@ definitions: resultId: description: Result id type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 path: description: Step path type: string @@ -1288,6 +1311,10 @@ definitions: that this step object is a leaf node. type: boolean example: false + workspace: + description: The workspace the test step belongs to + type: string + example: f94b178e-288c-4101-afb1-833992413aa7 responses: Error: description: Error @@ -1353,11 +1380,14 @@ responses: type: array items: type: string + example: + - 5e30931793cac80468509487 failed: description: Array of product ids that failed to delete type: array items: type: string + example: [] error: $ref: '#/definitions/Error' ProductsQueryResponse: @@ -1621,7 +1651,6 @@ paths: summary: API information description: Returns information about API versions and available operations. operationId: root-endpoint - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -1646,7 +1675,6 @@ paths: summary: API version 2 information description: Returns available operations for version 2 of the API. operationId: root-endpoint-v2 - x-ni-request-all-privileges: true # Explicitly mark security as an empty array - this route does not require any privileges. # Marking it this way prevents it from inheriting the top-level security settings. security: [] @@ -1668,7 +1696,7 @@ paths: product. An empty request body queries all products. operationId: query-products-v2 x-ni-operation: queryProducts - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -1690,7 +1718,7 @@ paths: description: Gets a list of products. operationId: get-products-v2 x-ni-operation: getProducts - x-ni-privilege: Read + x-ni-auth: true parameters: - in: query name: continuationToken @@ -1706,7 +1734,7 @@ paths: The maximum number of products to return. type: integer format: int32 - default: -1 + default: 1000 minimum: -1 - in: query name: returnCount @@ -1728,7 +1756,7 @@ paths: description: Creates new products from the supplied models. The server automatically generates the product ids. operationId: create-products-v2 x-ni-operation: createProducts - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1762,7 +1790,7 @@ paths: description: Gets a single product. operationId: get-product-v2 x-ni-operation: getProducts - x-ni-privilege: Read + x-ni-auth: true parameters: - in: path name: productId @@ -1784,7 +1812,7 @@ paths: description: Deletes the product with the specified id. The request succeeds for products that do not exist. operationId: delete-product-v2 x-ni-operation: deleteProduct - x-ni-privilege: Write + x-ni-auth: true parameters: - in: path name: productId @@ -1807,7 +1835,7 @@ paths: fields are `ID`, `PART_NUMBER`, `NAME`, `FAMILY`, and `UPDATED_AT`. operationId: query-product-values-v2 x-ni-operation: queryProducts - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -1829,7 +1857,7 @@ paths: description: Updates existing products by merging or replacing values. operationId: update-products-v2 x-ni-operation: updateProducts - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1865,7 +1893,7 @@ paths: description: Deletes multiple products in a single request. operationId: delete-products-v2 x-ni-operation: deleteProducts - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -1883,7 +1911,7 @@ paths: type: array items: type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30931793cac80468509487 responses: 200: $ref: '#/responses/DeleteProductsResponse' @@ -1903,7 +1931,7 @@ paths: results are returned. An empty request body queries all test results. operationId: query-results-v2 x-ni-operation: queryResults - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -1928,7 +1956,7 @@ paths: description: Gets a list of test results. operationId: get-results-v2 x-ni-operation: getResults - x-ni-privilege: Read + x-ni-auth: true parameters: - in: query name: continuationToken @@ -1944,7 +1972,7 @@ paths: The maximum number of results to return. type: integer format: int32 - default: -1 + default: 1000 minimum: -1 - in: query name: returnCount @@ -1966,7 +1994,7 @@ paths: description: Creates new test results from the supplied models. The server automatically generates the result ids. The server will populate the start time if one is not provided. operationId: create-results-v2 x-ni-operation: createResults - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -2000,7 +2028,7 @@ paths: description: Gets a single test result. operationId: get-result-v2 x-ni-operation: getResults - x-ni-privilege: Read + x-ni-auth: true parameters: - in: path name: resultId @@ -2022,7 +2050,7 @@ paths: description: Deletes the test result with the specified id. The request succeeds for result ids that do not exist. operationId: delete-result-v2 x-ni-operation: deleteResult - x-ni-privilege: Write + x-ni-auth: true parameters: - in: path name: resultId @@ -2049,10 +2077,10 @@ paths: Queries known values for an indexed, scalar result field. Supported fields are `ID`, `STARTED_AT`, `UPDATED_AT`, `PROGRAM_NAME`, `SYSTEM_ID`, `HOST_NAME`, `OPERATOR`, `SERIAL_NUMBER`, `PART_NUMBER`, - and `TOTAL_TIME_IN_SECONDS`. + `TOTAL_TIME_IN_SECONDS`, and `WORKSPACE`. operationId: query-result-values-v2 x-ni-operation: queryResults - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -2074,7 +2102,7 @@ paths: description: Updates existing test results by merging or replacing values. operationId: update-results-v2 x-ni-operation: updateResults - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -2096,7 +2124,7 @@ paths: description: Deletes multiple test results in a single request. operationId: delete-results-v2 x-ni-operation: deleteResults - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -2114,7 +2142,7 @@ paths: type: array items: type: string - example: 1f05c3c8-7a8c-4ebb-a87f-7a60d5dd8938 + example: 5e30938d93cac80468534720 deleteSteps: description: Indicates whether to delete the test steps associated with the test result type: boolean @@ -2138,7 +2166,7 @@ paths: steps are returned. An empty request body queries all test steps. operationId: query-steps-v2 x-ni-operation: querySteps - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -2163,7 +2191,7 @@ paths: description: Gets a list of test steps. operationId: get-steps-v2 x-ni-operation: getSteps - x-ni-privilege: Read + x-ni-auth: true parameters: - in: query name: continuationToken @@ -2179,7 +2207,7 @@ paths: The maximum number of steps to return. type: integer format: int32 - default: -1 + default: 1000 minimum: -1 - in: query name: returnCount @@ -2201,7 +2229,7 @@ paths: description: Creates new test steps from the supplied models. The result associated with the step must exist prior to step creation. The server automatically generates step ids if not supplied. operationId: create-steps-v2 x-ni-operation: createSteps - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -2225,7 +2253,7 @@ paths: description: Gets a single test step. operationId: get-step-v2 x-ni-operation: getSteps - x-ni-privilege: Read + x-ni-auth: true parameters: - in: path name: resultId @@ -2252,7 +2280,7 @@ paths: description: Deletes the test step with the specified id. The request succeeds for step ids that do not exist. operationId: delete-step-v2 x-ni-operation: deleteStep - x-ni-privilege: Write + x-ni-auth: true parameters: - in: path name: resultId @@ -2283,11 +2311,11 @@ paths: description: >- Queries known values for an indexed, scalar step field. Supported fields are `NAME`, `STEP_TYPE`, `STEP_ID`, `PARENT_ID`, `RESULT_ID`, - `PATH`, `TOTAL_TIME_IN_SECONDS`, `STARTED_AT`, `UPDATED_AT`, and - `DATA_MODEL`. + `PATH`, `TOTAL_TIME_IN_SECONDS`, `STARTED_AT`, `UPDATED_AT`, + `DATA_MODEL`, and `WORKSPACE`. operationId: query-step-values-v2 x-ni-operation: querySteps - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody @@ -2309,7 +2337,7 @@ paths: description: Updates existing steps by merging or replacing values. operationId: update-steps-v2 x-ni-operation: updateSteps - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -2331,7 +2359,7 @@ paths: description: Deletes multiple test steps in a single request. operationId: delete-steps-v2 x-ni-operation: deleteSteps - x-ni-privilege: Write + x-ni-auth: true parameters: - in: body name: requestBody @@ -2360,7 +2388,7 @@ paths: description: Gets a list of paths. operationId: get-paths-v2 x-ni-operation: queryPaths - x-ni-privilege: Read + x-ni-auth: true parameters: - in: query name: continuationToken @@ -2399,7 +2427,7 @@ paths: description: Gets a single path. operationId: get-path-v2 x-ni-operation: queryPaths - x-ni-privilege: Read + x-ni-auth: true parameters: - in: path name: pathId @@ -2424,7 +2452,7 @@ paths: paths. An empty request body queries all paths. operationId: query-paths-v2 x-ni-operation: queryPaths - x-ni-privilege: Read + x-ni-auth: true parameters: - in: body name: postBody diff --git a/user-data/niuserdata.yml b/user-data/niuserdata.yml index a348e60..ee1424b 100644 --- a/user-data/niuserdata.yml +++ b/user-data/niuserdata.yml @@ -571,7 +571,6 @@ paths: /: get: operationId: RootEndpoint - x-ni-request-all-privileges: true summary: API information description: Returns information about API versions and available operations. tags: [versioning] @@ -598,7 +597,6 @@ paths: required: true get: operationId: RootEndpointWithVersion - x-ni-request-all-privileges: true summary: API version information description: Returns available operations for a single version of the API tags: [versioning] @@ -616,7 +614,7 @@ paths: get: operationId: GetUserDataItems x-ni-operation: queryUserDataItems - x-ni-request-all-privileges: true + x-ni-auth: true x-ni-request-variables: [REMOTE_USER] summary: Get All User Data Items description: >- @@ -696,7 +694,7 @@ paths: post: operationId: CreateOrUpdateUserDataItems x-ni-operation: createOrUpdateUserDataItems - x-ni-request-all-privileges: true + x-ni-auth: true x-ni-request-variables: [REMOTE_USER] summary: Create or update one or more user data items description: >- @@ -737,7 +735,7 @@ paths: get: operationId: GetUserDataItem x-ni-operation: queryUserDataItems - x-ni-request-all-privileges: true + x-ni-auth: true x-ni-request-variables: [REMOTE_USER] summary: Get information about the specified user data item description: >- @@ -755,7 +753,7 @@ paths: delete: operationId: DeleteUserDataItem x-ni-operation: deleteUserDataItems - x-ni-privilege: Write + x-ni-auth: true x-ni-request-variables: [REMOTE_USER] summary: Delete the specified user data item description: Deletes the specified user data item. @@ -771,7 +769,7 @@ paths: post: operationId: QueryUserDataItems x-ni-operation: queryUserDataItems - x-ni-request-all-privileges: true + x-ni-auth: true x-ni-request-variables: [REMOTE_USER] summary: Query User Data Items description: Queries the user data items. @@ -830,8 +828,7 @@ paths: post: operationId: UpdateUserDataItems x-ni-operation: createOrUpdateUserDataItems - x-ni-privilege: Write - x-ni-request-all-privileges: true + x-ni-auth: true x-ni-request-variables: [REMOTE_USER] summary: Update one or more user data items description: >- @@ -864,8 +861,7 @@ paths: post: operationId: DeleteUserDataItems x-ni-operation: deleteUserDataItems - x-ni-privilege: Write - x-ni-request-all-privileges: true + x-ni-auth: true x-ni-request-variables: [REMOTE_USER] summary: Delete user data items description: >-