-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalls.http
80 lines (63 loc) · 1.45 KB
/
calls.http
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
# SPDX-FileCopyrightText: NOI Techpark <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# works with REST Client for VSCodium/VSCode
# https://open-vsx.org/extension/humao/rest-client
@host={{$dotenv A22_URL}}
@username={{$dotenv A22_USERNAME}}
@password={{$dotenv A22_PASSWORD}}
### CREATE ACCESS TOKEN
# @name auth
POST {{host}}/token
User-Agent: IDM/traffic_a22
Accept: */*
Content-Type: application/json
{
"request":
{
"username":"{{username}}",
"password": "{{password}}"
}
}
###
@token = {{auth.response.body.SubscribeResult.sessionId}}
### DELETE ACCESS TOKEN
# @name deauth
DELETE {{host}}/token/{{token}}
User-Agent: IDM/traffic_a22
Accept: */*
Content-Type: application/json
### /traffico/anagrafica
POST {{host}}/traffico/anagrafica
User-Agent: IDM/traffic_a22
Accept: */*
Content-Type: application/json
{
"sessionId": "{{token}}"
}
### /traffico/nazionalita
POST {{host}}/traffico/nazionalita
User-Agent: IDM/traffic_a22
Accept: */*
Content-Type: application/json
{
"sessionId": "{{token}}"
}
### /traffico/transiti
# idspira from previous call
@idspira = 6156
@fromData = 1730727390
@toData = 1730737390
POST {{host}}/traffico/transiti
User-Agent: IDM/traffic_a22
Accept: */*
Content-Type: application/json
{
"request":
{
"sessionId": "{{token}}",
"idspira": {{idspira}},
"fromData" : "/Date({{fromData}}000+0200)/",
"toData" : "/Date({{toData}}999+0200)/"
}
}