forked from sendgrid/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathip_access_management.apiblueprint
More file actions
126 lines (88 loc) · 3.15 KB
/
Copy pathip_access_management.apiblueprint
File metadata and controls
126 lines (88 loc) · 3.15 KB
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
---
layout: page
weight: 0
title: IP Access Management
navigation:
show: true
---
FORMAT: 1A
# IP Access Management
IP Access Management is a set of endpoints to control IP whitelisting.
# Group Activity
## Access History [/access_settings/activity?limit={limit}]
Resources related to IP access history. This will return a list of IPs that have accessed the user's account through the web or API.
+ Parameters
+ limit (optional, number, `20`) ... Number of IP activity entries to return. Defaults to 20.
### History Collection [GET]
+ Response 200 (application/json)
+ Body
{
"result": [
{
"allowed": false,
"auth_method": "basic",
"first_at": 1444087966,
"ip": "1.1.1.1",
"last_at": 1444406672,
"location": "Australia"
}, {
"allowed": false,
"auth_method": "basic",
"first_at": 1444087505,
"ip": "1.2.3.48",
"last_at": 1444087505,
"location": "Mukilteo, Washington"
}
]
}
# Group Rules
## IP Whitelist [/access_settings/whitelist]
Resources related to IP whitelisting. IP whitelisting allows users to specify IPs that can access the user's account through the web, API, or mail send.
### Get Whitelisted IPs [GET]
+ Response 200 (application/json)
+ Body
{
"result": [
{"id": 1, "ip": "192.168.1.1/32", "created_at": 1441824715, "updated_at": 1441824715},
{"id": 2, "ip": "192.168.1.2/32", "created_at": 1441824715, "updated_at": 1441824715},
{"id": 3, "ip": "192.168.1.3/32", "created_at": 1441824715, "updated_at": 1441824715}
]
}
### Add Whitelisted IPs [POST]
+ Request (application/json)
+ Body
{
"ips": [
{"ip": "192.168.1.1"},
{"ip": "192.*.*.*"},
{"ip": "192.168.1.3/32"}
]
}
+ Response 201 (application/json)
+ Body
{
"result": [
{"id": 1, "ip": "192.168.1.1/32", "created_at": 1441824715, "updated_at": 1441824715},
{"id": 2, "ip": "192.0.0.0/8", "created_at": 1441824715, "updated_at": 1441824715},
{"id": 3, "ip": "192.168.1.3/32", "created_at": 1441824715, "updated_at": 1441824715}
]
}
### Delete Whitelisted IPs [DELETE]
+ Request (application/json)
+ Body
{
"ids": [1, 2, 3]
}
+ Response 204
## IP Whitelist Entry [/access_settings/whitelist/{rule_id}]
### Get Whitelisted IP [GET]
+ Response 200 (application/json)
+ Body
{
"id": 1,
"ip": "192.168.1.1",
"created_at": 1441824715,
"updated_at": 1441824715
}
### Delete Whitelisted IP [DELETE]
+ Response 204 (application/json)