Module:Sensitive IP addresses/API/doc: Difference between revisions

Content deleted Content added
add error example
reorganise example output lines
Line 131:
["matches"] = {
{
["entity-idtype"] = "ussenateip",
["ip"] = "156.33.5.76",
["ip-version"] = "IPv4",
["matches-range"] = "156.33.0.0/16",
["typeentity-id"] = "ipussenate",
},
},
["matched-ranges"] = {
["156.33.0.0/16"] = {
["entity-id"] = "ussenate",
["ip-version"] = "IPv4",
["range"] = "156.33.0.0/16",
["ip-version"] = "IPv4",
["entity-id"] = "ussenate",
},
},
["entities"] = {
["ussenate"] = {
["id":] = "ussenate",
["name"] = "United States Senate",
["description"] = "[[United States Senate]]",
["idreason"] = "ussenatepolitical",
["ipv4Ranges"] = {
"156.33.0.0/16",
Line 155 ⟶ 157:
"2620:0:8a0::/48",
"2600:803:618::/48",
},
["name"] = "United States Senate",
["reason"] = "political",
},
},
Line 184:
"matches":[
{
"matches-range": "156.33.0.0/16",
"ip-version": "IPv4",
"entity-id": "ussenate",
"type": "ip",
"ip": "156.33.5.76",
"ip-version": "IPv4",
"matches-range": "156.33.0.0/16",
"entity-id": "ussenate",
}
],
"matched-ranges": {
"156.33.0.0/16": {
"range": "156.33.0.0/16",
"ip-version": "IPv4",
"entity-id": "ussenate",
"range": "156.33.0.0/16"
}
},
"entities": {
"ussenate": {
"reasonid": "politicalussenate",
"name": "United States Senate",
"description": "[[United States Senate]]",
[ "reason"] =: "political",
"ipv6Ranges": [
"2620:0:8a0::/48",
"2600:803:618::/48"
],
"name": "United States Senate",
"id": "ussenate",
"ipv4Ranges": [
"156.33.0.0/16"
],
"description": "[[United States Senate]]",
"reason": "political"
}
},
Line 235:
"entities": {
"usdoj": {
"reasonid": "politicalusdoj",
"name": "United States Department of Justice",
"description": "[[United States Department of Justice]]",
"idreason": "usdojpolitical",
"ipv4Ranges": [
"149.101.0.0/16"
],
"name": "United States Department of Justice",
"reason": "political"
},
"usdhs": {
"reasonid": "politicalusdhs",
"name": "United States Department of Homeland Security",
"description": "[[United States Department of Homeland Security]]",
"idreason": "usdhspolitical",
"ipv4Ranges": [
"65.165.132.0/24",
"204.248.24.0/24",
"216.81.80.0/20"
],
"name": "United States Department of Homeland Security",
"reason": "political"
}
},
Line 276:
{
["error"] = {
["*"] = "See https://en.wikipedia.org/wiki/Module:Sensitive_IP_addresses/API for API usage",
["code"] = "sipa-invalid-test-string",
["info"] = "test string #1 'foo' was not a valid IP address or CIDR string"
["*"] = "See https://en.wikipedia.org/wiki/Module:Sensitive_IP_addresses/API for API usage",
}
}