{
  "opencollection": "1.0.0",
  "info": {
    "name": "PeerTube Abuses Server Blocklist API",
    "version": "8.1.0"
  },
  "items": [
    {
      "info": {
        "name": "Server Blocklist",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get block status of accounts/hosts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://peertube2.cpy.re/api/v1/blocklist/status",
            "params": [
              {
                "name": "accounts",
                "value": "goofy@example.com,donald@example.com",
                "type": "query",
                "description": "Check if these accounts are blocked"
              },
              {
                "name": "hosts",
                "value": "example.com",
                "type": "query",
                "description": "Check if these hosts are blocked"
              }
            ]
          },
          "docs": "Get block status of accounts/hosts"
        },
        {
          "info": {
            "name": "List blocked accounts by server",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://peertube2.cpy.re/api/v1/server/blocklist/accounts",
            "params": [
              {
                "name": "start",
                "value": "",
                "type": "query",
                "description": "Offset used to paginate results"
              },
              {
                "name": "count",
                "value": "",
                "type": "query",
                "description": "Number of items to return"
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Sort column"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "resource_owner_password_credentials",
              "accessTokenUrl": "/api/v1/users/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "List blocked accounts by server"
        },
        {
          "info": {
            "name": "Block an account by server",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://peertube2.cpy.re/api/v1/server/blocklist/accounts",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "resource_owner_password_credentials",
              "accessTokenUrl": "/api/v1/users/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Block an account by server"
        },
        {
          "info": {
            "name": "Unblock an account by server",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://peertube2.cpy.re/api/v1/server/blocklist/accounts/:accountName",
            "params": [
              {
                "name": "accountName",
                "value": "",
                "type": "path",
                "description": "account to unblock, in the form `username@domain`"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "resource_owner_password_credentials",
              "accessTokenUrl": "/api/v1/users/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Unblock an account by server"
        },
        {
          "info": {
            "name": "List blocked servers by server",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://peertube2.cpy.re/api/v1/server/blocklist/servers",
            "params": [
              {
                "name": "start",
                "value": "",
                "type": "query",
                "description": "Offset used to paginate results"
              },
              {
                "name": "count",
                "value": "",
                "type": "query",
                "description": "Number of items to return"
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Sort column"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "resource_owner_password_credentials",
              "accessTokenUrl": "/api/v1/users/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "List blocked servers by server"
        },
        {
          "info": {
            "name": "Block a server by server",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://peertube2.cpy.re/api/v1/server/blocklist/servers",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "resource_owner_password_credentials",
              "accessTokenUrl": "/api/v1/users/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Block a server by server"
        },
        {
          "info": {
            "name": "Unblock a server by server",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://peertube2.cpy.re/api/v1/server/blocklist/servers/:host",
            "params": [
              {
                "name": "host",
                "value": "",
                "type": "path",
                "description": "server domain to unblock"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "resource_owner_password_credentials",
              "accessTokenUrl": "/api/v1/users/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Unblock a server by server"
        }
      ]
    }
  ],
  "bundled": true
}