Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Note: We are creating a new api-version with this change. Watchlists.json 2022-01-01-preview parameter name changes #17848

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
366c79d
changed source to sourceType and watchlistAlias to alias
ushasan Feb 14, 2022
fa33c67
Update CreateWatchlistAndWatchlistItems.json
ushasan Feb 14, 2022
272963c
Update CreateWatchlistItem.json
ushasan Feb 14, 2022
fdbd91c
Update DeleteWatchlist.json
ushasan Feb 14, 2022
92a17ac
Update DeleteWatchlistItem.json
ushasan Feb 14, 2022
4518eb9
Update GetWatchlistByAlias.json
ushasan Feb 14, 2022
b3d96d5
Update GetWatchlistItemById.json
ushasan Feb 14, 2022
3ca7776
Update GetWatchlistItems.json
ushasan Feb 14, 2022
cb91843
Update GetWatchlistByAlias.json
ushasan Feb 14, 2022
a30a709
added missing params to match stable version
ushasan Feb 15, 2022
d98df0d
Revert "added missing params to match stable version"
ushasan Feb 15, 2022
6d11366
refreshing pipeline
ushasan Feb 16, 2022
b067d90
reverting lint diff change
ushasan Feb 16, 2022
2f96ee3
attempting to fix RemovedPath breaking changes
ushasan Feb 16, 2022
0f322ef
Revert "attempting to fix RemovedPath breaking changes"
ushasan Feb 16, 2022
9040d22
adding back source type for backwards compatibility, added response d…
ushasan Feb 22, 2022
0b61120
adding missing bracket
ushasan Feb 22, 2022
3055791
ran npm run prettier-fix to correct style issues
ushasan Feb 23, 2022
fd67a4f
resolving model/definition errors
ushasan Feb 25, 2022
3294bb5
Revert "resolving model/definition errors"
ushasan Feb 25, 2022
ccc4f7d
Revert "ran npm run prettier-fix to correct style issues"
ushasan Feb 25, 2022
8aed1c7
update
hassanchawiche Feb 25, 2022
f933b0a
Merge branch 'Watchlists.json-2022-01-01-preview-parameterNameChanges…
hassanchawiche Feb 25, 2022
552adf4
Update DeleteWatchlist.json
ushasan Feb 25, 2022
2d370ad
Update Watchlists.json
ushasan Feb 25, 2022
5557a0b
Update DeleteWatchlist.json
ushasan Feb 25, 2022
bddd1a7
Update DeleteWatchlist.json
ushasan Feb 25, 2022
db21ace
Update DeleteWatchlist.json
ushasan Feb 25, 2022
120ad44
Update DeleteWatchlist.json
ushasan Feb 25, 2022
94a5945
Update DeleteWatchlist.json
ushasan Feb 25, 2022
bf77754
Update DeleteWatchlist.json
ushasan Feb 28, 2022
f11e89b
fixing styling issues on Delete example
ushasan Feb 28, 2022
bbcbf77
Update DeleteWatchlist.json
ushasan Feb 28, 2022
9e00156
Update DeleteWatchlist.json
ushasan Feb 28, 2022
c2838a0
ran npm run prettier on DeleteWatchlist.json
ushasan Feb 28, 2022
61599bc
Update Watchlists.json
ushasan Feb 28, 2022
a09df08
reverting alias to watchlistAlias
ushasan Mar 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
},
{
"$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName"
},
{
"$ref": "../../../common/1.0/types.json#/parameters/ODataSkipToken"
}
],
"responses": {
Expand Down Expand Up @@ -155,6 +158,18 @@
"200": {
"description": "OK"
},
"202": {
"description": "Accepted",
"schema": {
"$ref": "#/definitions/Watchlist"
},
"headers": {
"Azure-AsyncOperation": {
"description": "Contains the status URL on which clients are expected to poll the status of the delete operation.",
"type": "string"
}
}
},
"204": {
"description": "No Content"
},
Expand All @@ -178,7 +193,7 @@
"tags": [
"Watchlists"
],
"description": "Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties.",
"description": "Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing such large file can be polled through the URL returned in Azure-AsyncOperation header.",
"operationId": "Watchlists_CreateOrUpdate",
"parameters": [
{
Expand Down Expand Up @@ -208,9 +223,15 @@
}
},
"201": {
"description": "Created",
"description": "Created. The response includes the Provisioning State and the Azure-AsyncOperation header. To get the progress of the operation, call GET operation on the URL in Azure-AsyncOperation header field.",
"schema": {
"$ref": "#/definitions/Watchlist"
},
"headers": {
"Azure-AsyncOperation": {
"description": "Contains the status URL on which clients are expected to poll the status of the operation.",
"type": "string"
}
}
},
"default": {
Expand Down Expand Up @@ -247,6 +268,9 @@
{
"$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName"
},
{
"$ref": "../../../common/1.0/types.json#/parameters/ODataSkipToken"
},
{
"$ref": "#/parameters/WatchlistAlias"
}
Expand Down Expand Up @@ -423,6 +447,7 @@
"definitions": {
"WatchlistList": {
"description": "List all the watchlists.",
"type": "object",
"properties": {
"nextLink": {
"description": "URL to fetch the next set of watchlists.",
Expand All @@ -437,7 +462,6 @@
"type": "array"
}
},
"type": "object",
"required": [
"value"
]
Expand Down Expand Up @@ -474,15 +498,19 @@
"type": "string"
},
"source": {
"description": "The source of the watchlist",
"description": "The filename of the watchlist, called 'source'",
"type": "string"
},
"sourceType": {
ushasan marked this conversation as resolved.
Show resolved Hide resolved
"description": "The sourceType of the watchlist",
"enum": [
"Local file",
"Remote storage"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "source"
"name": "sourceType"
}
},
"created": {
Expand Down Expand Up @@ -557,16 +585,10 @@
"uploadStatus": {
"description": "The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted",
"type": "string"
},
"watchlistItemsCount": {
"description": "The number of Watchlist Items in the Watchlist",
"type": "integer",
"format": "int32"
}
},
"required": [
ushasan marked this conversation as resolved.
Show resolved Hide resolved
"displayName",
"source",
"provider",
"itemsSearchKey"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"properties": {
"displayName": "High Value Assets Watchlist",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
ushasan marked this conversation as resolved.
Show resolved Hide resolved
"provider": "Microsoft",
"description": "Watchlist from CSV content",
"itemsSearchKey": "header1"
Expand All @@ -27,7 +28,8 @@
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
Expand Down Expand Up @@ -59,7 +61,8 @@
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"watchlistAlias": "highValueAsset",
"watchlist": {
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"properties": {
"displayName": "High Value Assets Watchlist",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
"provider": "Microsoft",
"description": "Watchlist from CSV content",
"numberOfLinesToSkip": 1,
Expand All @@ -30,7 +32,8 @@
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
Expand Down Expand Up @@ -62,7 +65,8 @@
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curious, I wonder why do we need to provide this operationalInsightsResourceProvider parameter value in the example? I don't see the definition in the Watchlists.json

"watchlistAlias": "highValueAsset",
"watchlistItemId": "82ba292c-dc97-4dfc-969d-d4dd9e666842",
"watchlistItem": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"watchlistAlias": "highValueAsset"
},
"responses": {
"200": {},
"202": {
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/watchlists/1011-01/watchlistStatuses/00000000-0000-0000-0000-000000000000?api-version=2022-01-01-preview"
},
"body": {}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to add headers with Azure-AsycnOperation here. the current Lint tool has a bug, so it's not catching it. I was asked to add to our swagger examples in our own PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. Added it. Please let me know if you're able to approve with that change as we're coming up on the change deadline of Feb 28th. Thanks!

},
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"watchlistAlias": "highValueAsset",
"watchlistItemId": "4008512e-1d30-48b2-9ee2-d3612ed9d3ea"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"watchlistAlias": "highValueAsset"
},
"responses": {
Expand All @@ -17,7 +18,8 @@
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"watchlistAlias": "highValueAsset",
"watchlistItemId": "3f8901fe-63d9-4875-9ad5-9fb3b8105797"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"watchlistAlias": "highValueAsset"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"api-version": "2022-01-01-preview",
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace"
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights"
},
"responses": {
"200": {
Expand All @@ -18,7 +19,8 @@
"watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017",
"displayName": "High Value Assets Watchlist",
"provider": "Microsoft",
"source": "Local file",
"source": "watchlist.csv",
"sourceType": "Local file",
"created": "2020-09-28T00:26:54.7746089+00:00",
"updated": "2020-09-28T00:26:57+00:00",
"createdBy": {
Expand Down