Site Blocking API (1.0.0)

Download OpenAPI specification:Download

API for managing site blocking, ISPs, abuse reports, and site suggestions

API Docs

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List all sites

query Parameters
category
string

Filter sites by category, separated by commas

limit
integer
Default: 50

Number of sites to return

offset
integer
Default: 0

Number of sites to skip

sort
string
Default: "id"

Sort sites by field

order
string
Default: "asc"
Enum: "asc" "desc"

Sort order

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://inetc.kat.directory/sites',
  qs: {
    category: 'SOME_STRING_VALUE',
    limit: 'SOME_INTEGER_VALUE',
    offset: 'SOME_INTEGER_VALUE',
    sort: 'SOME_STRING_VALUE',
    order: 'SOME_STRING_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Create a new site

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
domain
required
string
ping_url
string
categories
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "domain": "string",
  • "ping_url": "string",
  • "categories": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "domain": "string",
  • "ping_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a site by ID

path Parameters
id
required
integer

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/sites/%7Bid%7D'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": 0,
  • "domain": "string",
  • "ping_url": "string",
  • "categories": [
    ],
  • "block_reports": 0,
  • "unblock_reports": 0,
  • "last_reported_at": "2019-08-24T14:15:22Z",
  • "blocked_by_isps": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get an ISP by ID

path Parameters
id
required
integer

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/isps/%7Bid%7D'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": 0,
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "name": "string",
  • "blocks": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List all ISPs

query Parameters
limit
integer
Default: 50

Number of ISPs to return

offset
integer
Default: 0

Number of ISPs to skip

sort
string
Default: "id"

Sort ISPs by field

order
string
Default: "asc"
Enum: "asc" "desc"

Sort order

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://inetc.kat.directory/isps',
  qs: {
    limit: 'SOME_INTEGER_VALUE',
    offset: 'SOME_INTEGER_VALUE',
    sort: 'SOME_STRING_VALUE',
    order: 'SOME_STRING_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Create a new ISP

Request Body schema: application/json
required
latitude
required
number <float>
longitude
required
number <float>
name
required
string

Responses

Request samples

Content type
application/json
{
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "name": "string",
  • "block_reports": 0,
  • "unblock_reports": 0,
  • "last_reported_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List all blocks

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/blocks'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Create a new block

Request Body schema: application/json
required
site_id
required
integer
client_id
required
integer
isp_id
required
integer
is_blocked
required
boolean

Responses

Request samples

Content type
application/json
{
  • "site_id": 0,
  • "client_id": 0,
  • "isp_id": 0,
  • "is_blocked": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "site_id": 0,
  • "client_id": 0,
  • "isp_id": 0,
  • "last_reported_at": "2019-08-24T14:15:22Z",
  • "block_reports": 0,
  • "unblock_reports": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List all abuse reports

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/abuse-reports'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Create a new abuse report

Request Body schema: application/json
required
site_id
required
integer
reason
required
string

Responses

Request samples

Content type
application/json
{
  • "site_id": 0,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "site_id": 0,
  • "reason": "string",
  • "status": "pending",
  • "resolved_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List all site suggestions

query Parameters
category
string

Filter sites by category, separated by commas

limit
integer
Default: 50

Number of sites to return

offset
integer
Default: 0

Number of sites to skip

sort
string
Default: "id"

Sort sites by field

order
string
Default: "asc"
Enum: "asc" "desc"

Sort order

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://inetc.kat.directory/sites/suggestions',
  qs: {
    category: 'SOME_STRING_VALUE',
    limit: 'SOME_INTEGER_VALUE',
    offset: 'SOME_INTEGER_VALUE',
    sort: 'SOME_STRING_VALUE',
    order: 'SOME_STRING_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Create a new site suggestion

Request Body schema: application/json
required
domain
required
string
ping_url
string
categories
Array of strings
reason
required
string

Responses

Request samples

Content type
application/json
{
  • "domain": "string",
  • "ping_url": "string",
  • "categories": [
    ],
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "domain": "string",
  • "ping_url": "string",
  • "categories": [
    ],
  • "reason": "string",
  • "status": "pending",
  • "resolve_reason": "string",
  • "linked_site": 0,
  • "resolved_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a site suggestion by ID

path Parameters
id
required
integer

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/sites/suggestions/%7Bid%7D'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": 0,
  • "domain": "string",
  • "ping_url": "string",
  • "categories": [
    ],
  • "reason": "string",
  • "status": "pending",
  • "resolve_reason": "string",
  • "linked_site": 0,
  • "resolved_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Resolve a site suggestion

Authorizations:
ApiKeyAuth
path Parameters
id
required
integer
Request Body schema: application/json
required
domain
string
ping_url
string
categories
Array of strings
resolve_reason
required
string
linked_site
integer
status
required
string
Enum: "pending" "accepted" "rejected"

Responses

Request samples

Content type
application/json
{
  • "domain": "string",
  • "ping_url": "string",
  • "categories": [
    ],
  • "resolve_reason": "string",
  • "linked_site": 0,
  • "status": "pending"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "domain": "string",
  • "ping_url": "string",
  • "categories": [
    ],
  • "reason": "string",
  • "status": "pending",
  • "resolve_reason": "string",
  • "linked_site": 0,
  • "resolved_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List all categories

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/categories'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Create a new category

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Health check

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://inetc.kat.directory/health'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
"ok"