From 009a3740be3c10599c449b45e8505d05b154204a Mon Sep 17 00:00:00 2001 From: Juno Jin Date: Mon, 19 Apr 2021 14:33:37 -0500 Subject: [PATCH 01/37] Add BasicAuth to all without it --- auth/niauth.yaml | 3 +++ user/niuser.yaml | 3 +++ webapp/niapp.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/auth/niauth.yaml b/auth/niauth.yaml index fe42e22..43a1cd2 100644 --- a/auth/niauth.yaml +++ b/auth/niauth.yaml @@ -12,8 +12,11 @@ securityDefinitions: type: apiKey name: x-ni-api-key in: header + BasicAuth: + type: basic security: - ApiKeyAuth: [] + - BasicAuth: [] paths: /auth: get: diff --git a/user/niuser.yaml b/user/niuser.yaml index 78b0ba4..444dc6b 100644 --- a/user/niuser.yaml +++ b/user/niuser.yaml @@ -12,8 +12,11 @@ securityDefinitions: type: apiKey name: x-ni-api-key in: header + BasicAuth: + type: basic security: - ApiKeyAuth: [] + - BasicAuth: [] paths: '/users/query': post: diff --git a/webapp/niapp.yaml b/webapp/niapp.yaml index 36a7768..3d810a8 100644 --- a/webapp/niapp.yaml +++ b/webapp/niapp.yaml @@ -12,8 +12,11 @@ securityDefinitions: type: apiKey name: x-ni-api-key in: header + BasicAuth: + type: basic security: - ApiKeyAuth: [] + - BasicAuth: [] paths: '/webapps/{id}': get: From 9373ed3c7fdf9ec817a90cbe6b6b2666dbf6c435 Mon Sep 17 00:00:00 2001 From: ipopa144 Date: Wed, 12 May 2021 11:17:44 +0300 Subject: [PATCH 02/37] Update SystemMetadata Add properties --- systems-management/nisysmgmt.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index c8a1d04..e4b6e06 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -1122,6 +1122,13 @@ definitions: type: string description: The ID of the workspace. example: '5bc5e9092a4fa4c71cfa7197' + properties: + type: object + description: The new properties (key-value pairs). + additionalProperties: + type: string + example: + owner: admin QueryAvailablePackagesRequest: title: Get Available Packages Request From f974003adecf67b564212b4f2f445de9f21a71dc Mon Sep 17 00:00:00 2001 From: Vlad Deac Date: Fri, 2 Apr 2021 21:04:59 +0000 Subject: [PATCH 03/37] Merged PR 143611: Added check for all system properties updated # Justification when a system was connected for the first time, the minion updated broadcast contains all 3 properties (connected, grains, sysapi) as properties which got updated, but the strategy for new clients did not have the case where all 3 were changed. # Testing Tested in the product. # Checklist - [X] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Added check for all system properties updated --- asset-managment/niapm.yml | 354 +++++++++++++++++++++++++--- auth/niauth.yaml | 68 ++++++ file/nifile.yml | 20 +- ni-notebook-execution/ninbexec.yml | 11 + systems-management/nisysmgmt.yml | 2 - systems-state/nisystemsstate.yml | 30 +++ tag-rule/nitagrule.yml | 11 +- tag/nitag.yml | 356 +++++++++++++++++++---------- tdm-reader/nitdmreader.yml | 75 +++--- user/niuser.yaml | 4 +- 10 files changed, 738 insertions(+), 193 deletions(-) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index cfb6859..a65935f 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -108,6 +108,13 @@ definitions: $ref: '#/definitions/Operation' deleteAssets: $ref: '#/definitions/Operation' + DiscoveryType: + title: Discovery Type + description: Indicates how the asset was discovered. "Automatic" indicates that SystemLink discovered the asset. "Manual" indicates that the asset was discovered using other methods. + type: string + enum: + - Manual + - Automatic BusType: title: Bus Type description: All supported bus types for an asset. @@ -189,6 +196,7 @@ definitions: date: '2018-05-07T18:58:05.000Z' recommendedInterval: 12 nextRecommendedDate: '2019-05-07T18:58:05.000Z' + nextCustomDueDate: '2019-06-07T18:58:05.000Z' comments: 'This is a comment.' entryType: MANUAL operator: @@ -365,6 +373,11 @@ definitions: type: string format: date-time example: '2019-05-07T18:58:05.219692Z' + nextCustomDueDate: + description: ISO-8601 formatted timestamp specifying the date for the next external calibration. + type: string + format: date-time + example: '2019-06-07T18:58:05.219692Z' comments: description: Calibration comments provided by an operator. type: string @@ -377,6 +390,7 @@ definitions: date: '2018-05-07T18:58:05.000Z' recommendedInterval: 12 nextRecommendedDate: '2019-05-07T18:58:05.000Z' + nextCustomDueDate: '2019-06-07T18:58:05.000Z' comments: 'This is a comment.' ExternalCalibrationModel: title: External Calibration @@ -397,6 +411,7 @@ definitions: date: '2018-05-07T18:58:05.000Z' recommendedInterval: 12 nextRecommendedDate: '2019-05-07T18:58:05.000Z' + nextCustomDueDate: '2019-06-07T18:58:05.000Z' comments: 'This is a comment.' entryType: MANUAL operator: @@ -421,6 +436,7 @@ definitions: date: '2018-05-07T18:58:05.000Z' recommendedInterval: 12 nextRecommendedDate: '2019-05-07T18:58:05.000Z' + nextCustomDueDate: '2019-06-07T18:58:05.000Z' comments: 'This is a comment.' entryType: MANUAL operator: @@ -465,12 +481,20 @@ definitions: description: Whether the asset supports external calibration. type: boolean example: true + customCalibrationInterval: + description: The interval represented in months used for computing calibration due date. If not set, the recommended calibration interval from the calibration model is used. + type: integer + example: 24 selfCalibration: $ref: '#/definitions/SelfCalibrationModel' isNIAsset: description: Whether this asset is an NI asset (true) or a third-party asset (false). type: boolean example: true + workspace: + type: string + description: The ID of the workspace containing the asset. + example: '5bc5e9092a4fa4c71cfa7197' AssetCreateModel: title: Asset Create Model description: >- @@ -489,6 +513,21 @@ definitions: $ref: '#/definitions/AssetLocationWithPresenceModel' externalCalibration: $ref: '#/definitions/ExternalCalibrationWithChecksumModel' + discoveryType: + $ref: '#/definitions/DiscoveryType' + 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 AssetUpdateModel: title: Asset Update Model description: >- @@ -509,6 +548,19 @@ definitions: $ref: '#/definitions/AssetLocationWithPresenceModel' externalCalibration: $ref: '#/definitions/ExternalCalibrationWithChecksumModel' + 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 AssetModel: title: Asset Model description: An object describing an asset with all of its properties. @@ -530,10 +582,8 @@ definitions: example: true externalCalibration: $ref: '#/definitions/ExternalCalibrationModel' - workspace: - type: string - description: The ID of the workspace. - example: '5bc5e9092a4fa4c71cfa7197' + discoveryType: + $ref: '#/definitions/DiscoveryType' properties: description: Key-value-pair metadata associated with an asset. type: object @@ -836,15 +886,14 @@ definitions: 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. + How many resources to return in the result, or -1 to take all. + The default 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 + default: 1000 + example: 1000 + x-example: 1000 UtilizationTimeIntervalModel: title: Utilization Time Interval description: Time interval for which to retrieve asset/system utilization. @@ -901,14 +950,13 @@ parameters: in: query name: 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. + How many resources to return in the result, or -1 to take all. + The default 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 - x-example: -1 - maximum: 1000 + default: 1000 + x-example: 1000 AssetAvailabilityComparison: in: body name: compareAvailability @@ -968,6 +1016,28 @@ parameters: type: array items: $ref: '#/definitions/AvailabilityTimeInterval' + QueryAssetsAvailabilityReportRequestBody: + in: body + name: queryAssetsAvailabilityReport + description: Request body containing a list of asset identifiers and a list of time intervals. + schema: + title: Query Assets Availability Report 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 @@ -1032,14 +1102,14 @@ parameters: ExternalCalibrationRequestBody: in: body name: externalCalibrationRequestBody - description: Request body containing data to create a new external calibration entry for a third-party asset. + description: Request body containing data to create a new external calibration entry for an asset. schema: title: Post External Calibration Request - description: Request body containing data to create a new external calibration entry for a third-party asset. + description: Request body containing data to create a new external calibration entry for an asset. type: object properties: externalCalibration: - $ref: '#/definitions/ExternalCalibrationBaseModel' + $ref: '#/definitions/ExternalCalibrationWithChecksumModel' UpdateMetadata: in: body name: updateMetadata @@ -1068,6 +1138,164 @@ parameters: type: string example: Key1: Value1 + QueryInUseAssetsRequest: + in: body + name: queryInUseAssets + description: Request body consisting of filters to apply when retrieving assets currently being utilized. + schema: + title: Query In Use Assets Request + description: Object containing filters to apply when retrieving utilized assets. + type: object + properties: + 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. + + - CustomCalibrationInterval: Integer representing the custom calibration interval, in months. + + - 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: IsSystemController = True + 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. + + 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 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" + 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 + take: + description: The maximum number of asset utilization history records to return. + type: integer + format: int32 + default: 1000 + minimum: 0 + example: 1000 QueryAssetsRequest: in: body name: queryAssets @@ -1101,7 +1329,7 @@ parameters: - 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. + - 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 @@ -1181,6 +1409,8 @@ parameters: - SupportsExternalCalibration: Boolean flag specifying whether the asset supports external calibration. + - CustomCalibrationInterval: Integer representing the custom calibration interval, in months. + - 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" @@ -1195,7 +1425,7 @@ parameters: - ExternalCalibration.Operator.DisplayName: String representing the name of the operator which performed an external calibration on a third-party asset. type: string - example: IsSystemController = true + example: IsSystemController = True QueryHistoryRequestBody: in: body name: queryHistory @@ -1336,6 +1566,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. + + - CustomCalibrationInterval: Integer representing the custom calibration interval, in months. - CalibrationStatus: String enumeration representing the calibration status of an asset. Possible values are: OK, APPROACHING_RECOMMENDED_DUE_DATE, PAST_RECOMMENDED_DUE_DATE. @@ -1484,6 +1716,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. + + - CustomCalibrationInterval: Integer representing the custom calibration interval, in months. - CalibrationStatus: String enumeration representing the calibration status of an asset. Possible values are: OK, APPROACHING_RECOMMENDED_DUE_DATE, PAST_RECOMMENDED_DUE_DATE. @@ -1647,6 +1881,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. + + - CustomCalibrationInterval: Integer representing the custom calibration interval, in months. - CalibrationStatus: String enumeration representing the calibration status of an asset. Possible values are: OK, APPROACHING_RECOMMENDED_DUE_DATE, PAST_RECOMMENDED_DUE_DATE. @@ -1815,7 +2051,7 @@ responses: description: Asset summary response containing the count of active assets, inactive assets and the total number of assets. schema: 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. + description: 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. Also returns the number of assets that are in use and the number of assets that are not in use. type: object properties: active: @@ -1830,11 +2066,19 @@ responses: description: Total number of managed assets. type: integer example: 17 + inUse: + description: Total number of used assets. + type: integer + example: 10 + notInUse: + description: Total number of unused assets. + type: integer + example: 7 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. + 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. + 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 @@ -1955,7 +2199,7 @@ responses: 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'. + 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 response with key='Filename'. schema: title: Send to File Ingestion Or Download Response description: Response for the query that consists in the file information for when the result was sent to the file ingestion service or the CSV file content for download. @@ -2294,7 +2538,7 @@ paths: 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. + Gets a list of assets. Calibrated assets can be obtained by setting calibratableOnly=true. To obtain a report of the assets, responseFormat=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]. @@ -2444,7 +2688,7 @@ 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 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. + 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-auth: true parameters: @@ -2458,6 +2702,24 @@ paths: $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' + /v1/query-in-use-assets: + post: + tags: [assets] + summary: Query assets that are currently in use + description: Returns the assets that are currently marked as being in use by a utilization entry and that satisfy the provided filtering criteria. The caller can filter based on asset properties as well as utilization properties. + operationId: query-in-use-assets + x-ni-auth: true + parameters: + - $ref: '#/parameters/QueryInUseAssetsRequest' + responses: + 200: + $ref: '#/responses/AssetsResponse' + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' /v1/assets/{assetId}: get: tags: [assets] @@ -2542,12 +2804,13 @@ paths: default: $ref: '#/responses/Error' post: - tags: [assets] + tags: [deprecated] summary: Creates a new calibration history entry for an asset - description: Creates a new calibration history entry for a third-party asset. + description: Deprecated. Creates a new calibration history entry for an asset. Use /v1/update-assets. operationId: post-asset-calibration-history x-ni-auth: true x-ni-request-variables: [REMOTE_USER, USER_NAME] + deprecated: true parameters: - $ref: '#/parameters/AssetId' - $ref: '#/parameters/ExternalCalibrationRequestBody' @@ -2661,7 +2924,7 @@ paths: 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. + Stores information related to assets utilization start. The operation is successful 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 @@ -2681,7 +2944,7 @@ paths: 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. + Stores information related to assets utilization end. The operation is successful 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 @@ -2702,7 +2965,7 @@ paths: 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. + Stores information related to ongoing asset utilizations. The operation is successful 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 @@ -2764,7 +3027,7 @@ paths: - $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. + 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. @@ -2788,6 +3051,33 @@ paths: $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' + /v1/assets/history/report/query-assets-availability: + post: + tags: [reports] + summary: Gets an asset availability history report for multiple assets. + description: Gets a CSV file report conatining asset availability history for multiple assets based on the specified timespans. + operationId: query-assets-availability-report + x-ni-auth: true + parameters: + - $ref: '#/parameters/QueryAssetsAvailabilityReportRequestBody' + responses: + 200: + description: A CSV file report conatining the asset availability history of the assets specified by their IDs during the given time intervals. + schema: + type: file + example: "Asset Id,Asset Name,Start Date,End Date,System Alias,Availability Percentage\n0030b58e-4e1a-47ea-9e1e-d60ba3341551,PXI3Slot7,2020-11-10 00:00:00Z,2021-01-06 00:00:00Z,NI_PXIe-8133_Embedded_Controller--MAC-00-80-2F-14-2C-06,0.0815299529054917" + headers: + X-Not-Found-Resources: + description: The IDs of the resources that were not found. + type: array + items: + type: string + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' /v1/delete-assets: post: tags: [assets] diff --git a/auth/niauth.yaml b/auth/niauth.yaml index 74a1e87..fe42e22 100644 --- a/auth/niauth.yaml +++ b/auth/niauth.yaml @@ -409,6 +409,21 @@ paths: default: $ref: '#/responses/Error' + /user: + get: + tags: + - user + summary: Authenticates API Keys + description: Authenticates the given x-ni-api-key and returns information about the caller + operationId: user + responses: + 200: + $ref: '#/responses/UserResponse' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + definitions: AuthStatement: type: object @@ -728,6 +743,36 @@ definitions: message: There has been an error with your request args: [] innerErrors: [] + + UserPolicy: + type: object + title: User Policy + description: A policy defines what a user or device is allowed to do + properties: + id: + description: The identifier of a policy + type: string + name: + description: The policy name + type: string + templateId: + description: The identifier of a policy template + type: string + workspaceId: + description: The identifier of a workspace + type: string + + UserPolicyTemplate: + type: object + title: User Policy Template + description: A policy template defines what a user or device is allowed to do but is not bound to a workspace. When the template is referenced by a policy, the connection between the actions and the workspace is created. + properties: + id: + description: The identifier of a policy template + type: string + name: + description: The policy template name + type: string parameters: KeyId: @@ -1113,3 +1158,26 @@ responses: description: Update Policy Template Response schema: $ref: '#/definitions/PolicyTemplate' + + UserResponse: + description: User Response + schema: + type: object + title: User Response + properties: + user: + $ref: '#/definitions/User' + org: + $ref: '#/definitions/Org' + workspaces: + type: array + items: + $ref: '#/definitions/Workspace' + policies: + type: array + items: + $ref: '#/definitions/UserPolicy' + policyTemplates: + type: array + items: + $ref: '#/definitions/UserPolicyTemplate' diff --git a/file/nifile.yml b/file/nifile.yml index 8eb6813..b66e507 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -120,6 +120,10 @@ definitions: description: The file's ID within the service group type: string example: '5afb2ce3741fe11d88838cc9' + path: + description: The path to the file on the server. This field is returned only if the user has associated privileges to view file paths. + type: string + example: 'C:\temp\4afb2ce3741fe11d88838cc9.txt' properties: description: The file's properties type: object @@ -362,6 +366,15 @@ parameters: x-example: '4afb2ce3741fe11d88838cc9' responses: + PartialSuccess: + description: Partial Success in the case when only a part of the request body metadata information was processed successfully. + schema: + title: PartialSuccessResponse + description: Partial success response containing error information. + type: object + properties: + error: + $ref: '#/definitions/Error' Query: description: OK schema: @@ -679,7 +692,10 @@ paths: type: integer format: int32 properties: - description: The properties to set + description: >- + The properties to set. A map of key value properties containing the metadata to be attached. + Predefined: + - Name: This is an optional property for renaming the file. When specified, the file will be renamed. type: object additionalProperties: type: string @@ -728,6 +744,8 @@ paths: example: '5afb2ce3741fe11d88838cc9' required: [ids] responses: + 200: + $ref: '#/responses/PartialSuccess' 204: description: No content 401: diff --git a/ni-notebook-execution/ninbexec.yml b/ni-notebook-execution/ninbexec.yml index b9895e6..d64823e 100644 --- a/ni-notebook-execution/ninbexec.yml +++ b/ni-notebook-execution/ninbexec.yml @@ -772,6 +772,17 @@ definitions: dictParam: key1: val1 key2: val2 + metadata: + description: >- + Metadata associated with the notebook, at time of execution. + type: object + additionalProperties: + type: object + example: + metadataString: 'my metadata string value' + metadataDict: + key1: val1 + key2: val2 executionHash: description: >- Execution hashes are used internally to identify a distinct execution, where if this diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index 9a02235..c8a1d04 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -1937,8 +1937,6 @@ paths: responses: 200: $ref: '#/responses/PartialSuccess' - 204: - description: No Content. 400: $ref: '#/responses/BadRequest' 401: diff --git a/systems-state/nisystemsstate.yml b/systems-state/nisystemsstate.yml index e776e98..9fb0fac 100644 --- a/systems-state/nisystemsstate.yml +++ b/systems-state/nisystemsstate.yml @@ -252,6 +252,7 @@ definitions: - ARM - X64 - X86 + - ANY example: ARM StateDistribution: @@ -262,6 +263,7 @@ definitions: - NI_LINUXRT - NI_LINUXRT_NXG - WINDOWS + - ANY example: NI_LINUXRT StateMetadata: @@ -369,6 +371,8 @@ definitions: type: array items: $ref: '#/definitions/Feed' + systemImage: + $ref: '#/definitions/SystemImage' packages: type: array items: @@ -404,6 +408,8 @@ definitions: type: array items: $ref: '#/definitions/Feed' + systemImage: + $ref: '#/definitions/SystemImage' packages: type: array items: @@ -456,6 +462,8 @@ definitions: type: array items: $ref: '#/definitions/Feed' + systemImage: + $ref: '#/definitions/SystemImage' packages: type: array items: @@ -545,6 +553,27 @@ definitions: url: ni.com compressed: true + SystemImage: + description: Object defining a system image containing the name, version and optionally if the image should be reinstalled if it is already installed. + type: object + properties: + name: + type: string + description: Name of the system image. + version: + type: string + description: Version of the system image. + reinstall: + type: boolean + description: Whether the image should be reinstalled if it is already installed. + default: false + required: + - name + - version + example: + name: dist-nilrt-grub + version: '20.5.0' + Package: description: Object defining a package containing the name and version. type: object @@ -561,6 +590,7 @@ definitions: default: true required: - name + - version example: name: vim version: '7.1' diff --git a/tag-rule/nitagrule.yml b/tag-rule/nitagrule.yml index 95e49b1..60a8b33 100644 --- a/tag-rule/nitagrule.yml +++ b/tag-rule/nitagrule.yml @@ -117,7 +117,10 @@ definitions: setPoints: description: Values compared against the tag's current value to determine whether or not the condition is true. Conditions associated with the IN_RANGE and OUT_OF_RANGE comparators will have two set - points. All other conditions should have only one set point. + points. All other conditions should have only one set point. For tags of the DATE_TIME type, a timespan + (for example, "01:00:00") is a valid value and represents a time interval relative to the server's current + time when the rule is evaluated. Positive timespans represent times in the future, and negative timespans + represent times in the past. The expected timespan format is `[-]d.hh:mm:ss.ff`. type: array items: type: string @@ -156,9 +159,11 @@ definitions: TagDataType: title: Tag Data Type description: The data type of the tags which a rule applies to. Rules are only evaluated - against tags whose data type matches their *tagDataType*. + against tags whose data type matches their *tagDataType*. For the TAG_TIME type, rules are + evaluated against a tag's last updated time rather than its value. These rules will match tags + of any data type. type: string - enum: [DOUBLE, INT, STRING, BOOLEAN, U_INT64, DATE_TIME] + enum: [DOUBLE, INT, STRING, BOOLEAN, U_INT64, DATE_TIME, TAG_TIME] example: DOUBLE Conditions: description: Array containing one or more conditions which control when a rule creates or clears alarms. diff --git a/tag/nitag.yml b/tag/nitag.yml index 331c19a..c9edc19 100644 --- a/tag/nitag.yml +++ b/tag/nitag.yml @@ -131,6 +131,42 @@ responses: type: string paths: + /: + get: + tags: [versioning] + summary: API information + description: Returns information about API versions and available operations. + operationId: RootEndpoint + security: [] + responses: + 200: + description: OK + schema: + title: Root Endpoint Response + description: Version information. + type: object + properties: + version: + description: Implementation version of the web service. + type: string + v2: + $ref: '#/definitions/V2Operations' + default: + $ref: '#/responses/Error' + /v2: + get: + tags: [versioning] + summary: API version information + description: Returns available operations for a single version of the API. + operationId: RootEndpointWithVersion + security: [] + responses: + 200: + description: OK + schema: + $ref: '#/definitions/V2Operations' + default: + $ref: '#/responses/Error' /v2/subscriptions: post: tags: @@ -141,7 +177,7 @@ paths: parameters: - in: body name: subscription - description: Subscription to create + description: Subscription to create. schema: $ref: '#/definitions/Subscription' required: true @@ -149,20 +185,20 @@ paths: 200: description: Success schema: - description: Response for creating a subscription + description: Response for creating a subscription. type: object title: Create Subscription Response properties: subscriptionId: type: string nonexistentTags: - description: List of tags which did not exist + description: List of tags which did not exist. type: array items: type: string alias: type: string - description: Name of the subscription + description: Name of the subscription. 401: $ref: '#/responses/Unauthorized' default: @@ -171,19 +207,19 @@ paths: tags: - subscriptions summary: Get active subscription IDs - description: Returns a list of all active subscription IDs + description: Returns a list of all active subscription IDs. operationId: GetSubscriptions parameters: [] responses: 200: description: Success schema: - description: Get subscriptions response + description: Get subscriptions response. type: object title: Get Subscriptions Response properties: subscriptionIds: - description: List of all the active subscription IDs + description: List of all the active subscription IDs. type: array items: type: string @@ -196,7 +232,7 @@ paths: tags: - subscriptions summary: Get a subscription - description: Returns a subscription's metadata + description: Returns a subscription's metadata. operationId: GetSubscription parameters: - in: path @@ -227,7 +263,7 @@ paths: required: true responses: 204: - description: Subscription successfully deleted + description: Subscription successfully deleted. 401: $ref: '#/responses/Unauthorized' default: @@ -285,7 +321,7 @@ paths: parameters: - in: body name: subscriptionIds - description: IDs of the subscriptions whose heartbeat timers you want to update + description: IDs of the subscriptions whose heartbeat timers you want to update. required: true schema: $ref: '#/definitions/SubscriptionIds' @@ -301,12 +337,12 @@ paths: tags: - subscriptions summary: Update the heartbeat timer for multiple subscriptions - description: Updates the heartbeat timers for multiple subscriptions + description: Updates the heartbeat timers for multiple subscriptions. operationId: UpdateSubscriptionHeartbeats parameters: - in: body name: subscriptionIds - description: IDs of the subscriptions whose heartbeat timers you want to update + description: IDs of the subscriptions whose heartbeat timers you want to update. required: true schema: $ref: '#/definitions/SubscriptionIds' @@ -328,7 +364,7 @@ paths: parameters: - in: body name: subscriptionIds - description: IDs of the subscriptions whose heartbeat timers should be updated + description: IDs of the subscriptions whose heartbeat timers should be updated. required: true schema: $ref: '#/definitions/SubscriptionIds' @@ -370,7 +406,7 @@ paths: parameters: - in: body name: subscriptionIds - description: IDs of the subscriptions whose heartbeat timers should be updated + description: IDs of the subscriptions whose heartbeat timers should be updated. required: true schema: $ref: '#/definitions/SubscriptionIds' @@ -378,12 +414,12 @@ paths: 200: description: Success schema: - description: Response for deleting subscriptions + description: Response for deleting subscriptions. type: object title: Delete Subscriptions Response properties: invalidSubscriptionIds: - description: List of invalid subscription IDs + description: List of invalid subscription IDs. type: array items: type: string @@ -408,12 +444,12 @@ paths: 200: description: Success schema: - description: Response for deleting subscriptions + description: Response for deleting subscriptions. type: object title: Delete Subscriptions Response properties: invalidSubscriptionIds: - description: List of invalid subscription IDs + description: List of invalid subscription IDs. type: array items: type: string @@ -431,7 +467,7 @@ paths: parameters: - in: body name: selection - description: Selection to create + description: Selection to create. schema: $ref: '#/definitions/Selection' required: true @@ -469,7 +505,7 @@ paths: tags: - selections summary: Modify a selection - description: Modifies a selection's metadata + description: Modifies a selection's metadata. operationId: UpdateSelection parameters: - in: path @@ -479,7 +515,7 @@ paths: required: true - in: body name: selection - description: Selection to replace the existing selection with + description: Selection to replace the existing selection with. schema: $ref: '#/definitions/Selection' required: true @@ -519,7 +555,7 @@ paths: tags: - selections summary: Delete a selection - description: Deletes a selection + description: Deletes a selection. operationId: DeleteSelection parameters: - in: path @@ -529,7 +565,7 @@ paths: required: true responses: 204: - description: Successfully deleted + description: Successfully deleted. 401: $ref: '#/responses/Unauthorized' default: @@ -539,7 +575,7 @@ paths: tags: - selections summary: Get the tags in a selection, including their current and aggregate values - description: Returns the tags in a selection, including their current and aggregate values + description: Returns the tags in a selection, including their current and aggregate values. operationId: GetSelectionTagsWithValues parameters: - in: path @@ -559,7 +595,7 @@ paths: tags: - selections summary: Get the tags in a selection - description: Returns the metadata of the tags in a selection + description: Returns the metadata of the tags in a selection. operationId: GetSelectionTags parameters: - in: path @@ -582,7 +618,7 @@ paths: tags: - selections summary: Delete all of the tags in a selection - description: Deletes all of the tags in a seletion + description: Deletes all of the tags in a selection. operationId: DeleteSelectionTags parameters: - in: path @@ -650,7 +686,7 @@ paths: tags: - selections summary: Get the current values of the tags in a selection, excluding timestamps - description: Returns the current values of the tags in a selection, excluding timestamps + description: Returns the current values of the tags in a selection, excluding timestamps. operationId: GetSelectionCurrentValues parameters: - in: path @@ -674,7 +710,7 @@ paths: tags: - selections summary: Get the timestamps of the current values of the tags in a selection - description: Gets the timestamps of the current values of the tags in a selection + description: Gets the timestamps of the current values of the tags in a selection. operationId: GetSelectionValuesCurrentTimestamp parameters: - in: path @@ -686,7 +722,7 @@ paths: 200: description: Success schema: - description: Array containing the paths of the tags in the selection, along with the timestamp of their current values + description: Array containing the paths of the tags in the selection, along with the timestamp of their current values. type: array title: Tag Paths With Timestamps items: @@ -700,7 +736,7 @@ paths: tags: - selections summary: Get the "min" aggregate values for the tags in a selection - description: Returns the minimum aggregate values for the tags in a selection + description: Returns the minimum aggregate values for the tags in a selection. operationId: GetSelectionMinValues parameters: - in: path @@ -725,7 +761,7 @@ paths: tags: - selections summary: Get the "max" aggregate values for the tags in a selection - description: Returns the maximum aggregate values for the tags in a selection + description: Returns the maximum aggregate values for the tags in a selection. operationId: GetSelectionMaxAggregates parameters: - in: path @@ -750,7 +786,7 @@ paths: tags: - selections summary: Get the "avg" aggregate values for the tags in a selection - description: Returns the mean aggregate values for the tags in a selection + description: Returns the mean aggregate values for the tags in a selection. operationId: GetSelectionMeanValues parameters: - in: path @@ -775,7 +811,7 @@ paths: tags: - selections summary: Get the "count" aggregate values for the tags in a selection - description: Returns the count aggregate values for the tags in a selection + description: Returns the count aggregate values for the tags in a selection. operationId: GetSelectionCountValues parameters: - in: path @@ -800,7 +836,7 @@ paths: tags: - selections summary: Reset the aggregates of all tags in a selection - description: Resets the aggregate values for all tags in a selection + description: Resets the aggregate values for all tags in a selection. operationId: ResetSelectionAggregates parameters: - in: path @@ -883,7 +919,7 @@ paths: parameters: - in: query name: path - description: Comma-separated list of tag paths. May include glob-style wildcards + description: Comma-separated list of tag paths. May include glob-style wildcards. type: string required: false x-example: foo,bar,baz,*.System.Health.* @@ -912,7 +948,7 @@ paths: default: 100000 - in: query name: workspace - description: Workspace to search for tags + description: Workspace to search for tags. type: string required: false x-example: "b71390c0-977b-4153-a939-487b0b7a1fa5" @@ -933,7 +969,7 @@ paths: parameters: [] responses: 200: - description: Contains the number of tags + description: Contains the number of tags. schema: type: integer example: 2 @@ -960,7 +996,7 @@ paths: parameters: - in: query name: path - description: Comma-separated list of tag paths. May include glob-style wildcards + description: Comma-separated list of tag paths. May include glob-style wildcards. type: string required: false x-example: foo,bar,baz,*.System.Health.* @@ -972,7 +1008,7 @@ paths: x-example: foo,bar,baz - in: query name: properties - description: Comma-separated list of name=value strings + description: Comma-separated list of name=value strings. type: string required: false x-example: foo=bar,baz=boo @@ -989,7 +1025,7 @@ paths: default: 100000 - in: query name: workspace - description: Workspace to search for tags + description: Workspace to search for tags. type: string required: false x-example: "b71390c0-977b-4153-a939-487b0b7a1fa5" @@ -997,7 +1033,7 @@ paths: get: tags: - tags - description: Get a tag and its value + description: Get a tag and its value. summary: Returns a tag and its current value operationId: GetTagWithValueInWorkspace parameters: @@ -1026,7 +1062,7 @@ paths: get: tags: - tags - description: Get a tag and its value from the default workspace + description: Get a tag and its value from the default workspace. summary: Returns a tag and its current value operationId: GetTagWithValue parameters: @@ -1098,7 +1134,7 @@ paths: tags: - tags summary: Delete a tag - description: Deletes a tag + description: Deletes a tag. operationId: DeleteTag parameters: - in: path @@ -1160,6 +1196,43 @@ paths: $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' + /v2/tags/{workspace}/{path}/values/current: + put: + tags: + - tags + summary: Update the current value of a tag. + description: Updates the current value of the tag at the path within the given workspace. + operationId: UpdateTagCurrentValuesInWorkspace + parameters: + - in: path + name: workspace + description: The ID of the workspace containing the tag. + type: string + required: true + x-example: "f0144202-52d5-4861-98fa-615ed4b2f751" + - in: path + name: path + description: The tag path. + type: string + required: true + x-example: "my-tag-path" + - in: body + name: tagValue + description: A timestamped tag value. + schema: + type: array + items: + $ref: '#/definitions/TimestampedTagValue' + responses: + 202: + description: Accepted + 400: + description: Bad request + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v2/tags/{path}/values/current: get: tags: @@ -1216,7 +1289,7 @@ paths: tags: - tags summary: Get the timestamp of a tag's current value - description: Returns the timestamp of the tag's current value + description: Returns the timestamp of the tag's current value. operationId: GetTagCurrentValueTimestamp parameters: - in: path @@ -1238,7 +1311,7 @@ paths: tags: - tags summary: Get the current value of a tag without its timestamp - description: Returns the current value of a tag + description: Returns the current value of a tag. operationId: GetTagCurrentValueWithoutTimestamp parameters: - in: path @@ -1260,7 +1333,7 @@ paths: tags: - tag aggregates summary: Get the value of a tag's "min" aggregate - description: Get the value of a tag's "min" aggregate + description: Get the value of a tag's "min" aggregate. operationId: GetTagMinimum parameters: - in: path @@ -1284,15 +1357,15 @@ paths: tags: - tag aggregates summary: Get the value of a tag's "max" aggregate - description: Get the value of a tag's "max" aggregate + description: Get the value of a tag's "max" aggregate. operationId: GetTagMaxAggregate responses: 200: - description: Maximum aggregate value + description: Maximum aggregate value. schema: type: string 204: - description: No aggregate value found + description: No aggregate value found. 401: $ref: '#/responses/Unauthorized' default: @@ -1308,16 +1381,16 @@ paths: tags: - tag aggregates summary: Get the value of a tag's "avg" aggregate - description: Get the value of a tag's "avg" aggregate + description: Get the value of a tag's "avg" aggregate. operationId: GetTagMeanAggregate responses: 200: - description: Mean aggregate value + description: Mean aggregate value. schema: type: number format: double 204: - description: No aggregate value found + description: No aggregate value found. 401: $ref: '#/responses/Unauthorized' default: @@ -1333,7 +1406,7 @@ paths: tags: - tag aggregates summary: Get the value of a tag's "count" aggregate - description: Get the value of a tag's "count" aggregate + description: Get the value of a tag's "count" aggregate. operationId: GetTagCountAggregate parameters: - in: path @@ -1343,11 +1416,11 @@ paths: required: true responses: 200: - description: Count aggregate value + description: Count aggregate value. schema: type: integer 204: - description: No aggregate value found + description: No aggregate value found. 401: $ref: '#/responses/Unauthorized' default: @@ -1507,7 +1580,7 @@ paths: parameters: - in: body name: tagQuery - description: Request body consisting of filtering criteria to apply when retrieving tags + description: Request body consisting of filtering criteria to apply when retrieving tags. schema: $ref: '#/definitions/TagQuery' required: true @@ -1574,7 +1647,7 @@ paths: tags: - tags summary: Delete a tag from the given workspace - description: Deletes a tag + description: Deletes a tag. operationId: DeleteTagInWorkspace parameters: - in: path @@ -1594,27 +1667,76 @@ paths: $ref: '#/responses/Error' definitions: + Operation: + description: An operation in the API. + type: object + properties: + version: + type: integer + description: The version of the available operation. + example: 2 + V2Operations: + title: V2 Operations + description: An object containing available operations in the V2 version of the API. + type: object + properties: + operations: + description: >- + Available operations in the V2 version of the API: + + - createSubscriptions: Create tag subscriptions + + - createSelections: Select a group of tags + + - createTags: Create tags + + - deleteTags: Delete tags + + - getTagMetadata: Get information about tags + + - readTagValues: Read tag values + + - updateTagMetadata: Update information about tags + + - writeTagValues: Update tag values + properties: + createSubscriptions: + $ref: '#/definitions/Operation' + createSelections: + $ref: '#/definitions/Operation' + createTags: + $ref: '#/definitions/Operation' + deleteTags: + $ref: '#/definitions/Operation' + getTagMetadata: + $ref: '#/definitions/Operation' + readTagValues: + $ref: '#/definitions/Operation' + updateTagMetadata: + $ref: '#/definitions/Operation' + writeTagValues: + $ref: '#/definitions/Operation' Error: - description: Contains error information + description: Contains error information. type: object properties: name: - description: String error code + description: String error code. type: string code: - description: Numeric error code + description: Numeric error code. type: integer resourceType: - description: Type of resource associated with the error + description: Type of resource associated with the error. type: string resourceId: - description: Identifier of the resource associated with the error + description: Identifier of the resource associated with the error. type: string message: - description: Complete error message + description: Complete error message. type: string args: - description: Positional argument values for the error code + description: Positional argument values for the error code. type: array items: type: string @@ -1634,7 +1756,7 @@ definitions: title: Tag Data Type enum: [DOUBLE, INT, STRING, BOOLEAN, U_INT64, DATE_TIME] TagWithValue: - description: A tag and its current value + description: A tag and its current value. type: object title: Tag With Value properties: @@ -1660,7 +1782,7 @@ definitions: avg: 2.0 count: 5 TagValue: - description: Value of a tag + description: Value of a tag. type: object title: Tag Value required: [value,type] @@ -1679,7 +1801,7 @@ definitions: path: type: string count: - description: Count value from the tag's aggregates + description: Count value from the tag's aggregates. type: integer workspace: type: string @@ -1688,7 +1810,7 @@ definitions: count: 1 workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithCurrentAndAggregateValue: - description: Tag path with its current value and aggregates + description: Tag path with its current value and aggregates. type: object title: Tag Path Current And Aggregate Value properties: @@ -1713,13 +1835,13 @@ definitions: count: 5 workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithTimestampedValue: - description: Tag path with timestamped value + description: Tag path with timestamped value. type: object title: Tag Path with Timestamped Value properties: path: type: string - description: Tag path + description: Tag path. current: $ref: '#/definitions/TimestampedTagValue' workspace: @@ -1733,13 +1855,13 @@ definitions: timestamp: '2018-09-04T18:45:08Z' workspace: "f0144202-52d5-4861-98fa-615ed4b2f751" TagPathWithValue: - description: Tag path with value + description: Tag path with value. type: object title: Tag Path With Value properties: path: type: string - description: Tag path + description: Tag path. current: $ref: '#/definitions/TagValue' workspace: @@ -1753,10 +1875,10 @@ definitions: TagPathWithTimestamp: type: object title: Tag Path with Timestamp - description: A tag path and the timestamp of its current value + description: A tag path and the timestamp of its current value. properties: timestamp: - description: Timestamp associated with the current value + description: Timestamp associated with the current value. type: string format: date-time example: '2018-09-04T18:45:08Z' @@ -1775,7 +1897,7 @@ definitions: path: type: string max: - description: Maximum value from the tag's aggregates + description: Maximum value from the tag's aggregates. type: string workspace: type: string @@ -1790,7 +1912,7 @@ definitions: path: type: string min: - description: Minimum value from the tag's aggregates + description: Minimum value from the tag's aggregates. type: string workspace: type: string @@ -1805,7 +1927,7 @@ definitions: path: type: string avg: - description: Mean value from the tag's aggregates + description: Mean value from the tag's aggregates. type: number format: double workspace: @@ -1872,20 +1994,20 @@ definitions: enum: [PATH, VALUE, TIMESTAMP, WORKSPACE] default: PATH descending: - description: A Boolean that determines whether to return the tags in descending order + description: A Boolean that determines whether to return the tags in descending order. type: boolean default: false projection: - description: The tag metadata and value fields to return + description: The tag metadata and value fields to return. type: string default: '' continuationToken: description: >- A token used for resuming a query at the next item in the matching tag set; to - obtain the next page of steps, pass the token to the service on a subsequent request + obtain the next page of steps, pass the token to the service on a subsequent request. type: string take: - description: Maximum number of tags to return + description: Maximum number of tags to return. type: number default: 100000 minimum: -1 @@ -1897,14 +2019,14 @@ definitions: continuationToken: token take: 20 TimestampedTagValue: - description: Current value of a tag + description: Current value of a tag. type: object title: Timestamped Tag Value properties: value: $ref: '#/definitions/TagValue' timestamp: - description: Timestamp associated with the value + description: Timestamp associated with the value. type: string format: date-time example: @@ -1937,18 +2059,18 @@ definitions: title: Tag Aggregate Value properties: min: - description: Minimum aggregate value + description: Minimum aggregate value. type: number format: double max: - description: Maximum aggregate value + description: Maximum aggregate value. type: number format: double count: - description: Count aggregate value + description: Count aggregate value. type: integer avg: - description: Mean aggregate value + description: Mean aggregate value. type: number format: double example: @@ -1957,21 +2079,21 @@ definitions: avg: 2.0 count: 5 V2TagAggregates: - description: Aggregate values of a tag + description: Aggregate values of a tag. type: object title: Tag Aggregate Value properties: min: - description: Minimum aggregate value + description: Minimum aggregate value. type: string max: - description: Maximum aggregate value + description: Maximum aggregate value. type: string count: - description: Count aggregate value + description: Count aggregate value. type: integer avg: - description: Mean aggregate value + description: Mean aggregate value. type: number format: double example: @@ -1980,7 +2102,7 @@ definitions: avg: 2.0 count: 5 Tag: - description: Object containing a tag's metadata, excluding current and aggregate values + description: Object containing a tag's metadata, excluding current and aggregate values. type: object title: Tag Data required: [path,type] @@ -2037,7 +2159,7 @@ definitions: timestamp: '2018-09-04T18:45:08Z' workspace: "bbcd6db8-10f6-4caf-af28-81157b741a5a" V1SubscriptionUpdate: - description: Updates for a subscriptions + description: Updates for a subscriptions. type: object title: Subscription Update properties: @@ -2048,25 +2170,25 @@ definitions: subscriptionId: type: string nonexistentTags: - description: List of tags which did not exist + description: List of tags which did not exist. type: array items: type: string deletedTags: - description: List of tags which have been deleted + description: List of tags which have been deleted. type: array items: type: string createdTags: - description: List of tags which have been created + description: List of tags which have been created. type: array items: type: string alias: - description: Name of the subscription + description: Name of the subscription. type: string V2SubscriptionUpdate: - description: Updates for a subscriptions + description: Updates for a subscriptions. type: object title: Subscription Update properties: @@ -2077,35 +2199,35 @@ definitions: subscriptionId: type: string nonexistentTags: - description: List of tags which did not exist + description: List of tags which did not exist. type: array items: type: string deletedTags: - description: List of tags which have been deleted + description: List of tags which have been deleted. type: array items: type: string createdTags: - description: List of tags which have been created + description: List of tags which have been created. type: array items: type: string alias: - description: Name of the subscription + description: Name of the subscription. type: string V1SubscriptionTagUpdate: - description: Update details for a tag subscription + description: Update details for a tag subscription. type: object title: Subscription Tag Update properties: value: - description: Updated tag value + description: Updated tag value. type: string type: $ref: '#/definitions/TagType' timestamp: - description: Updated timestamp + description: Updated timestamp. type: string format: date-time tag: @@ -2129,17 +2251,17 @@ definitions: avg: 2.0 count: 5 V2SubscriptionTagUpdate: - description: Update details for a tag subscription + description: Update details for a tag subscription. type: object title: Subscription Tag Update properties: value: - description: Updated tag value + description: Updated tag value. type: string type: $ref: '#/definitions/TagType' timestamp: - description: Updated timestamp + description: Updated timestamp. type: string format: date-time tag: @@ -2163,25 +2285,25 @@ definitions: avg: 2.0 count: 5 Subscription: - description: Object describing a subscription's metadata + description: Object describing a subscription's metadata. type: object title: Subscription required: [tags] properties: updatesOnly: - description: Whether to notify only about updates + description: Whether to notify only about updates. type: boolean default: false tags: - description: List of subscribed tag paths + description: List of subscribed tag paths. type: array items: type: string alias: - description: Name of the subscription + description: Name of the subscription. type: string workspace: - description: Workspace of the tags to subscribe to + description: Workspace of the tags to subscribe to. type: string example: updatesOnly: true @@ -2196,7 +2318,7 @@ definitions: items: type: string Selection: - description: Object describing a selection's metadata + description: Object describing a selection's metadata. type: object title: Selection required: @@ -2207,14 +2329,14 @@ definitions: items: type: string inactivityTimeout: - description: Inactivity timeout in seconds + description: Inactivity timeout in seconds. type: integer maximum: 900 default: 900 id: type: string workspace: - description: Workspace of the tags to select + description: Workspace of the tags to select. type: string example: searchPaths: [tag1, tag2, tag3] diff --git a/tdm-reader/nitdmreader.yml b/tdm-reader/nitdmreader.yml index 41a78cc..2d104c0 100644 --- a/tdm-reader/nitdmreader.yml +++ b/tdm-reader/nitdmreader.yml @@ -426,43 +426,46 @@ definitions: description: Total number of names. This might be more than the number of names in the list. example: 1 FileInformation: - type: array - items: + type: object + properties: + fileId: + type: string + description: File ID + example: "5b8453dba8808c22b0f99023" properties: - fileId: - type: string - description: File ID - example: "5b8453dba8808c22b0f99023" - properties: - $ref: '#/definitions/Properties' - groups: - type: array - items: + $ref: '#/definitions/Properties' + groups: + type: array + items: + properties: + name: + type: string + description: Group name + example: Group 1 properties: - name: - type: string - description: Group name - example: Group 1 - properties: - $ref: '#/definitions/Properties' - channels: - type: array - items: + $ref: '#/definitions/Properties' + channels: + type: array + items: + properties: + name: + type: string + description: Channel name + example: Channel 1 + dataCount: + type: number + description: Number of data points in the channel + example: 1 + dataType: + type: string + description: Data type of this channel + example: String properties: - name: - type: string - description: Channel name - example: Channel 1 - dataCount: - type: number - description: Number of data points in the channel - example: 1 - dataType: - type: string - description: Data type of this channel - example: String - properties: - $ref: '#/definitions/Properties' + $ref: '#/definitions/Properties' + FileInformationList: + type: array + items: + $ref: '#/definitions/FileInformation' paths: /: get: @@ -555,7 +558,7 @@ paths: 200: description: OK schema: - $ref: '#/definitions/FileInformation' + $ref: '#/definitions/FileInformationList' default: description: Error schema: @@ -582,7 +585,7 @@ paths: 200: description: OK schema: - $ref: '#/definitions/FileInformation' + $ref: '#/definitions/FileInformationList' default: description: Error schema: diff --git a/user/niuser.yaml b/user/niuser.yaml index 77dcbfb..78b0ba4 100644 --- a/user/niuser.yaml +++ b/user/niuser.yaml @@ -572,7 +572,7 @@ parameters: properties: type: type: string - enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user] + enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user, oidc-claim] description: The Auth Mapping type policyId: type: string @@ -605,7 +605,7 @@ parameters: properties: type: type: string - enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user] + enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user, oidc-claim] description: The Auth Mapping type policyId: type: string From 87a3448ba368685a56e6295263eb814bfd514da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tian=20Yu=20=F0=9F=8D=80?= Date: Fri, 16 Apr 2021 15:53:00 +0000 Subject: [PATCH 04/37] Merged PR 147691: Extend FileIngestion Service to allow force delete files - adjust swagger doc - implement the logic to force delete files - extend/add tests ![image.png](https://ni.visualstudio.com/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_apis/git/repositories/8159353b-4403-4eed-9a32-0c2ee30abe3d/pullRequests/147691/attachments/image.png) Related work items: #1412297, #1412298, #1412299 --- file/nifile.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/file/nifile.yml b/file/nifile.yml index b66e507..4739058 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -608,6 +608,12 @@ paths: $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' + parameters: + - in: query + name: force + description: Whether the deletion of a file will be forced + type: boolean + default: false /v1/service-groups/Default/files/{id}/data: parameters: - $ref: '#/parameters/id' @@ -726,6 +732,11 @@ paths: x-ni-operation: deleteFiles x-ni-request-variables: [REMOTE_USER, USER_NAME] parameters: + - in: query + name: force + description: Whether the deletion of files will be forced + type: boolean + default: false - in: body name: files description: The description of files to delete From 7c02db15113fe07169b1db2851e555793769de5d Mon Sep 17 00:00:00 2001 From: Andreas Krantz Date: Tue, 20 Apr 2021 13:28:51 +0000 Subject: [PATCH 05/37] Merged PR 145036: This is a proposed fix for the bug 1355793 allowing old python clients to sta... # Justification The OpenAPI description of contains an wrong `operationId: getChannelPropertiesCount` at the `/v1/files/{fileId}/groups:` that should be named getGroups according to getChannels later on. In the generated python client stubs the method is called getChannelPropertiesCount but returns the groups. # Implementation Duplicate the entry and make a redirect to make sure python scripts using the old operationId do not break. Pick a path name that makes sure this entry is just there because of compatibility. `/v0/files/{fileId}/groups:` # Related BUG This is a proposed fix for the bug 1355793 allowing old python clients to stay stable with the generated stub. # Decision Because we do not believe that users are out there we just fix the OperationId Related work items: #1355793 --- tdm-reader/nitdmreader.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdm-reader/nitdmreader.yml b/tdm-reader/nitdmreader.yml index 2d104c0..ea2f8e3 100644 --- a/tdm-reader/nitdmreader.yml +++ b/tdm-reader/nitdmreader.yml @@ -595,7 +595,7 @@ paths: tags: [metadata] summary: Lists all groups in the file description: Lists all group names in the file. - operationId: getChannelPropertiesCount + operationId: getGroups x-ni-auth: true x-ni-request-variables: [REMOTE_USER] x-ni-request-timeout: 60000 From 8de837a39ded90dc3e33a2c93163cae45293795b Mon Sep 17 00:00:00 2001 From: Mary Fletcher Date: Tue, 20 Apr 2021 19:36:46 +0000 Subject: [PATCH 06/37] Merged PR 147792: Add missing Swagger documentation for tag historian # Justification #1379368 The Swagger documentation for tag history was missing the following routes: * nitaghistorian/v2/storage * nitaghistorian/v2/tags/insert-values * nitaghistorian/v2/tags/delete-values-by-range * nitaghistorian/v2/tags/flush-values * We do not want to document flush-values because it's a no-op in the new service. It was necessary in the old service for performance reasons. * nitaghistorian/v2/tags/update-metadata * We do not want to document update-metadata because it only updates the copy of the metadata held by tag historian and causes tag historian to get out of sync with the tag service. # Implementation Added documentation. # Testing I imported the yml file into insomnia and tested the requests. # Checklist - [x] I tested changes to product code in product - [x] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Related work items: #1379368 --- tag-historian/nitaghistorian.yml | 178 ++++++++++++++++++++++++++++--- 1 file changed, 163 insertions(+), 15 deletions(-) diff --git a/tag-historian/nitaghistorian.yml b/tag-historian/nitaghistorian.yml index 924e22f..461750d 100644 --- a/tag-historian/nitaghistorian.yml +++ b/tag-historian/nitaghistorian.yml @@ -148,12 +148,12 @@ definitions: - system1.tag1 - system2.tag1 workspace: - description: The workspace Id for querying decimated tag values. If this is not specified, the tag values from the default workspace will be returned. + description: The workspace ID for querying decimated tag values. If this is not specified, the tag values from the default workspace will be returned. type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 startTime: description: Limits the returned historical values to those written at or after the given - time in ISO-6801 format. + time in ISO-8601 format. type: string format: date-time example: '2018-09-04T18:45:08Z' @@ -192,12 +192,12 @@ definitions: - system1.tag1 - system2.tag1 workspace: - description: The workspace Id for querying tag values. If this is not specified, the tag values from the default workspace will be returned. + description: The workspace ID for querying tag values. If this is not specified, the tag values from the default workspace will be returned. type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 startTime: description: Limits the returned historical values to those written at or after the given - time in ISO-6801 format. + time in ISO-8601 format. type: string format: date-time example: '2018-09-04T18:45:08Z' @@ -220,6 +220,7 @@ definitions: type: string description: For non-decimated queries, a value generated by the server which should be sent in the next request to retrieve the next page of values. + default: '' sortOrder: description: Specifies ascending or descending order to return historical values, based on when each tag was written. @@ -235,7 +236,7 @@ definitions: type: string example: system1.tag1 workspace: - description: The workspace Id of the tag + description: The workspace ID of the tag type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 value: @@ -279,7 +280,7 @@ definitions: - value: '3.2' timestamp: '2019-03-14T09:51:38Z' workspace: - description: The workspace Id of the tag values + description: The workspace ID of the tag values type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 error: @@ -489,7 +490,7 @@ definitions: - 'system2.*' - '*.tag2' workspace: - description: The workspace Id to subscribe to for tag updates. If this is not specified, the tag values from the default workspace will be returned. + description: The workspace ID to subscribe to for tag updates. If this is not specified, the tag values from the default workspace will be returned. type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 WebSocketSubscribeResponse: @@ -543,7 +544,7 @@ definitions: items: type: string workspace: - description: The workspace Id to unsubscribe from for tag updates. If this is not specified, the default workspace is assumed. + description: The workspace ID to unsubscribe from for tag updates. If this is not specified, the default workspace is assumed. type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 WebSocketUnsubscribeResponse: @@ -556,6 +557,58 @@ definitions: type: string enum: ['TagHistorianAsyncUnsubscribeResponse'] example: TagHistorianAsyncUnsubscribeResponse + DeleteRangeOfValues: + title: Delete Range of Values + description: Defines the range of values to delete for a tag. + type: object + properties: + path: + description: A tag path identifying the tag whose historical values in the range should + be deleted. + type: string + example: system1.tag1 + startTime: + description: Limits the range of historical values being deleted to those written at or after the + given time in ISO-8601 format. + type: string + format: date-time + example: '2000-01-01T00:00:00Z' + endTime: + description: Limits the range of historical values being deleted to those written at or before the + given time in ISO-8601 format. + type: string + format: date-time + example: '2099-01-01T00:00:00Z' + workspace: + description: The workspace ID for the tag. If this is not specified, the default workspace will be used. + type: string + example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 + InsertValue: + title: Insert Value + description: Defines a value to insert for a tag. + type: object + required: + - path + - timestamp + - value + properties: + path: + description: The path of the tag for which to insert the value. + type: string + example: system1.tag1 + timestamp: + description: The timestamp for the new value in ISO-8601 format. + type: string + format: date-time + example: '2018-09-04T18:45:08Z' + value: + description: The value to insert. + type: string + example: '1234' + workspace: + description: The workspace ID for the tag. If this is not specified, the default workspace will be used. + type: string + example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 responses: Error: description: Error @@ -645,12 +698,12 @@ paths: type: string example: system1.tag1 workspace: - description: The workspace Id for querying tag values. If this is not specified, the tag values from the default workspace will be returned. + description: The workspace ID for querying tag values. If this is not specified, the tag values from the default workspace will be returned. type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 startTime: description: Limits the returned historical values to those written at or after at the - given time in ISO-6801 format. + given time in ISO-8601 format. type: string format: date-time example: '2018-09-04T18:45:08Z' @@ -673,6 +726,7 @@ paths: description: For non-decimated queries, a value generated by the server which should be sent in the next request to retrieve the next page of values. type: string + default: '' sortOrder: description: Specifies the order to return historical values, either ascending or descending order based on when each tag value was written. @@ -692,8 +746,9 @@ paths: description: For non-decimated queries, a value generated by the server which should be sent in the next request to retrieve the next page of values. type: string + default: '' workspace: - description: The workspace Id of the tag values + description: The workspace ID of the tag values type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 error: @@ -737,12 +792,12 @@ paths: - system1.tag1 - system2.tag1 workspace: - description: The workspace Id for querying decimated tag values. If this is not specified, the tag values from the default workspace will be returned. + description: The workspace ID for querying decimated tag values. If this is not specified, the tag values from the default workspace will be returned. type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 startTime: description: Limits the returned historical values to those written at or after at the - given time in ISO-6801 format. + given time in ISO-8601 format. type: string format: date-time example: '2018-09-04T18:45:08Z' @@ -788,7 +843,7 @@ paths: - value: '3.2' timestamp: '2019-03-14T09:51:38Z' workspace: - description: The workspace Id of the tag values + description: The workspace ID of the tag values type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 error: @@ -832,7 +887,7 @@ paths: - tag1 - tag2 workspace: - description: The workspace Id for exporting tag values. If this is not specified, the tag values from the default workspace will be returned. + description: The workspace ID for exporting tag values. If this is not specified, the tag values from the default workspace will be returned. type: string example: 0c80cf49-54e9-4e92-b117-3bfa574caa84 responseFormat: @@ -847,6 +902,99 @@ paths: $ref: '#/responses/Unauthorized' default: $ref: '#/responses/Error' + /v2/tags/insert-values: + post: + tags: [history] + summary: Inserts values for the specified tag + description: Inserts values for the specified tag. The tag metadata must already exist. + operationId: InsertValues + x-ni-operation: insertValues + parameters: + - in: body + name: Values + required: true + description: Defines the values to insert. + schema: + description: Defines the values to insert. + type: object + title: Insert Values Request + properties: + values: + description: The values to insert + type: array + items: + $ref: '#/definitions/InsertValue' + responses: + 204: + description: No Content + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v2/tags/delete-values-by-range: + post: + tags: [history] + summary: Deletes a range of data for the specified tag + description: Deletes a range of data for the specified tag. + operationId: DeleteValuesByRange + x-ni-operation: deleteValuesByRange + parameters: + - in: body + name: Request body + required: true + description: Defines the tag and range of values to delete. + schema: + description: Defines the tag and range of values to delete. + type: object + title: Delete Ranges of Values Request + properties: + ranges: + description: The ranges of values to delete + type: array + items: + $ref: '#/definitions/DeleteRangeOfValues' + responses: + 204: + description: No Content + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' + /v2/storage: + get: + tags: [storage] + summary: Gets statistics about the user's storage + description: Gets statistics about the user's storage. + operationId: Storage + x-ni-operation: storage + responses: + 200: + description: OK + schema: + type: object + title: Storage Response + properties: + used: + description: The amount of storage used in bytes. + type: integer + example: 1024 + limit: + description: The total amount of storage in bytes. + type: integer + example: 104857600 + resource: + description: The type of resource stored, e.g., "tags" or "files". + type: string + example: tags + lastUpdated: + description: The timestamp when the storage was last updated in ISO-8601 format. + type: string + format: date-time + example: '2000-01-01T00:00:00Z' + 401: + $ref: '#/responses/Unauthorized' + default: + $ref: '#/responses/Error' /v2/websocket: get: tags: From 93b8650bc5e869678e8220cb7af5a1ad8a5fbb14 Mon Sep 17 00:00:00 2001 From: Vlad Baja Date: Wed, 28 Apr 2021 08:53:41 +0000 Subject: [PATCH 07/37] Merged PR 153636: Add route to link files to an asset # Justification Add the assets/{assetId}/file route description in yml, as described in the spec: https://ni.visualstudio.com/DevCentral/_git/Skyline/pullrequest/147696 # Testing Online editor. # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Add route to link files to an asset --- asset-managment/niapm.yml | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index a65935f..951cb80 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -1138,6 +1138,22 @@ parameters: type: string example: Key1: Value1 + LinkFiles: + in: body + name: linkFiles + description: Link files to an asset. + required: true + schema: + title: Link Files Request + description: Link files to an asset + type: object + properties: + fileIds: + description: File IDs to be linked to an asset. + type: array + items: + type: string + example: 607fffe41e4564dda3593eb0 QueryInUseAssetsRequest: in: body name: queryInUseAssets @@ -2272,6 +2288,46 @@ responses: resourceId: BadKeyword1 message: 'Invalid keyword value: BadKeyword1.' args: [BadKeyword1] + LinkFilesPartialSuccessResponse: + description: Link Files Partial Success Response + schema: + description: Link Files Partial Success Response + title: LinkFilesPartialSuccessResponse + type: object + required: + - succeeded + properties: + succeeded: + description: File IDs that are valid. + type: array + items: + type: string + example: 607fffe41e4564dda3593eb0 + failed: + description: File IDs that are not valid. + type: array + items: + type: string + example: invalid + error: + $ref: '#/definitions/Error' + example: + succeeded: [ 607fffe41e4564dda3593eb0 ] + failed: [ invalidId ] + 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.InvalidFileId + code: -254806 + resourceType: Asset + resourceId: invalidId + message: 'The operation failed because an invalid file id was given: invalidId.' + args: [invalidId] 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: @@ -2919,6 +2975,31 @@ paths: $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' + /v1/assets/{assetId}/file: + post: + tags: [assets] + summary: Link files + description: Performs a request to link files to an asset. + operationId: link-files + x-ni-auth: true + consumes: + - application/merge-patch+json + parameters: + - $ref: '#/parameters/AssetId' + - $ref: '#/parameters/LinkFiles' + responses: + 200: + $ref: '#/responses/LinkFilesPartialSuccessResponse' + 204: + description: No Content + 400: + $ref: '#/responses/BadRequest' + 401: + $ref: '#/responses/Unauthorized' + 404: + $ref: '#/responses/NotFound' + default: + $ref: '#/responses/Error' /v1/assets/start-utilization: post: tags: [utilization] From 01c8141a0b5c2a760d31c96eb679c7cf5687cfa2 Mon Sep 17 00:00:00 2001 From: Andrei Zaicescu Date: Thu, 29 Apr 2021 09:26:49 +0000 Subject: [PATCH 08/37] Merged PR 154444: Add fileIds property on yml # Justification Task 1438372: Update swagger doccumentation to include fileIds in create and update models. # Implementation Added fileIds property on Base Asset Model # Testing # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Add fileIds on yml Related work items: #1438372 --- asset-managment/niapm.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index 951cb80..3cc5996 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -495,6 +495,12 @@ definitions: type: string description: The ID of the workspace containing the asset. example: '5bc5e9092a4fa4c71cfa7197' + fileIds: + description: The file IDs linked to the asset. + type: array + items: + type: string + example: '608a5684800e325b48837c2a' AssetCreateModel: title: Asset Create Model description: >- From 690f175f307d9f87e4b9c2b28af0609d302b86e7 Mon Sep 17 00:00:00 2001 From: Tudor Ludusan Date: Thu, 29 Apr 2021 13:03:53 +0000 Subject: [PATCH 09/37] Merged PR 154086: Updated the AssetUpdateModel in YML to include REMOVED state # Justification #1402374 # Implementation Updated models on update-assets route to include the new REMOVED state for asset presence. Models in the AssetService have already been posted for review here: !153662 # Testing Verified YAML on swagger editor. # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Related work items: #1402374 --- asset-managment/niapm.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index 3cc5996..6a6a25c 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -167,6 +167,17 @@ definitions: - UNKNOWN - NOT_PRESENT - PRESENT + AssetPresenceUpdateStatus: + title: Asset Presence Update Status + description: The status update of an asset's presence in a system. + type: string + default: NOT_PRESENT + enum: + - INITIALIZING + - UNKNOWN + - NOT_PRESENT + - PRESENT + - REMOVED CalibrationHistoryModel: title: Calibration History description: The calibration history for an asset. @@ -236,6 +247,15 @@ definitions: properties: assetPresence: $ref: '#/definitions/AssetPresenceStatus' + AssetPresenceUpdateModel: + title: Asset Presence Update Model + description: The presence update of an asset. Wraps the AssetPresenceUpdateStatus into an object. + type: object + required: + - assetPresence + properties: + assetPresence: + $ref: '#/definitions/AssetPresenceUpdateStatus' AssetPresenceWithSystemConnectionModel: title: Asset Presence With System Connection Model description: The presence of an asset and the connection of the system in which it resides. @@ -286,13 +306,22 @@ definitions: example: 2 AssetLocationWithPresenceModel: title: Asset Location With Presence Model - description: Information about the asset location and presence. Used in create or update operations. + description: Information about the asset location and presence. Used in create operations. allOf: - $ref: '#/definitions/BaseAssetLocationModel' - type: object properties: state: $ref: '#/definitions/AssetPresenceModel' + AssetLocationWithPresenceUpdateModel: + title: Asset Location With Presence Update Model + description: Information about the asset location and presence update. Used in update operations. + allOf: + - $ref: '#/definitions/BaseAssetLocationModel' + - type: object + properties: + state: + $ref: '#/definitions/AssetPresenceUpdateModel' AssetLocationModel: title: Asset Location Model description: Information about the asset location, presence and the connection status of the system in which it resides. @@ -551,7 +580,7 @@ definitions: type: string example: "123;01BB877A;4244;0" location: - $ref: '#/definitions/AssetLocationWithPresenceModel' + $ref: '#/definitions/AssetLocationWithPresenceUpdateModel' externalCalibration: $ref: '#/definitions/ExternalCalibrationWithChecksumModel' properties: From b02a1bc42e56dcd6c96c9fe309aa04c59e3b5487 Mon Sep 17 00:00:00 2001 From: Lukas Kall Date: Fri, 7 May 2021 08:41:09 +0000 Subject: [PATCH 10/37] Merged PR 157149: Export notebooks as HTML or PDF # Justification Added support for exporting notebooks as HTML or PDF and excluding code input cells from the export. #1411711 #1411744 # Implementation HTML export is implemented via the `HTMLExporter` of `nbconvert` and works out of the box. PDF export is implemented via the `WebPDFExporter` of `nbconvert` for which we extended the Python package with pyppeteer and chromium in [this PR](https://dev.azure.com/ni/DevCentral/_git/Skyline/commit/0f17c51a7e580093009c81f037ab29d000e675ae?refName=refs%2Fheads%2Fmaster). Because we updated the `nbconvert` dependency, I also had to update `papermill` and change the implementation of the `NINBExecEngine`. Because of this [breaking change](https://github.com/nteract/papermill/pull/472/files), the previous used `PapermillExecutePreprocessor` is no longer available. I re-implemented the logic to inject environment variables by using the new `PapermillNotebookClient`. # Testing Build the service locally and deployed it to a SystemLink Server installation. I verified that notebooks can be executed and the SystemLink specific environment variables are still injected. I also verified that notebooks can be exported as HTML and PDF, with or without excluding the code input cells. I will add ATS tests for this in another PR. # Checklist - [x] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Related work items: #1411711, #1411744, #1446393 --- ni-notebook-execution/ninbexec.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ni-notebook-execution/ninbexec.yml b/ni-notebook-execution/ninbexec.yml index d64823e..23bc012 100644 --- a/ni-notebook-execution/ninbexec.yml +++ b/ni-notebook-execution/ninbexec.yml @@ -274,6 +274,15 @@ definitions: enum: - HTML - PDF + NotebookExportOptions: + title: Notebook Export Options + description: Configures the notebook execution export. + type: object + properties: + excludeCodeInput: + description: Exclude the source code cell inputs of the notebook from the export. + type: boolean + default: false NotebookSortDefinitionObject: title: Notebook Sort Definition description: Defines the field and direction for sorting notebooks. @@ -523,6 +532,11 @@ definitions: specifies an export format and a resultCachePeriod, the export format would be honored and resultCachePeriod will be ignored. The file will be exported to the File Ingestion Service. $ref: '#/definitions/NotebookExportFormat' + exportOptions: + description: >- + Configures the rendered output of the executed notebook. This will be ignored if no export + is created. + $ref: '#/definitions/NotebookExportOptions' ExecutionHashInformation: title: Execution Hash Information description: >- From 7545a81f8cc747054520ef5bb1d8839ea58dcddb Mon Sep 17 00:00:00 2001 From: Timo Emondts Date: Mon, 10 May 2021 15:39:47 +0000 Subject: [PATCH 11/37] Merged PR 158162: US 1449042: Support workspace filtering in Query Files # Justification The workspace support in LabVIEW File API requires backend support. Files of a certain workspace should be queryable. The following four cases are supported: - no workspace given => search everything - (*) => search everything - ws_id => search in that workspace - ws_id,ws_id => search in those workspaces # Implementation Add workspace as query parameter and filter for workspace if set and not equal (*). # Testing Manual testing for *, one workspace, multiple workspaces Implement unit tests Related work items: #1449042 --- file/nifile.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/file/nifile.yml b/file/nifile.yml index 4739058..d161b97 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -338,7 +338,9 @@ definitions: - downloadData: The ability to download file data - - listFiles: The ability to query and list available files and service groups + - listFiles: The ability to list available files and service groups + + - queryFiles: The ability to query available files and service groups - updateMetadata: The ability to update file metadata properties @@ -351,6 +353,8 @@ definitions: $ref: '#/definitions/Operation' listFiles: $ref: '#/definitions/Operation' + queryFiles: + $ref: '#/definitions/Operation' updateMetadata: $ref: '#/definitions/Operation' uploadFiles: @@ -803,6 +807,12 @@ paths: default: 1000 minimum: 0 maximum: 1000 + - in: query + name: workspace + description: Limit the query to the workspace with the given id. New in version 4 of this operation. + type: string + default: null + x-example: 1f2641dd-a5ac-4869-835e-5340b4cd386c - in: body name: query description: The queries used to filter the result From 48d039cf326ef0569fb896826928c8646d8ce37c Mon Sep 17 00:00:00 2001 From: Andrei Zaicescu Date: Wed, 26 May 2021 09:55:24 +0000 Subject: [PATCH 12/37] Merged PR 164847: Add `unlink file` route to swagger # Justification https://ni.visualstudio.com/DevCentral/_workitems/edit/1469322/ # Implementation ![image.png](https://ni.visualstudio.com/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_apis/git/repositories/8159353b-4403-4eed-9a32-0c2ee30abe3d/pullRequests/164847/attachments/image.png) ![image (2).png](https://ni.visualstudio.com/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_apis/git/repositories/8159353b-4403-4eed-9a32-0c2ee30abe3d/pullRequests/164847/attachments/image%20%282%29.png) # Testing I testes on swagger online editor. # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Add unlink route to swagger Related work items: #1469322 --- asset-managment/niapm.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index 6a6a25c..efe0f22 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -971,6 +971,13 @@ parameters: type: string required: true x-example: "29162;01B245D6;4243;0" + FileId: + in: path + name: fileId + description: The identifier of a file. + type: string + required: true + x-example: "607fffe41e4564dda3593eb0" Skip: in: query name: skip @@ -3035,6 +3042,27 @@ paths: $ref: '#/responses/NotFound' default: $ref: '#/responses/Error' + /v1/assets/{assetId}/files/{fileId}: + delete: + tags: [assets] + summary: Unlink files + description: Performs a request to unlink a file from an asset. + operationId: unlink-files + x-ni-auth: true + consumes: + - application/merge-patch+json + parameters: + - $ref: '#/parameters/AssetId' + - $ref: '#/parameters/FileId' + responses: + 204: + description: No Content + 401: + $ref: '#/responses/Unauthorized' + 404: + $ref: '#/responses/NotFound' + default: + $ref: '#/responses/Error' /v1/assets/start-utilization: post: tags: [utilization] From 9341ff7eaeec18243aa48ffb404d54f1685364ca Mon Sep 17 00:00:00 2001 From: Lee Nowotny Date: Thu, 27 May 2021 15:32:46 +0000 Subject: [PATCH 13/37] Merged PR 165886: Bug 1475922 - Updated swagger docs with recent workspace membership backend changes # Justification #1475922 # Implementation Updated documentation # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Related work items: #1475922 --- user/niuser.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/user/niuser.yaml b/user/niuser.yaml index 78b0ba4..04f1447 100644 --- a/user/niuser.yaml +++ b/user/niuser.yaml @@ -218,6 +218,10 @@ paths: type: integer default: 50 maximum: 100 + - in: query + name: type + description: Filters the auth mappings by type (multiple types can be specified with comma separator) + type: string responses: 200: $ref: '#/responses/GetAuthMappingsResponse' @@ -572,7 +576,7 @@ parameters: properties: type: type: string - enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user, oidc-claim] + enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user, oidc-claim, user-id] description: The Auth Mapping type policyId: type: string @@ -605,7 +609,7 @@ parameters: properties: type: type: string - enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user, oidc-claim] + enum: [user, windows-group, windows-user, ldap-group, ldap-attribute, ldap-user, oidc-claim, user-id] description: The Auth Mapping type policyId: type: string From 46aa9eded46bd7075590e4e00a2aaf1389928fb9 Mon Sep 17 00:00:00 2001 From: Brian Poteet Date: Tue, 8 Jun 2021 13:36:49 +0000 Subject: [PATCH 14/37] Merged PR 169224: Move values field under properties # Justification The OpenAPI document we use to generate the python API with Swagger contains a broken response definition for /v2/tags/query-history. # Implementation The values object was moved from the root level of the schema, into the properties object. This matches the [HTTP API](https://demo.systemlink.io/niapis/?urls.primaryName=Tag%20Historian%20Service#/history/QueryHistory) expected response. # Testing Generated a new python client with https://editor.swagger.io/ and confirmed that I could access the values property after making a query-history response. # Checklist - [x] I tested changes to product code in product - [-] I considered updates to the wiki - [-] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Move values field under properties Related work items: #1472381 --- tag-historian/nitaghistorian.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tag-historian/nitaghistorian.yml b/tag-historian/nitaghistorian.yml index 461750d..04589a6 100644 --- a/tag-historian/nitaghistorian.yml +++ b/tag-historian/nitaghistorian.yml @@ -739,9 +739,12 @@ paths: schema: type: object title: Http Query Response Body - allOf: - - $ref: '#/definitions/TypeAndValues' properties: + values: + description: An array of HttpHistoricalValue elements + type: array + items: + $ref: '#/definitions/HttpHistoricalValue' continuationToken: description: For non-decimated queries, a value generated by the server which should be sent in the next request to retrieve the next page of values. From eb1f656fb43b3aa1de63bd8076edad8472ff8618 Mon Sep 17 00:00:00 2001 From: Timo Emondts Date: Wed, 9 Jun 2021 09:33:39 +0000 Subject: [PATCH 15/37] Merged PR 170365: Fix description in nifile.yml # Justification When adding the workspace supported recently, I had increased the operation version of listFiles from 3 to 4 initially. Later I decided to keep that version and add a queryFiles operation explicitly. Started of with the version number 2 to make a distinction between implementations with and without workspace support. But I forgot to change the description in the yml file. --- file/nifile.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/file/nifile.yml b/file/nifile.yml index d161b97..40b2ceb 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -792,7 +792,7 @@ paths: parameters: - in: query name: skip - description: How many files to skip in the result when paging. New in version 2 of this operation. + description: How many files to skip in the result when paging. New in version 2 of the list-files operation. type: integer format: int32 default: 0 @@ -800,7 +800,7 @@ paths: - in: query name: take description: >- - How many files to return in the result. New in version 2 of this operation. + How many files to return in the result. New in version 2 of the list-files operation. The default value is defined by the service. type: integer format: int32 @@ -809,7 +809,7 @@ paths: maximum: 1000 - in: query name: workspace - description: Limit the query to the workspace with the given id. New in version 4 of this operation. + description: Limit the query to the workspace with the given id. New in version 2 of this operation. type: string default: null x-example: 1f2641dd-a5ac-4869-835e-5340b4cd386c From 5462e57d628c89cc81aab351d1ac988d9eacdee5 Mon Sep 17 00:00:00 2001 From: Timo Emondts Date: Tue, 15 Jun 2021 08:49:09 +0000 Subject: [PATCH 16/37] Merged PR 172517: Increase delete-files operation version # Justification We're about to add this support to the LV API and without increasing the version number, we're not able to tell if force is supported by the backend. This enables us to check for support and print a meaningful error message. 'Force' has just recently been added and wasn't release yet. --- file/nifile.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file/nifile.yml b/file/nifile.yml index 40b2ceb..9267adb 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -615,7 +615,7 @@ paths: parameters: - in: query name: force - description: Whether the deletion of a file will be forced + description: Whether the deletion of a file will be forced. New in version 2 of this operation. type: boolean default: false /v1/service-groups/Default/files/{id}/data: @@ -738,7 +738,7 @@ paths: parameters: - in: query name: force - description: Whether the deletion of files will be forced + description: Whether the deletion of files will be forced. New in version 2 of this operation. type: boolean default: false - in: body From 1acadbe406019de7c2ea669e1d383cfec92e5b7b Mon Sep 17 00:00:00 2001 From: Arin Luca Date: Tue, 22 Jun 2021 15:34:44 +0000 Subject: [PATCH 17/37] Add example on how to filter systems by DateTime values inside dictionaries Added example for accessing values under dictionaries like grains using casts. --- systems-management/nisysmgmt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index c8a1d04..c0c1dbe 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -1510,7 +1510,7 @@ definitions: - grains.lastUpdatedTimestamp: ISO-8601 formatted timestamp string specifying the last date the system grains were updated. - - grains.data: Dictionary of string to object representing general information about the system. Example: grains.data.os == "Windows" + - grains.data: Dictionary of string to object representing general information about the system. Example: grains.data.os == "Windows" or DateTime(grains.data.boottime) > "2021-06-01T08:20:09.512Z" - packages.lastUpdatedTimestamp: ISO-8601 formatted timestamp string specifying the last date the system installed packages were updated. From 963f853642efac1f1e8d27fdca117514af80bc54 Mon Sep 17 00:00:00 2001 From: Vlad Deac Date: Wed, 30 Jun 2021 06:55:18 +0000 Subject: [PATCH 18/37] Merged PR 178881: Updated swagger doc for asset summary route # Justification Earlier in the release I updated the asset-summary route to return more data and avoid multiple calls for asset counts. I forgot to update the swagger then, doing it now. --- asset-managment/niapm.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index efe0f22..64927c9 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -2132,6 +2132,22 @@ responses: description: Total number of unused assets. type: integer example: 7 + withAlarms: + description: Total number of assets with associated alarms. + type: integer + example: 3 + approachingRecommendedDueDate: + description: Number of assets approaching calibration date. + type: integer + example: 3 + pastRecommendedDueDate: + description: Number of assets past their calibration date. + type: integer + example: 4 + totalCalibrated: + description: Total number of assets supporting calibration. + type: integer + example: 7 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: From 899211c698ae1cc0545afc7ee2af27a175bbefc3 Mon Sep 17 00:00:00 2001 From: Molly Kreis Date: Mon, 12 Jul 2021 17:15:28 +0000 Subject: [PATCH 19/37] Merged PR 179689: Use valid query-steps filter in swagger example # Justification #1517179 # Implementation Update example in swagger doc # Testing Verified new example works correctly with Test Monitor 21.1 # Checklist - [x] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Related work items: #1517179 --- test-monitor/nitestmonitor-v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index 611ced4..a384599 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -941,7 +941,7 @@ definitions: filter: description: The step query filter in Dynamic Linq type: string - example: (operator == "user1") || ((programName != "MyProgram") && (totalTimeInSeconds < @0)) + example: (stepType == "NumericLimitTest") && (totalTimeInSeconds > @0) substitutions: description: >- Makes substitutions in the query filter expression. Substitutions for the query expression From c6e4fd524906cf6759d83328de6ffbac34295fdb Mon Sep 17 00:00:00 2001 From: Tudor Ludusan Date: Mon, 26 Jul 2021 07:01:20 +0000 Subject: [PATCH 20/37] Merged PR 186899: Updated yml with SupportsSelfTest and SupportsReset # Justification #1501327 #1501323 #1501326 # Implementation - Updated yml doc to contain the SupportsSelfTest and SupportsReset flags; added it on the base model as we need it for query, create and update models # Testing - Validated generated models # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Updated yml with SupportsSelfTest and SupportsReset Related work items: #1540577, #1540580, #1540581 --- asset-managment/niapm.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index 64927c9..fbcd7f9 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -530,6 +530,14 @@ definitions: items: type: string example: '608a5684800e325b48837c2a' + supportsSelfTest: + description: Whether the asset supports self-test. + type: boolean + example: true + supportsReset: + description: Whether the asset supports reset. + type: boolean + example: true AssetCreateModel: title: Asset Create Model description: >- From 6fe6ebf3d16b2ffcc37740e0fbda60355eaf8c85 Mon Sep 17 00:00:00 2001 From: Cristian Hotea Date: Mon, 26 Jul 2021 09:40:35 +0000 Subject: [PATCH 21/37] Merged PR 186908: Update link for Dynamic LINQ Update link for Dynamic LINQ Signed-off-by: Cristian Hotea Related work items: #1516420 --- systems-management/nisysmgmt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index c0c1dbe..16fd392 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -1435,7 +1435,7 @@ definitions: $ref: '#/definitions/Operation' QuerySystemsRequest: - description: Request for querying resources. More info here -> https://github.com/StefH/System.Linq.Dynamic.Core/wiki/Dynamic-Expressions and https://stefh.github.io/System.Linq.Dynamic.Core/html/144078bd-d1ad-bece-4daa-7fdd3a7ed7dc.htm + description: Request for querying systems resources. Dynamic LINQ is used for query syntax. More info can be found here: https://dynamic-linq.net title: Query Systems Request properties: skip: @@ -1551,7 +1551,7 @@ definitions: description: The order in which data returns. QueryJobsRequest: - description: Request for querying jobs resources. More info here -> https://github.com/StefH/System.Linq.Dynamic.Core/wiki/Dynamic-Expressions and https://stefh.github.io/System.Linq.Dynamic.Core/html/144078bd-d1ad-bece-4daa-7fdd3a7ed7dc.htm + description: Request for querying jobs resources. Dynamic LINQ is used for query syntax. More info can be found here: https://dynamic-linq.net title: Query Jobs Request properties: skip: From 04a830405301abacc5ebc7c7e2a927bee6046bcf Mon Sep 17 00:00:00 2001 From: Andrei Zene Date: Tue, 27 Jul 2021 12:23:34 +0000 Subject: [PATCH 22/37] Merged PR 188023: Fix build that auto-generates python clients from sysmgmt swagger # Justification python messagebus build is failing because of the colon in the swagger documentation. https://ni.visualstudio.com/DevCentral/_build/results?buildId=1171520&view=logs&j=be401f01-b837-5415-8329-3a5843e0e4ec&t=c1454a81-d3b3-583d-7abf-f8091ec6b8e7&l=2151 Fix build that auto-generates python clients from sysmgmt swagger --- systems-management/nisysmgmt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index 16fd392..d8b8017 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -1435,7 +1435,7 @@ definitions: $ref: '#/definitions/Operation' QuerySystemsRequest: - description: Request for querying systems resources. Dynamic LINQ is used for query syntax. More info can be found here: https://dynamic-linq.net + description: Request for querying systems resources. Dynamic LINQ is used for query syntax. More info can be found at https://dynamic-linq.net title: Query Systems Request properties: skip: From ff9f9bb7976856ac3b42581fbbeea53f160df80f Mon Sep 17 00:00:00 2001 From: Gergo Papp-Szentannai Date: Tue, 27 Jul 2021 13:42:08 +0000 Subject: [PATCH 23/37] Merged PR 188055: Fix YAML format Fixing pipeline: ``` Caused by: org.yaml.snakeyaml.scanner.ScannerException: mapping values are not allowed here in 'string', line 1438, column 124: ... tax. More info can be found here: https://dynamic-linq.net ^ ``` `:` followed by space is a reserved string in YAML (used to denote : ) --- systems-management/nisysmgmt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index d8b8017..9bfcbf5 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -1551,7 +1551,7 @@ definitions: description: The order in which data returns. QueryJobsRequest: - description: Request for querying jobs resources. Dynamic LINQ is used for query syntax. More info can be found here: https://dynamic-linq.net + description: Request for querying jobs resources. Dynamic LINQ is used for query syntax. More info can be found at https://dynamic-linq.net title: Query Jobs Request properties: skip: From 7ac56d02e2a09b3e17bb4d0693bce26bbe74e1d1 Mon Sep 17 00:00:00 2001 From: Siddharth Subramanian Date: Mon, 16 Aug 2021 21:34:19 +0000 Subject: [PATCH 24/37] Merged PR 194959: Make corrections to test monitor swagger documentation # Justification #1573106 #1576958 # Implementation Based on comments from Ryan on the two bugs, I am updating the documentation to remove options that are listed as valid but are actually unsupported. The first bug has a corresponding code change that is tracked separately. # Testing Will verify that swagger docs list this change after submission. # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product Related work items: #1573106, #1576958 --- test-monitor/nitestmonitor-v2.yml | 52 ++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index a384599..4c93cfe 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -757,7 +757,14 @@ definitions: example: - "cRIO" orderBy: - $ref: '#/definitions/ProductField' + description: An enumeration of all fields that Products can be ordered by. + type: string + enum: + - ID + - PART_NUMBER + - NAME + - FAMILY + - UPDATED_AT descending: description: -> Whether to return the products in descending order. @@ -817,7 +824,13 @@ definitions: example: - 2.5 orderBy: - $ref: '#/definitions/PathField' + description: An enumeration of all fields that Paths can be ordered by. + type: string + enum: + - ID + - PROGRAM_NAME + - PART_NUMBER + - PATH descending: description: -> Whether to return the paths in descending order. @@ -893,7 +906,20 @@ definitions: example: - cRIO orderBy: - $ref: '#/definitions/ResultField' + description: An enumeration of all fields that Results can be ordered by. + type: string + enum: + - ID + - STARTED_AT + - UPDATED_AT + - PROGRAM_NAME + - SYSTEM_ID + - HOST_NAME + - OPERATOR + - SERIAL_NUMBER + - PART_NUMBER + - PRODUCT + - TOTAL_TIME_IN_SECONDS descending: description: -> Whether to return the results in descending order. @@ -974,7 +1000,19 @@ definitions: example: - user1 orderBy: - $ref: '#/definitions/StepField' + description: An enumeration of all fields that Steps can be ordered by. + type: string + enum: + - NAME + - STEP_TYPE + - STEP_ID + - PARENT_ID + - RESULT_ID + - PATH + - TOTAL_TIME_IN_SECONDS + - STARTED_AT + - UPDATED_AT + - DATA_MODEL descending: description: -> Whether to return the steps in descending order. @@ -2077,7 +2115,7 @@ 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`, - `TOTAL_TIME_IN_SECONDS`, and `WORKSPACE`. + and `TOTAL_TIME_IN_SECONDS`. operationId: query-result-values-v2 x-ni-operation: queryResults x-ni-auth: true @@ -2311,8 +2349,8 @@ 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`, - `DATA_MODEL`, and `WORKSPACE`. + `PATH`, `TOTAL_TIME_IN_SECONDS`, `STARTED_AT`, `UPDATED_AT`, and + `DATA_MODEL`. operationId: query-step-values-v2 x-ni-operation: querySteps x-ni-auth: true From 428dc1ddbed9dfbb0c9d03793aae4ebbb4a20dda Mon Sep 17 00:00:00 2001 From: Siddharth Subramanian Date: Tue, 17 Aug 2021 15:25:05 +0000 Subject: [PATCH 25/37] Merged PR 195386: Revert PR 194959: Changes I made to the swagger doc seems to be breaking the build # Justification Reverting a previous PR of mine that is breaking the build while I figure out the proper fix. Seeing errors like this: https://ni.visualstudio.com/DevCentral/_build/results?buildId=1234775&view=results # Implementation Revert a commit # Testing N/A # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product --- test-monitor/nitestmonitor-v2.yml | 52 +++++-------------------------- 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index 4c93cfe..a384599 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -757,14 +757,7 @@ definitions: example: - "cRIO" orderBy: - description: An enumeration of all fields that Products can be ordered by. - type: string - enum: - - ID - - PART_NUMBER - - NAME - - FAMILY - - UPDATED_AT + $ref: '#/definitions/ProductField' descending: description: -> Whether to return the products in descending order. @@ -824,13 +817,7 @@ definitions: example: - 2.5 orderBy: - description: An enumeration of all fields that Paths can be ordered by. - type: string - enum: - - ID - - PROGRAM_NAME - - PART_NUMBER - - PATH + $ref: '#/definitions/PathField' descending: description: -> Whether to return the paths in descending order. @@ -906,20 +893,7 @@ definitions: example: - cRIO orderBy: - description: An enumeration of all fields that Results can be ordered by. - type: string - enum: - - ID - - STARTED_AT - - UPDATED_AT - - PROGRAM_NAME - - SYSTEM_ID - - HOST_NAME - - OPERATOR - - SERIAL_NUMBER - - PART_NUMBER - - PRODUCT - - TOTAL_TIME_IN_SECONDS + $ref: '#/definitions/ResultField' descending: description: -> Whether to return the results in descending order. @@ -1000,19 +974,7 @@ definitions: example: - user1 orderBy: - description: An enumeration of all fields that Steps can be ordered by. - type: string - enum: - - NAME - - STEP_TYPE - - STEP_ID - - PARENT_ID - - RESULT_ID - - PATH - - TOTAL_TIME_IN_SECONDS - - STARTED_AT - - UPDATED_AT - - DATA_MODEL + $ref: '#/definitions/StepField' descending: description: -> Whether to return the steps in descending order. @@ -2115,7 +2077,7 @@ 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-auth: true @@ -2349,8 +2311,8 @@ 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-auth: true From b9f9d060ff04e5e84bda924bb9b44caeb734f4ad Mon Sep 17 00:00:00 2001 From: Siddharth Subramanian Date: Fri, 20 Aug 2021 16:32:09 +0000 Subject: [PATCH 26/37] Merged PR 195476: Attempt #2: Make corrections to TestMonitor's swagger documentation # Justification #1573106 #1576958 # Implementation In a previous attempt, I tried to fix these bugs by listing the supported values as an in-lined enum. However, that broke some codegen-ed data types and also the public facing python API. Since that would very likely break client code, I resorted to just updating the documentation to specifically list the supported orderby fields. # Testing Since this PR is just plain-text changes now, it shouldn't break a build anywhere. I verified that the changes look correct by copying the yaml file contents over to a swagger doc viewer. You can view it yourself by pasting the contents of the modified file [here](https://editor.swagger.io/). # Checklist - [X] I tested changes to product code in product - [X] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product --- test-monitor/nitestmonitor-v2.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index a384599..be02290 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -738,6 +738,9 @@ definitions: myMeasurement: {} ProductsAdvancedQuery: title: Advanced Query Object for Products + description: >- + Product fields that the response can be ordered by are + `ID`, `PART_NUMBER`, `NAME`, `FAMILY`, and `UPDATED_AT`. type: object properties: filter: @@ -798,6 +801,9 @@ definitions: example: false PathsAdvancedQuery: title: Advanced Query Object for Paths + description: >- + Path fields that the response can be ordered by are + `ID`, `PROGRAM_NAME`, `PART_NUMBER`, and `PATH`. type: object properties: filter: @@ -858,6 +864,11 @@ definitions: example: false ResultsAdvancedQuery: title: Advanced Query Object for Test Results + description: >- + Test Result fields that the response can be ordered by are + `ID`, `STARTED_AT`, `UPDATED_AT`, `PROGRAM_NAME`, `SYSTEM_ID`, + `HOST_NAME`, `OPERATOR`, `SERIAL_NUMBER`, `PART_NUMBER`, + `PRODUCT`, and `TOTAL_TIME_IN_SECONDS`. type: object properties: filter: @@ -936,6 +947,11 @@ definitions: $ref: '#/definitions/ResponseFormat' StepsAdvancedQuery: title: Advanced Query Object for Test Steps + description: >- + Test Step fields that the response can be ordered by are + `NAME`, `STEP_TYPE`, `STEP_ID`, `PARENT_ID`, `RESULT_ID`, + `PATH`, `TOTAL_TIME_IN_SECONDS`, `STARTED_AT`, `UPDATED_AT`, + and `DATA_MODEL`. type: object properties: filter: @@ -2077,7 +2093,7 @@ 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`, - `TOTAL_TIME_IN_SECONDS`, and `WORKSPACE`. + and `TOTAL_TIME_IN_SECONDS`. operationId: query-result-values-v2 x-ni-operation: queryResults x-ni-auth: true @@ -2311,8 +2327,8 @@ 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`, - `DATA_MODEL`, and `WORKSPACE`. + `PATH`, `TOTAL_TIME_IN_SECONDS`, `STARTED_AT`, `UPDATED_AT`, and + `DATA_MODEL`. operationId: query-step-values-v2 x-ni-operation: querySteps x-ni-auth: true From bb7de4bc95940cafdecf979ca4d8581aac7ec156 Mon Sep 17 00:00:00 2001 From: Christine Spangler Date: Mon, 30 Aug 2021 13:59:39 +0000 Subject: [PATCH 27/37] Merged PR 200198: Fix docs # Justification I told Sid that you can sort results by `product` in v2. I was wrong. This PR addresses that. # Implementation Remove Product from the list of supported result orderBy fields. # Testing It is simple. # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [x] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product --- test-monitor/nitestmonitor-v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index be02290..f6bce87 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -868,7 +868,7 @@ definitions: Test Result fields that the response can be ordered by are `ID`, `STARTED_AT`, `UPDATED_AT`, `PROGRAM_NAME`, `SYSTEM_ID`, `HOST_NAME`, `OPERATOR`, `SERIAL_NUMBER`, `PART_NUMBER`, - `PRODUCT`, and `TOTAL_TIME_IN_SECONDS`. + and `TOTAL_TIME_IN_SECONDS`. type: object properties: filter: From 28d00f7c72737111ee3e4599cf3d6d43065648f0 Mon Sep 17 00:00:00 2001 From: Codruta Gherman Date: Fri, 17 Sep 2021 07:44:28 +0000 Subject: [PATCH 28/37] Merged PR 207128: Add lastUpdatedTimestamp field to file model # Justification The services that use the file model and display file information in tabular form would greatly benefit from having a field that keeps track of modifications in order to update only when needed. # Implementation Added the 'lastUpdatedTimestamp' field that gets updated whenever a file is changed. Added a new migration that changes the field from 0001-01-01T00:00:00 to current time - before the migration all files have lastUpdatedTimestamp as 0001-01-01T00:00:00 # Testing Modified the existing tests and checked for correct update time. Manually validated with build and tested on local machine. - After the modifications in the service all the files have the new field and because of the migration the field is populated with the time of the migration. - When adding a new file lastUpdatedTimestamp is the same as created date - When a property is modified lastUpdatedTimestamp gets updated # Checklist - [X] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product add lastUpdatedTimestamp field to files Related work items: #1604121 --- file/nifile.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/file/nifile.yml b/file/nifile.yml index 9267adb..a0bc51f 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -155,6 +155,11 @@ definitions: description: The workspace the file belongs to type: string example: MyWorkspace + lastUpdatedTimestamp: + description: The date and time the file was last updated in the file service + type: string + format: date-time + example: '2018-05-15T18:54:27.519Z' ServiceGroup: type: object properties: @@ -571,6 +576,7 @@ paths: - created - id - size + - lastUpdatedTimestamp - in: query name: orderByDescending description: >- From 9c82842d4beaba733401d928632f5f7ac8439b85 Mon Sep 17 00:00:00 2001 From: Adam Arnesen Date: Fri, 17 Sep 2021 21:36:59 +0000 Subject: [PATCH 29/37] Merged PR 208425: Update TestMonitor API docs to add required tags for programName and status for TestResultRequestObject # Justification While I was experimenting with the REST APIs for TestMonitor, I realized that the `programName` and `status` objects are required. This wasn't clear in the documentation. # Implementation This updates the documentation to show that `programName` and `status` are required. # Testing N/A # Checklist - [ ] I tested changes to product code in product - [x] I considered updates to the wiki - [x] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product --- test-monitor/nitestmonitor-v2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index f6bce87..d2c7a1c 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -431,6 +431,7 @@ definitions: TestResultRequestObject: title: Test Result Request type: object + required: [programName, status] properties: programName: description: Program name From 9e6c9c02401b732074d4bddc8cda80c1e338d77c Mon Sep 17 00:00:00 2001 From: JD Robertson Date: Wed, 6 Oct 2021 19:26:19 +0000 Subject: [PATCH 30/37] Merged PR 217055: Add contact and description details to the User service Open API definitions. # Justification #1613675 # Implementation Add fields to the definition files. # Testing I verified that everything rendered correctly in an install. # Checklist - [x] I tested changes to product code in product - [x] I considered updates to the wiki - [ ] ~~If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product~~ Add contact and description details to the User service definitions. Related work items: #1613675 --- auth/niauth.yaml | 17 +++++++++++------ user/niuser.yaml | 5 +++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/auth/niauth.yaml b/auth/niauth.yaml index 43a1cd2..c0ea59f 100644 --- a/auth/niauth.yaml +++ b/auth/niauth.yaml @@ -2,6 +2,11 @@ swagger: '2.0' info: version: '1.0' title: SystemLink Auth Service + description: Manage authorization policies for a SystemLink server. + contact: + name: NI + url: https://www.ni.com/systemlink + email: support@ni.com basePath: /niauth/v1 consumes: - application/json @@ -746,31 +751,31 @@ definitions: message: There has been an error with your request args: [] innerErrors: [] - + UserPolicy: type: object title: User Policy description: A policy defines what a user or device is allowed to do properties: - id: + id: description: The identifier of a policy type: string name: description: The policy name type: string - templateId: + templateId: description: The identifier of a policy template type: string - workspaceId: + workspaceId: description: The identifier of a workspace type: string - + UserPolicyTemplate: type: object title: User Policy Template description: A policy template defines what a user or device is allowed to do but is not bound to a workspace. When the template is referenced by a policy, the connection between the actions and the workspace is created. properties: - id: + id: description: The identifier of a policy template type: string name: diff --git a/user/niuser.yaml b/user/niuser.yaml index 9e0ebb2..cc75f66 100644 --- a/user/niuser.yaml +++ b/user/niuser.yaml @@ -2,6 +2,11 @@ swagger: '2.0' info: version: '1.0' title: SystemLink User Service + description: 'Manage users, workspaces, and permissions for a SystemLink server.' + contact: + name: NI + url: https://www.ni.com/systemlink + email: support@ni.com basePath: /niuser/v1 consumes: - application/json From e599597ead68f605ae7e03666c57ef02e9974ef9 Mon Sep 17 00:00:00 2001 From: Siddharth Subramanian Date: Fri, 8 Oct 2021 15:17:40 +0000 Subject: [PATCH 31/37] Merged PR 216196: Fix Swagger example by moving notificationStrategyIds out of alarm-transition in the alarm-service # Justification #1622791 # Implementation There are two locations where alarm transition (`#/definitions/AlarmTransition`) is referenced in the Alarms Service swagger doc. These are: 1. As a reference in `AlarmInstance` 2. In the request body of `v1/instances` In both of these locations, `notificationStrategyIds` does not belong in the transition's value. They should instead be in the top-level `AlarmInstance` object and the request body of `v1/instances` # Testing Manually tested in the following ways (corresponding to the two references listed above): 1. Confirmed that `/v1/instances/{instanceId}` returns `notificationStrategyIds` as part of the top-level object and not nested within the `transitions` property. 2. Confirmed that creating an instance with `notificationStrategyIds` set as part of the top-level of the request object results in an alarm being created which, when queried for, returns the `notificationStrategyIds` that were set. This fails when `notificationStrategyIds` is nested inside the `transition` property (no `notificationStrategyIds` are returned). # Checklist - [x] I tested changes to product code in product ~~- [ ] I considered updates to the wiki~~ ~~- [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product~~ Related work items: #1622791 --- alarm/nialarm.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/alarm/nialarm.yml b/alarm/nialarm.yml index 8c697c6..1b63abd 100644 --- a/alarm/nialarm.yml +++ b/alarm/nialarm.yml @@ -189,6 +189,13 @@ definitions: description: The number of transitions which overflowed a given alarm instance's *transition's* field type: integer example: 0 + notificationStrategyIds: + description: The IDs of the notification strategies which should be triggered if this request results + in an alarm instance being created or transitioning to a new highest severity + type: array + items: + type: string + example: [] currentSeverityLevel: description: The current severity level of a given alarm instance type: integer @@ -291,13 +298,6 @@ definitions: example: 2 default: 2 minimum: -1 - notificationStrategyIds: - description: The IDs of the notification strategies which should be triggered if this request results - in an alarm instance being created or transitioning to a new highest severity - type: array - items: - type: string - example: [] condition: description: A description of the condition associated with the transition type: string @@ -731,6 +731,13 @@ paths: example: 3d411024-9db8-42d1-8ab8-6cee0e6cd841 transition: $ref: '#/definitions/AlarmTransition' + notificationStrategyIds: + description: The IDs of the notification strategies which should be triggered if this request results + in an alarm instance being created or transitioning to a new highest severity + type: array + items: + type: string + example: [] createdBy: description: An identifier for who or what created a given alarm instance. This is usually used to identify the particular rule engine which requested that a given alarm be created. From 0e6c7b3a4374f1bb0ec64039f411441323dd6990 Mon Sep 17 00:00:00 2001 From: JD Robertson Date: Fri, 8 Oct 2021 15:19:24 +0000 Subject: [PATCH 32/37] Merged PR 217495: Change "National Instruments" to "NI" in Open API documentation # Justification Cleanup a re-brand issue. Found while fixing: #1613675 # Implementation Updated string. # Testing I spot checked in product. # Checklist - [x] I tested changes to product code in product - [x] I considered updates to the wiki - [ ] ~~If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product~~ --- alarm/nialarm.yml | 2 +- asset-management-rule/niapmrule.yml | 2 +- asset-managment/niapm.yml | 4 ++-- file/nifile.yml | 2 +- message/nimessage.yml | 2 +- ni-notebook-execution/ninbexec.yml | 2 +- opcclient/niopcclient.yml | 2 +- repo/nirepo.yml | 6 +++--- service-registry/niserviceregistry.yml | 2 +- systems-management/nisysmgmt.yml | 10 +++++----- systems-state/nisystemsstate.yml | 2 +- tag-historian/nitaghistorian.yml | 2 +- tag-rule/nitagrule.yml | 2 +- tag/nitag.yml | 2 +- tdm-reader/nitdmreader.yml | 2 +- test-monitor/nitestmonitor-v1.yml | 2 +- test-monitor/nitestmonitor-v2.yml | 2 +- user-data/niuserdata.yml | 2 +- 18 files changed, 25 insertions(+), 25 deletions(-) diff --git a/alarm/nialarm.yml b/alarm/nialarm.yml index 1b63abd..a507b34 100644 --- a/alarm/nialarm.yml +++ b/alarm/nialarm.yml @@ -4,7 +4,7 @@ info: title: Alarm Web Service description: SystemLink Alarm Service HTTP API. Only available on SystemLink Server. contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nialarm diff --git a/asset-management-rule/niapmrule.yml b/asset-management-rule/niapmrule.yml index 108aa4c..afc038a 100644 --- a/asset-management-rule/niapmrule.yml +++ b/asset-management-rule/niapmrule.yml @@ -4,7 +4,7 @@ info: title: Asset Performance Management Rule Web Service description: Create and manage calibration rules for assets. contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /niapmrule diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index fbcd7f9..2a668a9 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -4,7 +4,7 @@ info: title: Asset Performance Management Web Service description: Asset Performance Management HTTP API contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /niapm @@ -889,7 +889,7 @@ definitions: vendorName: description: Vendor name of the asset. type: string - example: National Instruments + example: NI vendorNumber: description: Vendor number of the asset. type: integer diff --git a/file/nifile.yml b/file/nifile.yml index a0bc51f..47cdd03 100644 --- a/file/nifile.yml +++ b/file/nifile.yml @@ -4,7 +4,7 @@ info: title: SystemLink File Service description: Upload and download files from a SystemLink server contact: - name: National Instruments + name: NI url: https://www.ni.com/systemlink email: support@ni.com basePath: /nifile diff --git a/message/nimessage.yml b/message/nimessage.yml index a6777a7..9fc869a 100644 --- a/message/nimessage.yml +++ b/message/nimessage.yml @@ -4,7 +4,7 @@ info: version: '1' title: SystemLink Message Service contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nimessage diff --git a/ni-notebook-execution/ninbexec.yml b/ni-notebook-execution/ninbexec.yml index 23bc012..0840932 100644 --- a/ni-notebook-execution/ninbexec.yml +++ b/ni-notebook-execution/ninbexec.yml @@ -4,7 +4,7 @@ info: title: Notebook Execution Service description: Execute Jupyter notebooks. contact: - name: National Instruments + name: NI url: https://www.ni.com/systemlink email: support@ni.com basePath: /ninbexec diff --git a/opcclient/niopcclient.yml b/opcclient/niopcclient.yml index 6152100..c074412 100644 --- a/opcclient/niopcclient.yml +++ b/opcclient/niopcclient.yml @@ -4,7 +4,7 @@ info: title: OpcClientService HTTP APIs description: OpcClientService HTTP APIs contact: - name: National Instruments + name: NI url: https://www.ni.com/systemlink email: support@ni.com basePath: /niopcclient diff --git a/repo/nirepo.yml b/repo/nirepo.yml index a49e5e6..9391fac 100644 --- a/repo/nirepo.yml +++ b/repo/nirepo.yml @@ -4,7 +4,7 @@ info: title: "Package Repository Service" description: "Manages a repository of packages" contact: - name: National Instruments + name: NI url: https://www.ni.com/systemlink email: support@ni.com basePath: "/nirepo" @@ -754,7 +754,7 @@ definitions: maintainer: type: string description: The maintainer of this package. - example: "National Instruments " + example: "NI " predepends: type: array description: An array containing information about other packages this package predepends. @@ -823,7 +823,7 @@ definitions: Filename: 71e47fbf-2782-4c10-873e-dba414213dc9.nipkg Homepage: http://www.ni.com MD5Sum: 672a667ca32b6915ae9a968c55f80825 - Maintainer: National Instruments + Maintainer: NI Package: ni-securityupdate-kb67l8lcqw-killbits Priority: standard Section: Infrastructure diff --git a/service-registry/niserviceregistry.yml b/service-registry/niserviceregistry.yml index 4db5893..02753c6 100644 --- a/service-registry/niserviceregistry.yml +++ b/service-registry/niserviceregistry.yml @@ -4,7 +4,7 @@ info: title: Service Registry Web Service description: View information about installed SystemLink services contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /niserviceregistry diff --git a/systems-management/nisysmgmt.yml b/systems-management/nisysmgmt.yml index 6d22a51..46ff42a 100644 --- a/systems-management/nisysmgmt.yml +++ b/systems-management/nisysmgmt.yml @@ -4,7 +4,7 @@ info: version: '1' title: 'SystemLink Systems Management' contact: - name: National Instruments + name: NI url: https://www.ni.com/systemlink email: support@ni.com basePath: '/nisysmgmt' @@ -442,7 +442,7 @@ definitions: vendorName: description: System vendor name. type: string - example: National Instruments + example: NI version: description: Salt version. type: string @@ -761,7 +761,7 @@ definitions: displayname: NI Package Manager Upgrader displayversion: 19.5.0 url: http://www.ni.com - packager: National Instruments + packager: NI priority: required group: Infrastructure version: 19.5.0.28-0+d28 @@ -770,7 +770,7 @@ definitions: displayname: System Package for 64-Bit Windows OS displayversion: 19.5.0 url: http://www.ni.com - packager: National Instruments + packager: NI priority: standard group: Infrastructure version: 19.5.0.28-0+d28 @@ -1247,7 +1247,7 @@ definitions: maintainer: type: string description: The maintainer of this package. - example: "National Instruments " + example: "NI " name: type: string description: The name of the package. diff --git a/systems-state/nisystemsstate.yml b/systems-state/nisystemsstate.yml index 9fb0fac..a23aa68 100644 --- a/systems-state/nisystemsstate.yml +++ b/systems-state/nisystemsstate.yml @@ -4,7 +4,7 @@ info: version: "1" title: "SystemLink Systems State Manager" contact: - name: National Instruments + name: NI url: https://www.ni.com/systemlink email: support@ni.com basePath: "/nisystemsstate" diff --git a/tag-historian/nitaghistorian.yml b/tag-historian/nitaghistorian.yml index 04589a6..88ae9b0 100644 --- a/tag-historian/nitaghistorian.yml +++ b/tag-historian/nitaghistorian.yml @@ -4,7 +4,7 @@ info: title: Tag Historian Web Service description: SystemLink Tag Historian Service HTTP API. contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nitaghistorian diff --git a/tag-rule/nitagrule.yml b/tag-rule/nitagrule.yml index 60a8b33..79691da 100644 --- a/tag-rule/nitagrule.yml +++ b/tag-rule/nitagrule.yml @@ -4,7 +4,7 @@ info: title: Tag Rule Engine Web Service description: SystemLink Tag Rule Engine Service HTTP API. Only available on SystemLink Server. contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nitagrule diff --git a/tag/nitag.yml b/tag/nitag.yml index c9edc19..5915835 100644 --- a/tag/nitag.yml +++ b/tag/nitag.yml @@ -4,7 +4,7 @@ info: version: '2' title: SystemLink Tag Service contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nitag diff --git a/tdm-reader/nitdmreader.yml b/tdm-reader/nitdmreader.yml index ea2f8e3..e05a05d 100644 --- a/tdm-reader/nitdmreader.yml +++ b/tdm-reader/nitdmreader.yml @@ -4,7 +4,7 @@ info: title: TDMReader Web Service description: TDMReader HTTP API contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nitdmreader diff --git a/test-monitor/nitestmonitor-v1.yml b/test-monitor/nitestmonitor-v1.yml index 56358a2..0e7fed4 100644 --- a/test-monitor/nitestmonitor-v1.yml +++ b/test-monitor/nitestmonitor-v1.yml @@ -4,7 +4,7 @@ info: title: Test Monitor Web Service description: Test Monitor HTTP API contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nitestmonitor diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index d2c7a1c..93ac80d 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -4,7 +4,7 @@ info: title: Test Monitor Web Service description: Test Monitor HTTP API contact: - name: National Instruments + name: NI url: 'https://www.ni.com/systemlink' email: support@ni.com basePath: /nitestmonitor diff --git a/user-data/niuserdata.yml b/user-data/niuserdata.yml index ee1424b..918af55 100644 --- a/user-data/niuserdata.yml +++ b/user-data/niuserdata.yml @@ -4,7 +4,7 @@ info: title: User Data Service description: Manage user specific data. contact: - name: National Instruments + name: NI url: https://www.ni.com/systemlink email: support@ni.com basePath: /niuserdata From 98584f4ad9b3127f589e8897285bd072148ef770 Mon Sep 17 00:00:00 2001 From: Tudor Ludusan Date: Fri, 22 Oct 2021 07:30:10 +0000 Subject: [PATCH 33/37] Merged PR 223882: Updated documentation in Swagger for query-assets route # Justification #1632322 # Implementation We've enabled Dynamic LINQ filtering when requesting CSV reports for assets through the query-assets route. The changes have been made with this PR: !223432. Please make sure you read the description of that review for more context on the updated behavior. This has been agreed by the PO. # Testing N/A # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product Updated documentation in Swagger for query-assets route Related work items: #1632322 --- asset-managment/niapm.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index 2a668a9..5f92c7e 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -1395,7 +1395,7 @@ parameters: - 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. + - If asset IDs property or the filter string are in the request, this property will not be used for filtering. If no asset IDs are in the request and the filter string is unspecified, setting this property to true will generate a report only for the calibrated assets. type: boolean default: false @@ -2810,7 +2810,7 @@ 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 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. + 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 IDs property has higher precedence than the filter string when used to filter the assets from the response. operationId: query-assets x-ni-auth: true parameters: From 3390ae185d49ecd5765197958795e761435e51b7 Mon Sep 17 00:00:00 2001 From: Brian Poteet Date: Wed, 10 Nov 2021 19:49:51 +0000 Subject: [PATCH 34/37] Merged PR 231517: [Cherry-pick] Update Swagger docs with Postgres ID format # Kind of Change - [x] Simple cherry pick (no manual conflict resolution) - [ ] Cherry pick (with manual conflict resolution) - [ ] Not a cherry pick; direct change into release # Commit TODO: If a cherry pick, link to the original commit, otherwise delete this section. !228957 Related work items: #1638925 --- test-monitor/nitestmonitor-v1.yml | 26 +++++++++++++------------- test-monitor/nitestmonitor-v2.yml | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/test-monitor/nitestmonitor-v1.yml b/test-monitor/nitestmonitor-v1.yml index 0e7fed4..ba6bf2a 100644 --- a/test-monitor/nitestmonitor-v1.yml +++ b/test-monitor/nitestmonitor-v1.yml @@ -69,7 +69,7 @@ definitions: - name: TestMonitor.InvalidId code: -253700 resourceType: TestResult - resourceId: 4afb2ce3741fe11d88838cc9 + resourceId: bd9126f5-b0b1-446a-8b08-dc6460047377 message: Invalid Id. args: [] Operation: @@ -386,7 +386,7 @@ definitions: id: description: Id of the test result type: string - example: 5e30938d93cac80468534720 + example: bd9126f5-b0b1-446a-8b08-dc6460047377 systemId: description: Id of the system type: string @@ -450,7 +450,7 @@ definitions: id: description: Test result id to update type: string - example: 5e30938d93cac80468534720 + example: bd9126f5-b0b1-446a-8b08-dc6460047377 programName: description: Program name type: string @@ -519,7 +519,7 @@ definitions: items: type: string example: - - 5e30938d93cac80468534720 + - bd9126f5-b0b1-446a-8b08-dc6460047377 programNames: description: Array of program names type: array @@ -616,10 +616,10 @@ definitions: properties: stepId: type: string - example: 5e30934193cac8046851acb4 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 resultId: type: string - example: 5e30938d93cac80468534720 + example: bd9126f5-b0b1-446a-8b08-dc6460047377 StepDataObject: title: Step Data description: Data returned by the test step @@ -683,14 +683,14 @@ definitions: items: type: string example: - - 5e30934193cac8046851acb4 + - bd9126f5-b0b1-446a-8b08-dc6460047377 resultIds: description: Array of result ids type: array items: type: string example: - - 5e30938d93cac80468534720 + - 02600cf8-c2bb-4ff9-a139-031e943fb0c0 path: description: Step path type: string @@ -701,8 +701,8 @@ definitions: items: type: string example: - - 5e30934193cac8046851acb2 - - 5e30931993cac8046850a996 + - 4e303cdd-efc5-477f-a331-932dcbdd1ca8 + - 5bb6aa1a-4e88-4e50-ada4-4aa20b4e82b3 statuses: description: Array of step statuses type: array @@ -782,7 +782,7 @@ definitions: resultId: description: Result id type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 children: description: Nested child steps type: array @@ -860,7 +860,7 @@ definitions: resultId: description: Result id type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 path: description: Step path type: string @@ -1282,7 +1282,7 @@ paths: type: array items: type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 deleteSteps: description: Indicates whether to delete the test steps associated with the test result type: boolean diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index 93ac80d..0520e57 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -69,7 +69,7 @@ definitions: - name: TestMonitor.InvalidId code: -253700 resourceType: TestResult - resourceId: 4afb2ce3741fe11d88838cc9 + resourceId: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 message: Invalid Id. args: [] Operation: @@ -350,7 +350,7 @@ definitions: id: description: ID of the product type: string - example: 5e30931793cac80468509487 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 partNumber: description: The part number of the product type: string @@ -398,7 +398,7 @@ definitions: id: description: ID of the product to update type: string - example: 5e30931793cac80468509487 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 name: description: The name of the product type: string @@ -520,7 +520,7 @@ definitions: id: description: Id of the test result type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 systemId: description: Id of the system type: string @@ -588,7 +588,7 @@ definitions: id: description: Test result id to update type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 programName: description: Program name type: string @@ -693,7 +693,7 @@ definitions: The unique ID of this path. Note that this value may change if the collection is repaired. type: string - example: 507f191e810c19729de860ea + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 path: description: >- Identifies the steps that this path is representative of. @@ -1134,10 +1134,10 @@ definitions: properties: stepId: type: string - example: 5e30934193cac8046851acb4 + example: bd9126f5-b0b1-446a-8b08-dc6460047377 resultId: type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 StepDataObject: title: Step Data description: Data returned by the test step @@ -1194,7 +1194,7 @@ definitions: resultId: description: Result id type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 children: description: Nested child steps type: array @@ -1276,7 +1276,7 @@ definitions: resultId: description: Result id type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 path: description: Step path type: string @@ -1398,7 +1398,7 @@ responses: items: type: string example: - - 5e30931793cac80468509487 + - 02600cf8-c2bb-4ff9-a139-031e943fb0c0 failed: description: Array of product ids that failed to delete type: array @@ -1928,7 +1928,7 @@ paths: type: array items: type: string - example: 5e30931793cac80468509487 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 responses: 200: $ref: '#/responses/DeleteProductsResponse' @@ -2159,7 +2159,7 @@ paths: type: array items: type: string - example: 5e30938d93cac80468534720 + example: 02600cf8-c2bb-4ff9-a139-031e943fb0c0 deleteSteps: description: Indicates whether to delete the test steps associated with the test result type: boolean From 7b016ef44dd2769cf8865d2a18899f07c027e3a8 Mon Sep 17 00:00:00 2001 From: Gergo Papp-Szentannai Date: Thu, 2 Dec 2021 22:28:51 +0000 Subject: [PATCH 35/37] Merged PR 239717: Cherry-pick PR 239386: Resolve spelling mistake in Swagger documentation # Kind of Change - [x] Simple cherry pick (no manual conflict resolution) - [ ] Cherry pick (with manual conflict resolution) - [ ] Not a cherry pick; direct change into release Merged PR 239386: Resolve spelling mistake in Swagger documentation # Justification Bug 1725471: Typo in Asset Performance Management API Swagger documentation # Implementation conatining -> containing # Testing TODO: Detail the testing done to ensure this submission meets requirements. Include automated/manual test additions or modifications, testing done on a local build, and additional testing not covered by automatic pull request validation. # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product Resolve spelling mistake Related work items: #1725471 Cherry-picked from commit `edd1ef17`. Related work items: #1725471 --- asset-managment/niapm.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset-managment/niapm.yml b/asset-managment/niapm.yml index 5f92c7e..e88d1a4 100644 --- a/asset-managment/niapm.yml +++ b/asset-managment/niapm.yml @@ -3223,14 +3223,14 @@ paths: post: tags: [reports] summary: Gets an asset availability history report for multiple assets. - description: Gets a CSV file report conatining asset availability history for multiple assets based on the specified timespans. + description: Gets a CSV file report containing asset availability history for multiple assets based on the specified timespans. operationId: query-assets-availability-report x-ni-auth: true parameters: - $ref: '#/parameters/QueryAssetsAvailabilityReportRequestBody' responses: 200: - description: A CSV file report conatining the asset availability history of the assets specified by their IDs during the given time intervals. + description: A CSV file report containing the asset availability history of the assets specified by their IDs during the given time intervals. schema: type: file example: "Asset Id,Asset Name,Start Date,End Date,System Alias,Availability Percentage\n0030b58e-4e1a-47ea-9e1e-d60ba3341551,PXI3Slot7,2020-11-10 00:00:00Z,2021-01-06 00:00:00Z,NI_PXIe-8133_Embedded_Controller--MAC-00-80-2F-14-2C-06,0.0815299529054917" From 6c1200d6dcec34f0f90e00ad30b5f558308d1735 Mon Sep 17 00:00:00 2001 From: Julian Valdez Date: Tue, 14 Dec 2021 21:10:14 +0000 Subject: [PATCH 36/37] Merged PR 244484: Fixing V1 query-results example in Swagger. # Kind of Change - [x] Simple cherry pick (no manual conflict resolution) - [ ] Cherry pick (with manual conflict resolution) - [ ] Not a cherry pick; direct change into release # Commit [830de12224dff755d9fa451a7fbb7c0bef69e9d7](https://ni.visualstudio.com/DevCentral/_git/Skyline/commit/830de12224dff755d9fa451a7fbb7c0bef69e9d7) # Justification #1724543 # Implementation Fixed indentation of example lines in the .yml. # Testing Generated the docs on editor.swagger.io and saw that the correct structure was reflected in the example. # Checklist - [ ] I tested changes to product code in product - [ ] I considered updates to the wiki - [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product Fixing TestResultQueryObject example. Cherry picked from !244366 Related work items: #1724543 --- test-monitor/nitestmonitor-v1.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-monitor/nitestmonitor-v1.yml b/test-monitor/nitestmonitor-v1.yml index ba6bf2a..198d7dd 100644 --- a/test-monitor/nitestmonitor-v1.yml +++ b/test-monitor/nitestmonitor-v1.yml @@ -575,8 +575,8 @@ definitions: type: object additionalProperties: type: string - example: - key1: value1 + example: + key1: value1 updatedAtQuery: description: Time query object for the test result's last updated timestamp type: array From cb7ca7414f3e36577bdbb710c8e050eeb278aa81 Mon Sep 17 00:00:00 2001 From: Christine Spangler Date: Tue, 14 Dec 2021 21:11:39 +0000 Subject: [PATCH 37/37] Merged PR 243928: Merged PR 241762: Separate the partial success response for create/update results # Kind of Change - [ ] Simple cherry pick (no manual conflict resolution) - [x] Cherry pick (with manual conflict resolution) - [ ] Not a cherry pick; direct change into release # Details The change in master included some test files for SLE: https://ni.visualstudio.com/DevCentral/_git/Skyline/commit/58a39cd59e739bc805d7706e8269d7697ebc5163?refName=refs/heads/users/cspangle/separate-update-partial-response&path=/TestMonitorService/Tests/TestMonitor.Integration.Tests/Component/Skyline/TestMonitor/Http/V2 Those files are not included in this PR. All other changes are identical to the master PR. # Commit Cherry-picked from https://ni.visualstudio.com/DevCentral/_git/Skyline/commit/58a39cd59e739bc805d7706e8269d7697ebc5163?refName=refs/heads/users/cspangle/separate-update-partial-response Related work items: #1757137 --- test-monitor/nitestmonitor-v2.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test-monitor/nitestmonitor-v2.yml b/test-monitor/nitestmonitor-v2.yml index 0520e57..28ba210 100644 --- a/test-monitor/nitestmonitor-v2.yml +++ b/test-monitor/nitestmonitor-v2.yml @@ -1475,6 +1475,27 @@ responses: $ref: '#/definitions/TestResultRequestObject' error: $ref: '#/definitions/Error' + ResultsUpdatePartialSuccessResponse: + description: Test Results Update Partial Success Response + schema: + description: Test Results Update Partial Success Response + title: ResultsUpdatePartialSuccessResponse + type: object + required: + - results + properties: + results: + description: Array of test results + type: array + items: + $ref: '#/definitions/TestResultResponseObject' + failed: + description: Array of test result update requests that failed + type: array + items: + $ref: '#/definitions/TestResultUpdateRequestObject' + error: + $ref: '#/definitions/Error' DeleteResultsResponse: description: Delete Test Results Response schema: @@ -2129,7 +2150,7 @@ paths: $ref: '#/definitions/UpdateTestResultsRequest' responses: 200: - $ref: '#/responses/ResultsPartialSuccessResponse' + $ref: '#/responses/ResultsUpdatePartialSuccessResponse' 401: $ref: '#/responses/Unauthorized' default: