Skip to content

Commit 7ba7687

Browse files
Add collection APIs (#15221)
* add collection APIs * Update purviewcatalog.json * Add default error response * Update purviewcatalog.json * Revert "Update purviewcatalog.json" This reverts commit 97dcdea. * Revert "Add default error response" This reverts commit 37a50df. * fix api-version
1 parent a2ff0f7 commit 7ba7687

File tree

4 files changed

+282
-0
lines changed

4 files changed

+282
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"parameters": {
3+
"Endpoint": "{Endpoint}",
4+
"collection": "ExampleCollection",
5+
"api-version": "2021-05-01-preview",
6+
"entity": {
7+
"referredEntities": {},
8+
"entity": {
9+
"typeName": "azure_storage_account",
10+
"attributes": {
11+
"name": "exampleaccount",
12+
"qualifiedName": "https://exampleaccount.core.windows.net"
13+
}
14+
}
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"mutatedEntities": {
21+
"CREATE": [
22+
{
23+
"typeName": "azure_storage_account",
24+
"attributes": {
25+
"qualifiedName": "https://exampleaccount.core.windows.net"
26+
},
27+
"lastModifiedTS": "1",
28+
"guid": "38d3c41f-300c-434e-8dad-0b1a7cb5efd6",
29+
"status": "ACTIVE"
30+
}
31+
]
32+
},
33+
"guidAssignments": {
34+
"-9514774903018162": "38d3c41f-300c-434e-8dad-0b1a7cb5efd6"
35+
}
36+
}
37+
}
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"parameters": {
3+
"Endpoint": "{Endpoint}",
4+
"collection": "ExampleCollection",
5+
"api-version": "2021-05-01-preview",
6+
"entities": {
7+
"referredEntities": {},
8+
"entities": [
9+
{
10+
"typeName": "azure_storage_account",
11+
"attributes": {
12+
"qualifiedName": "exampleaccount",
13+
"name": "exampleaccount",
14+
"description": "Example Description"
15+
}
16+
},
17+
{
18+
"typeName": "azure_storage_account",
19+
"attributes": {
20+
"qualifiedName": "exampleaccount2",
21+
"name": "exampleaccount2"
22+
}
23+
}
24+
]
25+
}
26+
},
27+
"responses": {
28+
"200": {
29+
"body": {
30+
"mutatedEntities": {
31+
"UPDATE": [
32+
{
33+
"typeName": "azure_storage_account",
34+
"attributes": {
35+
"qualifiedName": "exampleaccount"
36+
},
37+
"lastModifiedTS": "2",
38+
"guid": "b2f9c306-cf65-4bb0-878e-cfaafde156b1",
39+
"status": "ACTIVE"
40+
}
41+
],
42+
"CREATE": [
43+
{
44+
"typeName": "azure_storage_account",
45+
"attributes": {
46+
"qualifiedName": "exampleaccount2"
47+
},
48+
"lastModifiedTS": "1",
49+
"guid": "321493e3-3fb7-4b3e-9df7-3b69154174c2",
50+
"status": "ACTIVE"
51+
}
52+
]
53+
},
54+
"guidAssignments": {
55+
"-9514774903018192": "321493e3-3fb7-4b3e-9df7-3b69154174c2",
56+
"-9514774903018193": "b2f9c306-cf65-4bb0-878e-cfaafde156b1"
57+
}
58+
}
59+
}
60+
}
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"parameters": {
3+
"Endpoint": "{Endpoint}",
4+
"collection": "ExampleNewCollection",
5+
"api-version": "2021-05-01-preview",
6+
"moveEntitiesRequest": {
7+
"entityGuids": [
8+
"321493e3-3fb7-4b3e-9df7-3b69154174c2",
9+
"b2f9c306-cf65-4bb0-878e-cfaafde156b1"
10+
]
11+
}
12+
},
13+
"responses": {
14+
"200": {
15+
"body": {
16+
"mutatedEntities": {
17+
"UPDATE": [
18+
{
19+
"typeName": "azure_storage_account",
20+
"attributes": {
21+
"qualifiedName": "exampleaccount"
22+
},
23+
"lastModifiedTS": "3",
24+
"guid": "b2f9c306-cf65-4bb0-878e-cfaafde156b1",
25+
"status": "ACTIVE"
26+
},
27+
{
28+
"typeName": "azure_storage_account",
29+
"attributes": {
30+
"qualifiedName": "exampleaccount2"
31+
},
32+
"lastModifiedTS": "2",
33+
"guid": "321493e3-3fb7-4b3e-9df7-3b69154174c2",
34+
"status": "ACTIVE"
35+
}
36+
]
37+
},
38+
"guidAssignments": {
39+
"-9514774903018192": "321493e3-3fb7-4b3e-9df7-3b69154174c2",
40+
"-9514774903018193": "b2f9c306-cf65-4bb0-878e-cfaafde156b1"
41+
}
42+
}
43+
}
44+
}
45+
}

specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-05-01-preview/purviewcatalog.json

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,6 +3033,123 @@
30333033
}
30343034
}
30353035
}
3036+
},
3037+
"/collections/{collection}/entity": {
3038+
"post": {
3039+
"tags": [
3040+
"CatalogCollection"
3041+
],
3042+
"description": "Creates or updates an entity to a collection.\nExisting entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName.\nMap and array of collections are not well supported. E.g., array<array<int>>, array<map<string, int>>.",
3043+
"operationId": "CatalogCollection_createOrUpdate",
3044+
"x-ms-examples": {
3045+
"CatalogCollection_createOrUpdate": {
3046+
"$ref": "./examples/CatalogCollection_createOrUpdate.json"
3047+
}
3048+
},
3049+
"parameters": [
3050+
{
3051+
"$ref": "#/parameters/collection"
3052+
},
3053+
{
3054+
"$ref": "#/parameters/purviewAPIVersion"
3055+
},
3056+
{
3057+
"in": "body",
3058+
"name": "entity",
3059+
"description": "Atlas entity with extended information.",
3060+
"required": true,
3061+
"schema": {
3062+
"$ref": "#/definitions/AtlasEntityWithExtInfo"
3063+
}
3064+
}
3065+
],
3066+
"responses": {
3067+
"200": {
3068+
"description": "Created with EntityMutationResponse.",
3069+
"schema": {
3070+
"$ref": "#/definitions/EntityMutationResponse"
3071+
}
3072+
}
3073+
}
3074+
}
3075+
},
3076+
"/collections/{collection}/entity/bulk": {
3077+
"post": {
3078+
"tags": [
3079+
"CatalogCollection"
3080+
],
3081+
"description": "Creates or updates entities in bulk to a collection.\nExisting entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName.\nMap and array of collections are not well supported. E.g., array<array<int>>, array<map<string, int>>.",
3082+
"operationId": "CatalogCollection_createOrUpdateBulk",
3083+
"x-ms-examples": {
3084+
"CatalogCollection_createOrUpdateBulk": {
3085+
"$ref": "./examples/CatalogCollection_createOrUpdateBulk.json"
3086+
}
3087+
},
3088+
"parameters": [
3089+
{
3090+
"$ref": "#/parameters/collection"
3091+
},
3092+
{
3093+
"$ref": "#/parameters/purviewAPIVersion"
3094+
},
3095+
{
3096+
"in": "body",
3097+
"name": "entities",
3098+
"description": "Atlas entities with extended information.",
3099+
"required": true,
3100+
"schema": {
3101+
"$ref": "#/definitions/AtlasEntitiesWithExtInfo"
3102+
}
3103+
}
3104+
],
3105+
"responses": {
3106+
"200": {
3107+
"description": "Created with EntityMutationResponse.",
3108+
"schema": {
3109+
"$ref": "#/definitions/EntityMutationResponse"
3110+
}
3111+
}
3112+
}
3113+
}
3114+
},
3115+
"/collections/{collection}/entity/moveHere": {
3116+
"post": {
3117+
"tags": [
3118+
"CatalogCollection"
3119+
],
3120+
"description": "Move existing entities to the target collection.",
3121+
"operationId": "CatalogCollection_moveEntitiesToCollection",
3122+
"x-ms-examples": {
3123+
"CatalogCollection_moveEntitiesToCollection": {
3124+
"$ref": "./examples/CatalogCollection_moveEntitiesToCollection.json"
3125+
}
3126+
},
3127+
"parameters": [
3128+
{
3129+
"$ref": "#/parameters/collection"
3130+
},
3131+
{
3132+
"$ref": "#/parameters/purviewAPIVersion"
3133+
},
3134+
{
3135+
"in": "body",
3136+
"name": "moveEntitiesRequest",
3137+
"description": "Entity guids to be moved to target collection.",
3138+
"required": true,
3139+
"schema": {
3140+
"$ref": "#/definitions/MoveEntitiesRequest"
3141+
}
3142+
}
3143+
],
3144+
"responses": {
3145+
"200": {
3146+
"description": "Created with EntityMutationResponse.",
3147+
"schema": {
3148+
"$ref": "#/definitions/EntityMutationResponse"
3149+
}
3150+
}
3151+
}
3152+
}
30363153
}
30373154
},
30383155
"definitions": {
@@ -4664,6 +4781,18 @@
46644781
"title": "ClassificationAssociateRequest",
46654782
"description": "The request for classification association."
46664783
},
4784+
"MoveEntitiesRequest": {
4785+
"type": "object",
4786+
"properties": {
4787+
"entityGuids": {
4788+
"type": "array",
4789+
"description": "An array of entity guids to be moved to target collection.",
4790+
"items": {
4791+
"type": "string"
4792+
}
4793+
}
4794+
}
4795+
},
46674796
"DateFormat": {
46684797
"type": "object",
46694798
"title": "DateFormat",
@@ -6124,6 +6253,14 @@
61246253
"modelAsString": true
61256254
},
61266255
"x-ms-parameter-location": "method"
6256+
},
6257+
"collection": {
6258+
"name": "collection",
6259+
"description": "the collection unique name",
6260+
"in": "path",
6261+
"required": true,
6262+
"type": "string",
6263+
"x-ms-parameter-location": "method"
61276264
}
61286265
}
61296266
}

0 commit comments

Comments
 (0)