summaryrefslogtreecommitdiff
path: root/data/en_us/carbonfootprint/2023-07-11/api-docs.php
blob: 2dcf7c06e94695e694d621df224c7ba587895a7a (plain)
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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
<?php return [
    'version' => '1.0',
    'info' => [
        'style' => 'RPC',
        'product' => 'CarbonFootprint',
        'version' => '2023-07-11',
    ],
    'directories' => [
        'Allow',
        'GetSummaryData',
        'QueryCarbonTrack',
        'Verify',
        'QueryMultiAccountCarbonTrack',
    ],
    'components' => [
        'schemas' => [],
    ],
    'apis' => [
        'Allow' => [
            'summary' => 'Enables authorization.',
            'methods' => [
                'get',
                'post',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'readAndWrite',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'free',
                'abilityTreeNodes' => [
                    'FEATUREenergyexpertY0LRFK',
                ],
                'tenantRelevance' => 'publicInformation',
            ],
            'parameters' => [],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'scheme',
                        'description' => 'scheme',
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'description' => '',
                                'type' => 'string',
                                'example' => 'A009DA1A-46BD-5C72-A713-EEB82249120D',
                            ],
                            'Data' => [
                                'description' => '',
                                'type' => 'boolean',
                                'example' => 'true',
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"RequestId\\": \\"A009DA1A-46BD-5C72-A713-EEB82249120D\\",\\n  \\"Data\\": true\\n}","type":"json"}]',
            'title' => 'Allow',
        ],
        'GetSummaryData' => [
            'summary' => 'Queries the summary data of carbon emissions.',
            'methods' => [
                'get',
                'post',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [],
            'parameters' => [
                [
                    'name' => 'StartTime',
                    'in' => 'query',
                    'schema' => [
                        'description' => 'The beginning of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. Example: 2023-01-01 00:00:00.'."\n",
                        'type' => 'string',
                        'required' => false,
                        'example' => '2023-01-01 00:00:00'."\n"
                            ."\n",
                    ],
                ],
                [
                    'name' => 'EndTime',
                    'in' => 'query',
                    'schema' => [
                        'description' => 'The end of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. Example: 2023-02-01 23:59:59.'."\n",
                        'type' => 'string',
                        'required' => false,
                        'example' => '2023-02-01 23:59:59'."\n"
                            ."\n",
                    ],
                ],
                [
                    'name' => 'Group',
                    'in' => 'query',
                    'schema' => [
                        'description' => 'The statistical dimension. A value of productCode specifies that statistics are collected based on cloud service. A value of region specifies that statistics are collected based on region. A value of subUid specifies that statistics are collected based on Resource Access Management (RAM) user. If you do not specify this parameter, statistics are collected based on Alibaba Cloud account.'."\n",
                        'type' => 'string',
                        'required' => false,
                        'example' => 'productCode',
                    ],
                ],
                [
                    'name' => 'Uids',
                    'in' => 'query',
                    'style' => 'json',
                    'schema' => [
                        'description' => 'The list of Alibaba Cloud account IDs whose data needs to be queried.(used after enabling multi-account management).',
                        'type' => 'array',
                        'items' => [
                            'description' => 'Alibaba Cloud account ID',
                            'type' => 'string',
                            'required' => false,
                            'example' => '1818401759059836',
                        ],
                        'required' => false,
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Schema of Response',
                        'description' => 'The response parameters.'."\n",
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'title' => 'Id of the request',
                                'description' => 'The request ID.'."\n",
                                'type' => 'string',
                                'example' => '88FC75E3-BFFD-50B3-988D-C08E6B795CFD',
                            ],
                            'Data' => [
                                'description' => 'The returned data.'."\n",
                                'type' => 'object',
                                'properties' => [
                                    'ThisMonthConsumptionConversion' => [
                                        'description' => 'The carbon emissions in this month, in kgCO₂e.'."\n",
                                        'type' => 'string',
                                        'example' => '193.47',
                                    ],
                                    'LastMonthConsumptionConversion' => [
                                        'description' => 'The carbon emissions in the previous month, in kgCO₂e.'."\n",
                                        'type' => 'string',
                                        'example' => '301.83',
                                    ],
                                    'ThisYearConsumptionConversion' => [
                                        'description' => 'The carbon emissions in the year of this month, in kgCO₂e.'."\n",
                                        'type' => 'string',
                                        'example' => '1621.06',
                                    ],
                                    'LastYearConsumptionConversion' => [
                                        'description' => 'The carbon emissions in the same month of the previous year, in kgCO₂e.'."\n",
                                        'type' => 'string',
                                        'example' => '1074.53',
                                    ],
                                    'LastYearConsumptionConversionSum' => [
                                        'description' => 'The carbon emissions of the previous year, in kgCO₂e.'."\n",
                                        'type' => 'string',
                                        'example' => '2844.58',
                                    ],
                                    'LatestDataTime' => [
                                        'description' => 'The point in time at which the data is last updated.'."\n",
                                        'type' => 'string',
                                        'example' => '2023-06-01 00:00:00',
                                    ],
                                    'TotalCarbonConsumptionConversion' => [
                                        'description' => 'The total carbon emissions within the specified time range, in kgCO₂e.'."\n",
                                        'type' => 'string',
                                        'example' => '1621.06',
                                    ],
                                    'CarConsumptionConversion' => [
                                        'description' => 'Converted car carbon emissions.',
                                        'type' => 'string',
                                        'example' => '0',
                                    ],
                                    'AircraftConsumptionConversion' => [
                                        'description' => 'Converted aircraft carbon emissions.',
                                        'type' => 'string',
                                        'example' => '2.5',
                                    ],
                                    'TreeConsumptionConversion' => [
                                        'description' => 'Converted tree carbon absorption.',
                                        'type' => 'string',
                                        'example' => '686.4',
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"RequestId\\": \\"88FC75E3-BFFD-50B3-988D-C08E6B795CFD\\",\\n  \\"Data\\": {\\n    \\"ThisMonthConsumptionConversion\\": \\"193.47\\",\\n    \\"LastMonthConsumptionConversion\\": \\"301.83\\",\\n    \\"ThisYearConsumptionConversion\\": \\"1621.06\\",\\n    \\"LastYearConsumptionConversion\\": \\"1074.53\\",\\n    \\"LastYearConsumptionConversionSum\\": \\"2844.58\\",\\n    \\"LatestDataTime\\": \\"2023-06-01 00:00:00\\",\\n    \\"TotalCarbonConsumptionConversion\\": \\"1621.06\\",\\n    \\"CarConsumptionConversion\\": \\"10\\",\\n    \\"AircraftConsumptionConversion\\": \\"5.2\\",\\n    \\"TreeConsumptionConversion\\": \\"90.8\\"\\n  }\\n}","type":"json"}]',
            'title' => 'GetSummaryData',
        ],
        'QueryCarbonTrack' => [
            'summary' => 'Queries the carbon footprint of a cloud service.',
            'methods' => [
                'get',
                'post',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [],
            'parameters' => [
                [
                    'name' => 'StartTime',
                    'in' => 'query',
                    'schema' => [
                        'title' => 'startTime',
                        'description' => 'The beginning of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. Example: 2023-01-01 00:00:00.'."\n",
                        'type' => 'string',
                        'required' => false,
                        'example' => '2023-01-01 00:00:00'."\n"
                            ."\n",
                    ],
                ],
                [
                    'name' => 'EndTime',
                    'in' => 'query',
                    'schema' => [
                        'title' => 'endTime',
                        'description' => 'The end of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. Example: 2023-02-01 23:59:59.'."\n",
                        'type' => 'string',
                        'required' => false,
                        'example' => '2023-02-01 23:59:59',
                    ],
                ],
                [
                    'name' => 'Group',
                    'in' => 'query',
                    'schema' => [
                        'description' => 'The statistical dimension. A value of productCode specifies that statistics are collected based on cloud service. A value of region specifies that statistics are collected based on region. A value of subUid specifies that statistics are collected based on Resource Access Management (RAM) user. If you do not specify this parameter, statistics are collected based on Alibaba Cloud account.'."\n",
                        'type' => 'string',
                        'required' => false,
                        'example' => 'productCode',
                    ],
                ],
                [
                    'name' => 'Uids',
                    'in' => 'query',
                    'style' => 'json',
                    'schema' => [
                        'type' => 'array',
                        'items' => [
                            'type' => 'string',
                            'required' => false,
                            'description' => 'Alibaba Cloud account ID',
                            'example' => '5993670749781117',
                        ],
                        'required' => false,
                        'description' => 'The list of Alibaba Cloud account IDs whose data needs to be queried.(used after enabling multi-account management).',
                    ],
                ],
                [
                    'name' => 'FilterRDAccount',
                    'in' => 'query',
                    'schema' => [
                        'type' => 'integer',
                        'format' => 'int32',
                        'required' => false,
                        'description' => 'Whether to count the carbon emission details of multiple accounts. You can pass it in after opening the multi-account management. The default value and 0 is No and 1 is Yes.',
                        'example' => '0',
                    ],
                ],
                [
                    'name' => 'TopNum',
                    'in' => 'query',
                    'schema' => [
                        'type' => 'integer',
                        'format' => 'int32',
                        'required' => false,
                        'description' => 'After sorting in reverse order according to the data value of the return value, only the first TopNum data will be returned. If no data is passed, all data will be returned by default.',
                        'example' => '10',
                    ],
                ],
                [
                    'name' => 'UseCode',
                    'in' => 'query',
                    'schema' => [
                        'type' => 'integer',
                        'format' => 'int32',
                        'required' => false,
                        'example' => '1',
                        'description' => 'Whether the return result uses code as the identifier(0 meas not used and 1 means used). If not passed, the default code is used.'."\n"
                            ."\n"
                            .'For example, when the return result is to summarize carbon emissions according to the cloud product dimension, the identifier of ECS is "ecs" when 0 is passed, and "Elastic Compute Service" when 1 is passed.',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'result',
                        'description' => 'The return result.'."\n",
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'description' => 'The request ID.'."\n",
                                'type' => 'string',
                                'example' => 'B9AA726D-92A2-5F37-8D42-6C0AA3C67C0F',
                            ],
                            'Data' => [
                                'description' => 'The data records.'."\n",
                                'type' => 'array',
                                'items' => [
                                    'description' => '',
                                    'type' => 'object',
                                    'properties' => [
                                        'Uid' => [
                                            'description' => 'The ID of the Alibaba Cloud account.'."\n",
                                            'type' => 'string',
                                            'example' => '1665635164411336',
                                        ],
                                        'SubUid' => [
                                            'description' => 'The ID of the RAM user.'."\n",
                                            'type' => 'string',
                                            'example' => '251538859557084260',
                                        ],
                                        'ProductCode' => [
                                            'description' => 'The service code.'."\n",
                                            'type' => 'string',
                                            'example' => 'ecs',
                                        ],
                                        'Region' => [
                                            'description' => 'The region in which the cloud service resides.'."\n",
                                            'type' => 'string',
                                            'example' => 'cn-beijing',
                                        ],
                                        'QuotaValue' => [
                                            'description' => 'The carbon emissions within the specified time range, in kgCO₂e.'."\n",
                                            'type' => 'number',
                                            'format' => 'double',
                                            'example' => '1.23',
                                        ],
                                        'StatisticsDate' => [
                                            'description' => 'The date when the statistics are collected, which is a timestamp in milliseconds.'."\n",
                                            'type' => 'integer',
                                            'format' => 'int64',
                                            'example' => '1672502400000',
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"RequestId\\": \\"B9AA726D-92A2-5F37-8D42-6C0AA3C67C0F\\",\\n  \\"Data\\": [\\n    {\\n      \\"Uid\\": \\"1665635164411336\\",\\n      \\"SubUid\\": \\"251538859557084260\\",\\n      \\"ProductCode\\": \\"ecs\\",\\n      \\"Region\\": \\"cn-beijing\\",\\n      \\"QuotaValue\\": 1.23,\\n      \\"StatisticsDate\\": 1672502400000\\n    }\\n  ]\\n}","type":"json"}]',
            'title' => 'QueryCarbonTrack',
        ],
        'Verify' => [
            'summary' => 'Verifies whether Alibaba Cloud accounts have the required permissions.',
            'methods' => [
                'post',
                'get',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'free',
                'abilityTreeNodes' => [
                    'FEATUREenergyexpertY0LRFK',
                ],
                'tenantRelevance' => 'publicInformation',
            ],
            'parameters' => [],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Schema of Response',
                        'description' => 'The response parameters.'."\n",
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'description' => 'The request ID.'."\n",
                                'type' => 'string',
                                'example' => '49857457-0425-545D-A7A2-9632B43BE2CE',
                            ],
                            'Data' => [
                                'description' => 'The data records.'."\n",
                                'type' => 'object',
                                'properties' => [
                                    'code' => [
                                        'description' => 'The error code.'."\n",
                                        'type' => 'string',
                                        'example' => '200',
                                    ],
                                    'message' => [
                                        'description' => 'The error message.'."\n",
                                        'type' => 'string',
                                        'example' => 'success',
                                    ],
                                    'AllowedUids' => [
                                        'description' => 'The IDs of the returned Alibaba Cloud accounts that have the required permissions.'."\n",
                                        'type' => 'array',
                                        'items' => [
                                            'description' => 'The ID of the Alibaba Cloud account that has the required permissions.'."\n",
                                            'type' => 'string',
                                            'example' => '1665635164411336',
                                        ],
                                    ],
                                    'accountType' => [
                                        'description' => 'Resource directory account type. 0: not connected, 1: RD member account, 2: RD delegated administrator, 3: RD master administrator',
                                        'type' => 'integer',
                                        'format' => 'int32',
                                        'example' => '0',
                                    ],
                                    'multiAccountsAllow' => [
                                        'description' => 'Whether multi-account management is enabled for the current Alibaba Cloud account. 0:no, 1:yes',
                                        'type' => 'integer',
                                        'format' => 'int32',
                                        'example' => '0',
                                    ],
                                    'allMultiAccountUids' => [
                                        'description' => 'A list of all Alibaba Cloud accounts in the resource directory that you have permission to view (returned only when multi-account management is enabled).',
                                        'type' => 'array',
                                        'items' => [
                                            'type' => 'object',
                                            'properties' => [
                                                'accountId' => [
                                                    'description' => 'The ID of Alibaba Cloud account.',
                                                    'type' => 'string',
                                                    'example' => '1673123142778211',
                                                ],
                                                'displayName' => [
                                                    'description' => 'The username of Alibaba Cloud account.',
                                                    'type' => 'string',
                                                    'example' => 'test_account',
                                                ],
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"RequestId\\": \\"49857457-0425-545D-A7A2-9632B43BE2CE\\",\\n  \\"Data\\": {\\n    \\"code\\": \\"200\\",\\n    \\"message\\": \\"success\\",\\n    \\"AllowedUids\\": [\\n      \\"1665635164411336\\"\\n    ],\\n    \\"accountType\\": 0,\\n    \\"multiAccountsAllow\\": 0,\\n    \\"allMultiAccountUids\\": [\\n      {\\n        \\"accountId\\": \\"1673123142778211\\",\\n        \\"displayName\\": \\"test_account\\"\\n      }\\n    ]\\n  }\\n}","type":"json"}]',
            'title' => 'Verify',
        ],
        'QueryMultiAccountCarbonTrack' => [
            'summary' => '获取多账号碳足迹明细数据',
            'methods' => [
                'get',
            ],
            'schemes' => [
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
            ],
            'parameters' => [
                [
                    'name' => 'StartTime',
                    'in' => 'query',
                    'schema' => [
                        'description' => '',
                        'type' => 'string',
                        'required' => false,
                        'example' => '2023-01',
                    ],
                ],
                [
                    'name' => 'EndTime',
                    'in' => 'query',
                    'schema' => [
                        'description' => '',
                        'type' => 'string',
                        'required' => false,
                        'example' => '2023-10',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Schema of Response',
                        'description' => 'Schema of Response',
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'title' => 'Id of the request',
                                'description' => 'Id of the request',
                                'type' => 'string',
                                'example' => '49857457-0425-545D-A7A2-9632B43BE2CE',
                            ],
                            'Data' => [
                                'description' => '',
                                'type' => 'array',
                                'items' => [
                                    'description' => '',
                                    'type' => 'object',
                                    'properties' => [
                                        'Month' => [
                                            'description' => '',
                                            'type' => 'string',
                                            'example' => '2023-01',
                                        ],
                                        'Uid' => [
                                            'description' => '',
                                            'type' => 'string',
                                            'example' => '1665635164411336',
                                        ],
                                        'ProductCode' => [
                                            'description' => '',
                                            'type' => 'string',
                                            'example' => 'ecs',
                                        ],
                                        'Region' => [
                                            'description' => '',
                                            'type' => 'string',
                                            'example' => 'cn-beijing',
                                        ],
                                        'CarbonActualEmission' => [
                                            'description' => '',
                                            'type' => 'string',
                                            'example' => '0.0650967',
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'staticInfo' => [
                'returnType' => 'synchronous',
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"RequestId\\": \\"49857457-0425-545D-A7A2-9632B43BE2CE\\",\\n  \\"Data\\": [\\n    {\\n      \\"Month\\": \\"2023-01\\",\\n      \\"Uid\\": \\"1665635164411336\\",\\n      \\"ProductCode\\": \\"ecs\\",\\n      \\"Region\\": \\"cn-beijing\\",\\n      \\"CarbonActualEmission\\": \\"0.0650967\\"\\n    }\\n  ]\\n}","type":"json"}]',
        ],
    ],
    'endpoints' => [
        [
            'regionId' => 'cn-hangzhou',
            'endpoint' => 'carbonfootprint.aliyuncs.com',
        ],
    ],
];