More information about filters can be found in the [filters](12-icinga2-api.md#icinga2-api-filters) chapter.
-Note that the permissions a API user has also specify the max body size of their requests.
-A API user with `*` permissions is allowed to send 512 MB.
-
+Permissions are tied to a maximum HTTP request size to prevent abuse, responses sent by Icinga are not limited.
+An API user with all permissions ("\*") may send up to 512 MB regardless of the endpoint.
Available permissions for specific URL endpoints:
- Permissions | URL Endpoint | Supports Filters | Max Body Size in MB
+ Permissions | URL Endpoint | Supports filters | Max body size in MB
------------------------------|---------------|-------------------|---------------------
actions/<action> | /v1/actions | Yes | 1
config/query | /v1/config | No | 1
### Parameters <a id="icinga2-api-parameters"></a>
-Depending on the request method there are two ways of
-passing parameters to the request:
+Depending on the request method there are two ways of passing parameters to the request:
* JSON object as request body (all request methods other than `GET`)
* Query string as URL parameter (all request methods)
#endif /* _WIN32 */
#define TLS_TIMEOUT_SECONDS 10
-#define TLS_TIMEOUT_STEP_SECONDS 1
using namespace icinga;
m_State(HttpRequestStart)
{ }
-bool HttpRequest::ParseHeader(StreamReadContext& src, bool may_wait)
+bool HttpRequest::ParseHeaders(StreamReadContext& src, bool may_wait)
{
if (!m_Stream)
return false;
HttpRequest(const Stream::Ptr& stream);
- bool ParseHeader(StreamReadContext& src, bool may_wait);
+ bool ParseHeaders(StreamReadContext& src, bool may_wait);
bool ParseBody(StreamReadContext& src, bool may_wait);
size_t ReadBody(char *data, size_t count);
#include "remote/apifunction.hpp"
#include "remote/jsonrpc.hpp"
#include "base/base64.hpp"
+#include "base/convert.hpp"
#include "base/configtype.hpp"
+#include "base/exception.hpp"
+#include "base/logger.hpp"
#include "base/objectlock.hpp"
+#include "base/timer.hpp"
#include "base/utility.hpp"
-#include "base/logger.hpp"
-#include "base/exception.hpp"
-#include "base/convert.hpp"
#include <boost/thread/once.hpp>
using namespace icinga;
if (!m_CurrentRequest.CompleteHeaders) {
try {
- res = m_CurrentRequest.ParseHeader(m_Context, false);
+ res = m_CurrentRequest.ParseHeaders(m_Context, false);
} catch (const std::invalid_argument& ex) {
response.SetStatus(400, "Bad Request");
String msg = String("<h1>Bad Request</h1><p><pre>") + ex.what() + "</pre></p>";
#include "remote/httpresponse.hpp"
#include "remote/apiuser.hpp"
#include "base/tlsstream.hpp"
-#include "base/timer.hpp"
#include "base/workqueue.hpp"
namespace icinga