-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
style.json
425 lines (425 loc) · 18.7 KB
/
style.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
{
"swagger": "2.0",
"info": {
"title": "Azure Maps Style Service",
"version": "2022-09-01-preview",
"description": "This is an extension of the Azure Maps Tileset API to serve custom styles. It will allow a client to create a list of map styling information which can be combined with tilesetIds to create map configurations that can be consumed directly by front-end services (map control web & mobile SDKs, styling tools like [Maputnik](https://maputnik.github.io/editor/))."
},
"x-ms-parameterized-host": {
"hostTemplate": "{geography}.atlas.microsoft.com",
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/GeographicResourceLocation"
}
]
},
"schemes": [
"https"
],
"consumes": [],
"produces": [
"application/json"
],
"securityDefinitions": {
"AADToken": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "These are the [Microsoft Entra OAuth 2.0](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* For more information on Microsoft identity platform, see [Microsoft identity platform overview](https://learn.microsoft.com/entra/identity-platform/v2-overview).",
"scopes": {
"https://atlas.microsoft.com/.default": "https://atlas.microsoft.com/.default"
}
},
"SharedKey": {
"type": "apiKey",
"description": "This is a shared key that is provisioned when you [Create an Azure Maps account](https://docs.microsoft.com/azure/azure-maps/quick-demo-map-app#create-an-azure-maps-account) in the Azure portal or using PowerShell, CLI, Azure SDKs, or REST API.\n\n With this key, any application can access all REST API. In other words, this key can be used as a master key in the account that they are issued in.\n\n For publicly exposed applications, our recommendation is to use the [confidential client applications](https://docs.microsoft.com/azure/azure-maps/authentication-best-practices#confidential-client-applications) approach to access Azure Maps REST APIs so your key can be securely stored.",
"name": "subscription-key",
"in": "query"
},
"SasToken": {
"type": "apiKey",
"description": "This is a shared access signature token is created from the List SAS operation on the [Azure Maps resource](https://aka.ms/amauth) through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n\n With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.\n\n For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the [Map account resource](https://aka.ms/amauth) to limit rendering abuse and regularly renew the SAS Token.",
"name": "SAS Token",
"in": "header"
}
},
"security": [
{
"AADToken": [
"https://atlas.microsoft.com/.default"
]
},
{
"SharedKey": []
},
{
"SasToken": []
}
],
"responses": {},
"parameters": {
"ApiVersion": {
"name": "api-version",
"description": "Version number of Azure Maps API.",
"type": "string",
"in": "query",
"required": true,
"default": "2022-09-01-preview",
"x-ms-parameter-location": "client"
},
"StyleId": {
"name": "styleId",
"description": "The Style Id.",
"type": "string",
"in": "path",
"required": true,
"x-ms-parameter-location": "method"
},
"DescriptionStyle": {
"name": "description",
"description": "User provided description of the style. Maximum length 1024 characters.",
"type": "string",
"in": "query",
"x-ms-parameter-location": "method"
},
"StyleOperationId": {
"name": "operationId",
"type": "string",
"in": "path",
"description": "The ID to query the status for the style create request.",
"required": true,
"x-ms-parameter-location": "method"
},
"StyleAlias": {
"name": "alias",
"description": "The alias of the style. Maximum length 1024 characters. Alias cannot start with `microsoft-maps` which is a reserved prefix. Alias can be provided optionally during creating a style, and can be used as same as styleId after style creation. ",
"type": "string",
"in": "query",
"required": false,
"x-ms-parameter-location": "method"
}
},
"paths": {
"/styles": {
"post": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Style Create request allows the caller to create an Azure Maps style.\n\nCreator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.\n\n## Submit Create Request\n\nTo create your style you will make a `POST` request with an azure maps style. \n\nThe Create Style API is a [long-running operation](https://aka.ms/am-creator-lrt-v2).",
"operationId": "Style_Create",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Create Style by providing an azure maps style json file": {
"$ref": "./examples/style/Style_Create.json"
}
},
"consumes": [
"application/json",
"application/zip"
],
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/DescriptionStyle"
},
{
"$ref": "#/parameters/StyleAlias"
},
{
"name": "CreateContent",
"in": "body",
"description": "The style content to be uploaded. If JSON data format is provided, then the request body should follow [Layers specification](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers) in MapLibre Style specification. If ZIP data format is provided, you should also provide the sprite sheet and associated index files which contains icons used in the style configuration json file.",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
"202": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/202AsyncV2"
},
"default": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/default"
}
}
},
"get": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Style List request allows the caller to fetch a list of all styles created. The default indoor style `microsoft-maps:indoor_2022-01-01` and `microsoft-maps:indoor_dark_2022-01-01` will not show in the list response. But you can still use it as your own style by the predefined alias.\n\n Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator. \n<br>",
"operationId": "Style_List",
"x-ms-examples": {
"Get a list of all styles": {
"$ref": "./examples/style/Style_List.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
}
],
"x-ms-pageable": {
"itemName": "styles",
"nextLinkName": "nextLink"
},
"responses": {
"200": {
"description": "List style request completed successfully. The response body contains a list of all styles.",
"schema": {
"$ref": "#/definitions/StyleListResult"
}
},
"default": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/default"
}
}
}
},
"/styles/{styleId}": {
"get": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Style Get request allows the caller to get a style. Customers can get two predefined default styles using alias `microsoft-maps:indoor_2022-01-01` for indoor light and `microsoft-maps:indoor_dark_2022-01-01` for indoor dark. \n\n Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and tools that apply to Azure Maps Creator.",
"operationId": "Style_Get",
"x-ms-examples": {
"Get the details for a single style": {
"$ref": "./examples/style/Style_Get.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/StyleId"
}
],
"produces": [
"application/zip"
],
"responses": {
"200": {
"description": "Get style request completed successfully. The response body contains a zip file with style content.",
"schema": {
"type": "object",
"format": "file",
"readOnly": true
},
"headers": {
"Content-Type": {
"type": "string",
"description": "The content-type for the response."
}
}
},
"default": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/default"
}
}
},
"delete": {
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Style Delete request allows the caller to remove a style from their Azure Maps account.<br> \n\n### Submit Delete Request\n\nAn `HTTP DELETE` request with the `styleId` in the path of the request is required to remove an existing style from your Azure Maps account.<br> \n\n#### Delete request \"Successful\"\n\nThe Style Delete API returns a HTTP `204 No Content` response with an empty body, if the style was deleted successfully.<br> \n\n#### Delete request \"Failed\"\n\nA HTTP `400 Bad Request` error response will be returned if the style with the passed-in `styleId` is not found. \n\nHere is a sample error response:\n\n<br>\n\n```json\n{\n \"error\": {\n \"code\": \"400 BadRequest\",\n \"message\": \"Bad request - Style Id: d85b5b27-5fc4-4599-8b50-47160e90f8ce does not exist.\"\n }\n}\n```",
"operationId": "Style_Delete",
"x-ms-examples": {
"Delete a created style": {
"$ref": "./examples/style/Style_Delete.json"
}
},
"parameters": [
{
"$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/StyleId"
}
],
"responses": {
"204": {
"description": "Style delete request completed successfully."
},
"default": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/default"
}
}
}
},
"/styles/operations/{operationId}": {
"get": {
"description": "The Style Get Operation request is obtained from the call to create a style. It is returned in the response headers Resource-Location key once the creation process has completed successfully.",
"operationId": "Style_GetOperation",
"x-ms-examples": {
"Get the status of an operation which is still running": {
"$ref": "./examples/style/Style_GetOperationStillRunning.json"
},
"Get the status of an operation which has finished successfully": {
"$ref": "./examples/style/Style_GetOperation.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/StyleOperationId"
}
],
"responses": {
"200": {
"description": "The operation is running or complete. If the operation was successful, use the Resource-Location header to obtain the path to the result.",
"schema": {
"$ref": "./tileset.json#/definitions/LongRunningOperationResult"
},
"headers": {
"Resource-Location": {
"type": "string",
"description": "If successful, a URI where details on the newly created resource can be found."
}
}
},
"default": {
"$ref": "../../../Common/preview/1.0/common.json#/responses/default"
}
}
}
}
},
"definitions": {
"StyleListResult": {
"description": "The response model for the Style List API. Returns a list of all styles.",
"type": "object",
"properties": {
"styles": {
"description": "A list of all styles.",
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/StyleListItem"
}
},
"nextLink": {
"description": "If present, the location of the next page of data.",
"type": "string",
"readOnly": true
}
}
},
"StyleListItem": {
"description": "Detail information for the data.",
"type": "object",
"properties": {
"styleId": {
"description": "The unique style id for the style.",
"type": "string",
"readOnly": true
},
"description": {
"description": "The description the caller provided when creating the style. Maximum length 1024 characters.",
"type": "string",
"readOnly": true
},
"alias": {
"description": "The alias of the style. Maximum length 1024 characters. Alias cannot start with `microsoft-maps` which is a reserved prefix.",
"type": "string",
"readOnly": true
},
"created": {
"description": "The creation date and time of this style. As defined by `date-time` - [RFC3339](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14)",
"type": "string",
"format": "date-time",
"readOnly": true
}
}
},
"StyleLayerObject": {
"description": "A layer object.",
"type": "object",
"properties": {
"id": {
"description": "The unique id for the layer.",
"type": "string",
"readOnly": true
},
"type": {
"description": "The type of the layer.",
"type": "string",
"readOnly": true
},
"source-layer": {
"description": "The source layer.",
"type": "string",
"readOnly": true
},
"source": {
"description": "The source.",
"type": "string",
"readOnly": true
},
"layout": {
"description": "The layout of the layer.",
"type": "object",
"readOnly": true
},
"paint": {
"description": "The paint configuration of the layer.",
"type": "object",
"readOnly": true
}
}
},
"Style": {
"description": "Detail information for the data.",
"type": "object",
"properties": {
"id": {
"description": "The unique style id for the style.",
"type": "string",
"readOnly": true
},
"version": {
"description": "The version of the style.",
"type": "number",
"readOnly": true
},
"created": {
"description": "The creation date and time of this style.",
"type": "string",
"readOnly": true
},
"description": {
"description": "The description the caller provided when creating the style. Maximum length 1024 characters.",
"type": "string",
"readOnly": true
},
"sources": {
"description": "Data source specifications.",
"type": "object",
"readOnly": true
},
"sprite": {
"description": "A base URL for retrieving the sprite image and metadata.",
"type": "string",
"readOnly": true
},
"layers": {
"description": "A style's layers property lists all the layers available in that style",
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/StyleLayerObject"
}
}
}
}
}
}