# Botnet Feed # ASN ## Get daily report `client.botnetFeed.asn.dayReport(numberasnId, ASNDayReportParamsparams, RequestOptionsoptions?): ASNDayReportResponse` **get** `/accounts/{account_id}/botnet_feed/asn/{asn_id}/day_report` Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day. ### Parameters - `asnId: number` - `params: ASNDayReportParams` - `account_id: string` Path param: Identifier. - `date?: string` Query param ### Returns - `ASNDayReportResponse` - `cidr?: string` - `date?: string` - `offense_count?: number` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.botnetFeed.asn.dayReport(0, { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.cidr); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "cidr": "1.1.1.1/32", "date": "2014-01-01T05:20:00.12345Z", "offense_count": 1000 } } ``` ## Get full report `client.botnetFeed.asn.fullReport(numberasnId, ASNFullReportParamsparams, RequestOptionsoptions?): ASNFullReportResponse` **get** `/accounts/{account_id}/botnet_feed/asn/{asn_id}/full_report` Gets all the data the botnet threat feed tracking database has for a given ASN registered to user account. ### Parameters - `asnId: number` - `params: ASNFullReportParams` - `account_id: string` Identifier. ### Returns - `ASNFullReportResponse` - `cidr?: string` - `date?: string` - `offense_count?: number` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.botnetFeed.asn.fullReport(0, { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.cidr); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "cidr": "1.1.1.1/32", "date": "2014-01-01T05:20:00.12345Z", "offense_count": 1000 } } ``` ## Domain Types ### ASN Day Report Response - `ASNDayReportResponse` - `cidr?: string` - `date?: string` - `offense_count?: number` ### ASN Full Report Response - `ASNFullReportResponse` - `cidr?: string` - `date?: string` - `offense_count?: number` # Configs # ASN ## Get list of ASNs `client.botnetFeed.configs.asn.get(ASNGetParamsparams, RequestOptionsoptions?): ASNGetResponse` **get** `/accounts/{account_id}/botnet_feed/configs/asn` Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API. ### Parameters - `params: ASNGetParams` - `account_id: string` Identifier. ### Returns - `ASNGetResponse` - `asn?: number` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const asn = await client.botnetFeed.configs.asn.get({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(asn.asn); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "asn": 13335 } } ``` ## Delete an ASN `client.botnetFeed.configs.asn.delete(numberasnId, ASNDeleteParamsparams, RequestOptionsoptions?): ASNDeleteResponse` **delete** `/accounts/{account_id}/botnet_feed/configs/asn/{asn_id}` Delete an ASN from botnet threat feed for a given user. ### Parameters - `asnId: number` - `params: ASNDeleteParams` - `account_id: string` Identifier. ### Returns - `ASNDeleteResponse` - `asn?: number` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const asn = await client.botnetFeed.configs.asn.delete(0, { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(asn.asn); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "asn": 13335 } } ``` ## Domain Types ### ASN Get Response - `ASNGetResponse` - `asn?: number` ### ASN Delete Response - `ASNDeleteResponse` - `asn?: number`