forked from RealImage/challenge2016
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-documentation.txt
56 lines (53 loc) · 1.4 KB
/
api-documentation.txt
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
// Api for authorizing distributor
curl --location --request POST 'http: //localhost:8080/authdistributor' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "distributor-1",
"includedregions": [
{
"country": "india",
"state": "andhrapradesh",
"city": "eluru"
},
{
"country": "india",
"state": "tamilnadu"
},
{
"country": "unitedstates"
}
],
"excludedregions": [
{
"country": "india",
"state": "karnataka"
},
{
"country": "india",
"state": "tamilnadu",
"city": "chennai"
}
]
}'
// Api for checking distributor access to given region
curl --location --request GET 'http: //localhost:8080/distributors/distributor-2/access?country=India&state=Tamil Nadu&city=Chennai'
// Api for authorizing sub-distributor
curl --location --request POST 'http: //localhost:8080/authsubdistributor' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "distributor-2",
"parentname": "distributor-2",
"includedregions": [
{
"country": "India",
"state": "Tamil Nadu",
"city": "Keelakarai"
}
],
"excludedregions" : [
{
"country" : "united states",
"state" : "Arkansas"
}
]
}'