-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCopernicus API.postman_collection.json
156 lines (156 loc) · 3.56 KB
/
Copernicus API.postman_collection.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
{
"info": {
"name": "Copernicus API",
"_postman_id": "42c50bfc-8e4c-c1cb-628c-9ce9c6c35f81",
"description": "Wrapper tha retrieves data from the copernicus (ECMWF) data.\n\nSee [Github](https://github.com/FWidm/CopernicusAPI)",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Hello Api",
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "http://{{host}}:{{port}}/",
"protocol": "http",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
""
]
},
"description": ""
},
"response": []
},
{
"name": "Retrieve File",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"",
"postman.setEnvironmentVariable(\"file_name\", jsonData.file_name);",
"",
"",
"tests[\"name=\"+jsonData.file_name] = responseCode.code === 200;"
]
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "http://{{host}}:{{port}}/retrieve?timestamp={{date_timestamp}}",
"protocol": "http",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"retrieve"
],
"query": [
{
"key": "timestamp",
"value": "{{date_timestamp}}",
"equals": true
}
]
},
"description": "Attributes:\n- `timestamp`: Y-m-d format\n\nResponses:\n- 200: {message & data.file_name} - if a file is not available currently, a download is triggered & the user informed\n- 400: happens when the date_timestamp cannot be parsed\n- 404: file is not available for downloading - also contains the latest retrieval date"
},
"response": []
},
{
"name": "List available files",
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "http://{{host}}:{{port}}/files",
"protocol": "http",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"files"
]
},
"description": "Responses:\n- 200: {data: array of file names, message}"
},
"response": []
},
{
"name": "Parse File by Date for Data",
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "http://{{host}}:{{port}}/parse?timestamp={{timestamp}}&lat={{lat}}&lon={{lon}}",
"protocol": "http",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"parse"
],
"query": [
{
"key": "timestamp",
"value": "{{timestamp}}",
"equals": true
},
{
"key": "lat",
"value": "{{lat}}",
"equals": true
},
{
"key": "lon",
"value": "{{lon}}",
"equals": true
}
]
},
"description": "Attributes:\n- timestamp: ISO format\n- lat: decimal\n- lon: decimal\n\nResponses:\n- 200: all available parameters near the given timestamp. {'type_key':array}\n- 404: File is not available, lists available files - timestamps relate to the filenames (e.g. if you need data for 2017-11-10 - the file is named an-2017-11-10.grib\")"
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "a14a3864-2b70-46fc-b260-4721f34cc0e5",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "7ef54916-1ca3-4d25-a16e-1625fe28d9bc",
"type": "text/javascript",
"exec": [
""
]
}
}
]
}