{"_id":"591a822885b2570f00e43325","project":"56008ba98c0c9d0d00dcaeb0","category":{"_id":"591e4c277f22100f00031521","project":"56008ba98c0c9d0d00dcaeb0","__v":0,"version":"5719767ec863120e0012a042","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-05-19T01:36:39.888Z","from_sync":false,"order":4,"slug":"rules","title":"Rules"},"parentDoc":null,"user":"564a46904fa1460d00780c0d","version":{"_id":"5719767ec863120e0012a042","hasDoc":true,"project":"56008ba98c0c9d0d00dcaeb0","__v":7,"hasReference":true,"createdAt":"2016-04-22T00:55:26.295Z","releaseDate":"2016-04-22T00:55:26.295Z","categories":["5719767ec863120e0012a043","5719767ec863120e0012a044","5719767ec863120e0012a045","5719767ec863120e0012a046","5719767ec863120e0012a047","5719767ec863120e0012a048","5719767ec863120e0012a049","57f45a18da14e71700d12e4a","582b71b15403840f008c0410","58c060cf3eee111b00a8b210","591e4c277f22100f00031521","591e4c3d094c5b0f006769fe","591e4c461e0dc20f0047b58b"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-05-16T04:38:00.510Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -XGET 'https://api.thisdata.com/v1/rules/234677874491720987?api_key=API_KEY' \n","language":"text","name":"curl"}]},"method":"get","results":{"codes":[{"name":"","code":"{\n  \"id\": \"816677874491720987\",\n  \"name\": \"IP Blacklist for Guests\",\n  \"description\": \"Blacklist for guest account users\",\n  \"type\": \"blacklist\",\n  \"target\": \"location.ip\",\n  \"source\": \"guest-123\",\n  \"filters\": \"123.123.123.123\"\n}\n","language":"json","status":200},{"name":"","code":"","language":"json","status":400},{"code":"","status":401,"language":"text"}]},"settings":"","auth":"required","params":[{"_id":"591a7fc4064b8319004caae9","ref":"","in":"query","required":false,"desc":"Your ThisData API key","default":"","type":"string","name":"api_key"},{"_id":"591a822885b2570f00e43326","ref":"","in":"path","required":false,"desc":"The Rule ID that you want to fetch","default":"","type":"int","name":"id"}],"url":"/v1/rules/:id"},"isReference":true,"order":2,"body":"### Authentication\n\nYour API Key must be provided in the URL's query string. [Learn more about Authentication & your API Key](doc:authentication-api-key).\n\n### Response Messages\n\n* 200 - Success. Returns a Rule object as JSON\n* 400 - Invalid query string\n* 401 - Invalid API Key\n* 404 - The rule does not exist","excerpt":"Returns the definition of single rule","slug":"v1rulesid","type":"endpoint","title":"Get a rule"}

getGet a rule

Returns the definition of single rule

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
integer
The Rule ID that you want to fetch

Query Params

api_key:
string
Your ThisData API key

Examples


Result Format


Documentation

### Authentication Your API Key must be provided in the URL's query string. [Learn more about Authentication & your API Key](doc:authentication-api-key). ### Response Messages * 200 - Success. Returns a Rule object as JSON * 400 - Invalid query string * 401 - Invalid API Key * 404 - The rule does not exist