Skip to content

Commit 6b89471

Browse files
authored
api management events schema (#15987)
* add swagger * align * rephrase * resolvemergeconflict * comments * examples * prettier * comments * pascal Co-authored-by: Kacie Kang <[email protected]>
1 parent c927d65 commit 6b89471

17 files changed

+344
-0
lines changed
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2018-01-01",
5+
"title": "Schema of Azure API Management events published to Azure Event Grid",
6+
"description": "Describes the schema of the Azure API Management events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
7+
},
8+
"paths": {},
9+
"definitions": {
10+
"ApiManagementUserCreatedEventData": {
11+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserCreated event.",
12+
"type": "object",
13+
"properties": {
14+
"resourceUri": {
15+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
16+
"type": "string"
17+
}
18+
}
19+
},
20+
"ApiManagementUserUpdatedEventData": {
21+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserUpdated event.",
22+
"type": "object",
23+
"properties": {
24+
"resourceUri": {
25+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
26+
"type": "string"
27+
}
28+
}
29+
},
30+
"ApiManagementUserDeletedEventData": {
31+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserDeleted event.",
32+
"type": "object",
33+
"properties": {
34+
"resourceUri": {
35+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
36+
"type": "string"
37+
}
38+
}
39+
},
40+
"ApiManagementSubscriptionCreatedEventData": {
41+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionCreated event.",
42+
"type": "object",
43+
"properties": {
44+
"resourceUri": {
45+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
46+
"type": "string"
47+
}
48+
}
49+
},
50+
"ApiManagementSubscriptionUpdatedEventData": {
51+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionUpdated event.",
52+
"type": "object",
53+
"properties": {
54+
"resourceUri": {
55+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
56+
"type": "string"
57+
}
58+
}
59+
},
60+
"ApiManagementSubscriptionDeletedEventData": {
61+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionDeleted event.",
62+
"type": "object",
63+
"properties": {
64+
"resourceUri": {
65+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
66+
"type": "string"
67+
}
68+
}
69+
},
70+
"ApiManagementProductCreatedEventData": {
71+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductCreated event.",
72+
"type": "object",
73+
"properties": {
74+
"resourceUri": {
75+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
76+
"type": "string"
77+
}
78+
}
79+
},
80+
"ApiManagementProductUpdatedEventData": {
81+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductUpdated event.",
82+
"type": "object",
83+
"properties": {
84+
"resourceUri": {
85+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
86+
"type": "string"
87+
}
88+
}
89+
},
90+
"ApiManagementProductDeletedEventData": {
91+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductDeleted event.",
92+
"type": "object",
93+
"properties": {
94+
"resourceUri": {
95+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
96+
"type": "string"
97+
}
98+
}
99+
},
100+
"ApiManagementApiCreatedEventData": {
101+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APICreated event.",
102+
"type": "object",
103+
"properties": {
104+
"resourceUri": {
105+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
106+
"type": "string"
107+
}
108+
}
109+
},
110+
"ApiManagementApiUpdatedEventData": {
111+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIUpdated event.",
112+
"type": "object",
113+
"properties": {
114+
"resourceUri": {
115+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
116+
"type": "string"
117+
}
118+
}
119+
},
120+
"ApiManagementApiDeletedEventData": {
121+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIDeleted event.",
122+
"type": "object",
123+
"properties": {
124+
"resourceUri": {
125+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
126+
"type": "string"
127+
}
128+
}
129+
},
130+
"ApiManagementApiReleaseCreatedEventData": {
131+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIReleaseCreated event.",
132+
"type": "object",
133+
"properties": {
134+
"resourceUri": {
135+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
136+
"type": "string"
137+
}
138+
}
139+
},
140+
"ApiManagementApiReleaseUpdatedEventData": {
141+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIReleaseUpdated event.",
142+
"type": "object",
143+
"properties": {
144+
"resourceUri": {
145+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
146+
"type": "string"
147+
}
148+
}
149+
},
150+
"ApiManagementApiReleaseDeletedEventData": {
151+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIReleaseDeleted event.",
152+
"type": "object",
153+
"properties": {
154+
"resourceUri": {
155+
"description": "The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`",
156+
"type": "string"
157+
}
158+
}
159+
}
160+
}
161+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/apis/myapi",
5+
"data": {
6+
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/myapi"
7+
},
8+
"eventType": "Microsoft.ApiManagement.APICreated",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-12T23:13:44.9048323Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/apis/myapi;Rev=1",
5+
"data": {
6+
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/myapi;Rev=1"
7+
},
8+
"eventType": "Microsoft.ApiManagement.APIDeleted",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-12T23:13:44.9048323Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/apis/myapi;Rev=1",
5+
"data": {
6+
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/myapi;Rev=1"
7+
},
8+
"eventType": "Microsoft.ApiManagement.APIUpdated",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-12T23:13:44.9048323Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/apis/{apiId}/releases/{releaseId}",
5+
"data": {
6+
"resourceUri": "/subscriptions/subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/{apiId}/releases/{releaseId}"
7+
},
8+
"eventType": "Microsoft.ApiManagement.APIReleaseCreated",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-12T23:13:44.9048323Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/apis/{apiId}/releases/{releaseId}",
5+
"data": {
6+
"resourceUri": "/subscriptions/subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/{apiId}/releases/{releaseId}"
7+
},
8+
"eventType": "Microsoft.ApiManagement.APIReleaseDeleted",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-12T23:13:44.9048323Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "95015754-aa51-4eb6-98d9-9ee322b82ad7",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/apis/{apiId}/releases/{releaseId}",
5+
"data": {
6+
"resourceUri": "/subscriptions/subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/apis/{apiId}/releases/{releaseId}"
7+
},
8+
"eventType": "Microsoft.ApiManagement.APIReleaseUpdated",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-12T23:13:44.9048323Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "92c502f2-a966-42a7-a428-d3b319844544",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/products/myproduct",
5+
"data": {
6+
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/products/myproduct"
7+
},
8+
"eventType": "Microsoft.ApiManagement.ProductCreated",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-02T00:47:47.8536532Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "92c502f2-a966-42a7-a428-d3b319844544",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/products/myproduct",
5+
"data": {
6+
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/products/myproduct"
7+
},
8+
"eventType": "Microsoft.ApiManagement.ProductDeleted",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-02T00:47:47.8536532Z"
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"id": "92c502f2-a966-42a7-a428-d3b319844544",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}",
4+
"subject": "/products/myproduct",
5+
"data": {
6+
"resourceUri": "/subscriptions/{subscription-id}/resourceGroups/{your-rg}/providers/Microsoft.ApiManagement/service/{your-APIM-instance}/products/myproduct"
7+
},
8+
"eventType": "Microsoft.ApiManagement.ProductUpdated",
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2021-07-02T00:47:47.8536532Z"
12+
}

0 commit comments

Comments
 (0)