{
$Net::Graylog::API::VERSION
=
'0.7'
;
}
my
%SearchResponse
= (
built_query
=>
'string'
,
error
=> {
begin_column
=>
'integer'
,
begin_line
=>
'integer'
,
end_column
=>
'integer'
,
end_line
=>
'integer'
,
},
fields
=> [
type
=>
'string'
, ],
generic_error
=> {
exception_name
=>
'string'
,
message
=>
'string'
,
},
messages
=> [
properties
=> {
index
=>
'string'
,
message
=> {
additional_properties
=>
'any'
, },
},
],
query
=>
'string'
,
time
=>
'integer'
,
total_results
=>
'integer'
,
used_indices
=> [
type
=>
'string'
, ],
);
my
%ReaderPermissionResponse
= (
permissions
=> [
type
=>
'string'
, ], );
my
%LdapTestConfigResponse
= (
connected
=>
'boolean'
,
entry
=> {
additional_properties
=>
'string'
, },
exception
=>
'string'
,
login_authenticated
=>
'boolean'
,
system_authenticated
=>
'boolean'
,
);
my
%LdapTestConfigRequest
= (
active_directory
=>
'boolean'
,
ldap_uri
=>
'string'
,
password
=>
'string'
,
principal
=>
'string'
,
search_base
=>
'string'
,
search_pattern
=>
'string'
,
system_password
=>
'string'
,
system_username
=>
'string'
,
test_connect_only
=>
'boolean'
,
trust_all_certificates
=>
'boolean'
,
use_start_tls
=>
'boolean'
,
);
my
%SessionCreateRequest
= (
host
=>
'string'
,
password
=>
'string'
,
username
=>
'string'
,
);
my
%Session
= (
session_id
=>
'string'
,
valid_until
=>
'string'
,
);
my
%Token
= (
last_access
=>
'string'
,
name
=>
'string'
,
token
=>
'string'
,
);
my
%TokenList
= (
tokens
=> [
properties
=> {
last_access
=>
'string'
,
name
=>
'string'
,
token
=>
'string'
,
},
],
);
my
%_models
= (
SearchResponse
=> \
%SearchResponse
,
ReaderPermissionResponse
=> \
%ReaderPermissionResponse
,
LdapTestConfigResponse
=> \
%LdapTestConfigResponse
,
LdapTestConfigRequest
=> \
%LdapTestConfigRequest
,
SessionCreateRequest
=> \
%SessionCreateRequest
,
Session
=> \
%Session
,
Token
=> \
%Token
,
TokenList
=> \
%TokenList
,
);
has
url
=> (
is
=>
'ro'
,
required
=> 1 );
has
user
=> (
is
=>
'ro'
);
has
password
=> (
is
=>
'ro'
);
has
timeout
=> (
is
=>
'ro'
,
default
=>
sub
{ 0.01; } );
has
_furl
=> (
is
=>
'lazy'
,
default
=>
sub
{
my
$self
=
shift
;
return
Furl->new(
agent
=> __PACKAGE__,
headers
=> [
'Accept'
=>
'application/json'
,
'content-type'
=>
'application/json'
,
],
timeout
=>
$self
->timeout,
);
},
init_arg
=>
undef
,
);
sub
_validate_parameter {
my
(
$data
,
$info
) =
@_
;
my
$response
;
my
$type
=
lc
(
$info
->{type} ||
""
);
my
$format
=
lc
(
$info
->{
format
} ||
""
);
return
""
if
( !
$data
);
if
(
$info
->{
'$ref'
} ) {
die
"Not setup to handle object references yet"
;
}
if
(
$type
eq
'integer'
) {
if
(
$data
!~ /^[0-9]+$/ ) {
$response
=
'is not an integer'
;
}
elsif
(
$info
->{maximum} &&
$data
>
$info
->{maximum} ) {
$response
=
"is greater than allowed maximum ($info->{maximum}"
;
}
elsif
(
$info
->{minimum} &&
$data
<
$info
->{maximum} ) {
$response
=
"is less than allowed minimum ($info->{minimum}"
;
}
}
elsif
(
$type
eq
'number'
) {
if
(
$data
!~ /^[0-9]{1,}(\.[0-9]{1,})$/ ) {
$response
=
'is not a number'
;
}
elsif
(
$info
->{maximum} &&
$data
>
$info
->{maximum} ) {
$response
=
"is greater than allowed maximum ($info->{maximum}"
;
}
elsif
(
$info
->{minimum} &&
$data
<
$info
->{maximum} ) {
$response
=
"is less than allowed minimum ($info->{minimum}"
;
}
}
elsif
(
$type
eq
'string'
) {
if
(
$format
) {
if
(
$format
eq
'date'
) {
$response
=
'does not look like a date'
if
( m|^\d{2}[-\/]\d{2}[-\/]\d{2,4}$| || m|^\d{4}[-\/]\d{2}[-\/]\d{2}$| );
}
elsif
(
$format
eq
'date-time'
) {
$response
=
'does not look like a datetime'
if
(m|^\d{2,4}[-\/]\d{2}[-\/]\d{2}[ T]\d{2}:\d{2}:d{2}|);
}
}
}
elsif
(
$type
eq
'boolean'
) {
$response
=
"is not boolean"
if
(
$data
!~ /true|false|1|0|yes|
no
/i );
}
elsif
(
$_models
{
$type
} ) {
die
"Not handling models yet"
;
}
else
{
$response
=
"has unknown type - $info->{type}"
;
}
$response
=
"$info->{name} $response"
if
(
$response
);
return
$response
;
}
sub
_action_url {
my
$self
=
shift
;
my
(
$method
,
$url
,
$params
,
$content
) =
@_
;
$url
=
$self
->url .
$url
;
if
(
$self
->user ) {
my
$auth
=
$self
->user .
':'
.
$self
->password .
'@'
;
$url
=~ s|^(https?://)(.*)|$1
$auth
$2|;
}
if
(
keys
%{
$params
} ) {
$url
.=
'?'
;
foreach
my
$k
(
keys
%{
$params
} ) {
next
if
( !
$params
->{
$k
} );
$url
.= ( uri_escape(
$k
) .
'='
. uri_escape(
$params
->{
$k
} ) .
'&'
);
}
}
$url
=~ s/&$//;
say
STDERR
"url [$method] $url"
if
(
$ENV
{DEBUG} );
my
$headers
;
my
$res
=
$self
->_furl->request(
method
=>
uc
(
$method
),
url
=>
$url
,
headers
=>
$headers
,
content
=>
$content
);
if
(
$res
->is_success ) {
my
$json
= decode_json(
$res
->content );
$res
->{json} =
$json
;
}
return
$res
;
}
sub
alerts_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts"
;
my
$args
= {
streamId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"alerts_list is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to alerts_list ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in alerts_list for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
alerts_check_conditions {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts/check"
;
my
$args
= {
streamId
=> {
description
=>
"The ID of the stream to check."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"alerts_check_conditions is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to alerts_check_conditions ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in alerts_check_conditions for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
alerts_list_conditions {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts/conditions"
;
my
$args
= {
streamId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"alerts_list_conditions is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to alerts_list_conditions ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in alerts_list_conditions for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
alerts_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts/conditions"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
streamId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"alerts_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to alerts_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in alerts_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
delete_alerts_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts/conditions/$params{conditionId}"
;
my
$args
= {
conditionId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"conditionId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
streamId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"delete_alerts_list is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to delete_alerts_list ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in delete_alerts_list for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
alerts_add_receiver {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts/receivers"
;
my
$args
= {
entity
=> {
description
=>
"Name/ID of user or email address to add as alert receiver."
,
name
=>
"entity"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
streamId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
type
=> {
description
=>
"Type: users or emails"
,
name
=>
"type"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"alerts_add_receiver is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to alerts_add_receiver ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in alerts_add_receiver for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
alerts_remove_receiver {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts/receivers"
;
my
$args
= {
entity
=> {
description
=>
"Name/ID of user or email address to remove from alert receivers."
,
name
=>
"entity"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
streamId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
type
=> {
description
=>
"Type: users or emails"
,
name
=>
"type"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"alerts_remove_receiver is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to alerts_remove_receiver ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in alerts_remove_receiver for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
alerts_send_dummy_alert {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/alerts/sendDummyAlert"
;
my
$args
= {
streamId
=> {
description
=>
"The stream id this new alert condition belongs to."
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"alerts_send_dummy_alert is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to alerts_send_dummy_alert ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in alerts_send_dummy_alert for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
counts_total {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/count/total"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}"
;
my
$args
= {
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_get is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_get ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_get for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_delete {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}"
;
my
$args
= {
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_delete is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_delete ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_delete for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_update {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_update is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_update ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_update for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_set_positions {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}/positions"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_set_positions is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_set_positions ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_set_positions for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_add_widget {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}/widgets"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_add_widget is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_add_widget ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_add_widget for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_remove {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}/widgets/$params{widgetId}"
;
my
$args
= {
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
widgetId
=> {
description
=>
""
,
name
=>
"widgetId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_remove is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_remove ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_remove for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_update_cache_time {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}/widgets/$params{widgetId}/cachetime"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
widgetId
=> {
description
=>
""
,
name
=>
"widgetId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_update_cache_time is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_update_cache_time ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_update_cache_time for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_update_description {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}/widgets/$params{widgetId}/description"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
widgetId
=> {
description
=>
""
,
name
=>
"widgetId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_update_description is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_update_description ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_update_description for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
dashboards_widget_value {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/dashboards/$params{dashboardId}/widgets/$params{widgetId}/value"
;
my
$args
= {
dashboardId
=> {
description
=>
""
,
name
=>
"dashboardId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
widgetId
=> {
description
=>
""
,
name
=>
"widgetId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"dashboards_widget_value is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to dashboards_widget_value ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in dashboards_widget_value for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
documentation_overview {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/api-docs"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
documentation_route {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/api-docs/$params{route}"
;
my
$args
= {
route
=> {
description
=>
"Route to fetch. For example /system"
,
name
=>
"route"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"documentation_route is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to documentation_route ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in documentation_route for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
extractors_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}/extractors"
;
my
$args
= {
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"extractors_list is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to extractors_list ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in extractors_list for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
extractors_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}/extractors"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"extractors_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to extractors_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in extractors_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
extractors_terminate {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}/extractors/$params{extractorId}"
;
my
$args
= {
extractorId
=> {
description
=>
""
,
name
=>
"extractorId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"extractors_terminate is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to extractors_terminate ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in extractors_terminate for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_cluster_cluster_health {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/cluster/health"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_cluster_cluster_name {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/cluster/name"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_failures_single {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/failures"
;
my
$args
= {
limit
=> {
description
=>
"Limit"
,
name
=>
"limit"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
},
offset
=> {
description
=>
"Offset"
,
name
=>
"offset"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"indexer_failures_single is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to indexer_failures_single ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in indexer_failures_single for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_failures_count {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/failures/count"
;
my
$args
= {
since
=> {
description
=>
"ISO8601 date"
,
name
=>
"since"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"indexer_failures_count is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to indexer_failures_count ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in indexer_failures_count for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_indices_closed {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/indices/closed"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_indices_single {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/indices/$params{index}"
;
my
$args
= {
index
=> {
description
=>
""
,
name
=>
"index"
,
paramType
=>
"path"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"indexer_indices_single is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to indexer_indices_single ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in indexer_indices_single for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_indices_delete {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/indices/$params{index}"
;
my
$args
= {
index
=> {
description
=>
""
,
name
=>
"index"
,
paramType
=>
"path"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"indexer_indices_delete is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to indexer_indices_delete ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in indexer_indices_delete for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_indices_close {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/indices/$params{index}/close"
;
my
$args
= {
index
=> {
description
=>
""
,
name
=>
"index"
,
paramType
=>
"path"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"indexer_indices_close is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to indexer_indices_close ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in indexer_indices_close for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
indexer_indices_reopen {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indexer/indices/$params{index}/reopen"
;
my
$args
= {
index
=> {
description
=>
""
,
name
=>
"index"
,
paramType
=>
"path"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"indexer_indices_reopen is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to indexer_indices_reopen ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in indexer_indices_reopen for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
messages_analyze {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/messages/$params{index}/analyze"
;
my
$args
= {
index
=> {
description
=>
"The index the message containing the string is stored in."
,
name
=>
"index"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
string
=> {
description
=>
"The string to analyze."
,
name
=>
"string"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"messages_analyze is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to messages_analyze ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in messages_analyze for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
messages_search {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/messages/$params{index}/$params{messageId}"
;
my
$args
= {
index
=> {
description
=>
"The index this message is stored in."
,
name
=>
"index"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
messageId
=> {
description
=>
""
,
name
=>
"messageId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"messages_search is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to messages_search ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in messages_search for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_absolute_search_absolute {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/absolute"
;
my
$args
= {
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
from
=> {
description
=>
"Timerange start. See description for date format"
,
name
=>
"from"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
limit
=> {
description
=>
"Maximum number of messages to return."
,
name
=>
"limit"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
},
offset
=> {
description
=>
"Offset"
,
name
=>
"offset"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
sort
=> {
description
=>
"Sorting (field:asc / field:desc)"
,
name
=>
"sort"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
to
=> {
description
=>
"Timerange end. See description for date format"
,
name
=>
"to"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_absolute_search_absolute is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_absolute_search_absolute ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_absolute_search_absolute for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_absolute_field_histogram_absolute {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/absolute/fieldhistogram"
;
my
$args
= {
field
=> {
description
=>
"Field of whose values to get the histogram of"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
from
=> {
description
=>
"Timerange start. See search method description for date format"
,
name
=>
"from"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
interval
=> {
description
=>
"Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)"
,
name
=>
"interval"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
to
=> {
description
=>
"Timerange end. See search method description for date format"
,
name
=>
"to"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_absolute_field_histogram_absolute is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_absolute_field_histogram_absolute ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_absolute_field_histogram_absolute for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_absolute_histogram_absolute {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/absolute/histogram"
;
my
$args
= {
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
from
=> {
description
=>
"Timerange start. See search method description for date format"
,
name
=>
"from"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
interval
=> {
description
=>
"Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)"
,
name
=>
"interval"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
to
=> {
description
=>
"Timerange end. See search method description for date format"
,
name
=>
"to"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_absolute_histogram_absolute is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_absolute_histogram_absolute ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_absolute_histogram_absolute for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_absolute_stats_absolute {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/absolute/stats"
;
my
$args
= {
field
=> {
description
=>
"Message field of numeric type to return statistics for"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
from
=> {
description
=>
"Timerange start. See search method description for date format"
,
name
=>
"from"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
to
=> {
description
=>
"Timerange end. See search method description for date format"
,
name
=>
"to"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_absolute_stats_absolute is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_absolute_stats_absolute ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_absolute_stats_absolute for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_absolute_terms_absolute {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/absolute/terms"
;
my
$args
= {
field
=> {
description
=>
"Message field of to return terms of"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
from
=> {
description
=>
"Timerange start. See search method description for date format"
,
name
=>
"from"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
size
=> {
description
=>
"Maximum number of terms to return"
,
name
=>
"size"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
},
to
=> {
description
=>
"Timerange end. See search method description for date format"
,
name
=>
"to"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_absolute_terms_absolute is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_absolute_terms_absolute ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_absolute_terms_absolute for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_keyword_search_keyword {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/keyword"
;
my
$args
= {
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
keyword
=> {
description
=>
"Range keyword"
,
name
=>
"keyword"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
limit
=> {
description
=>
"Maximum number of messages to return."
,
name
=>
"limit"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
},
offset
=> {
description
=>
"Offset"
,
name
=>
"offset"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
sort
=> {
description
=>
"Sorting (field:asc / field:desc)"
,
name
=>
"sort"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_keyword_search_keyword is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_keyword_search_keyword ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_keyword_search_keyword for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_keyword_field_histogram_keyword {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/keyword/fieldhistogram"
;
my
$args
= {
field
=> {
description
=>
"Field of whose values to get the histogram of"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
interval
=> {
description
=>
"Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)"
,
name
=>
"interval"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
keyword
=> {
description
=>
"Range keyword"
,
name
=>
"keyword"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_keyword_field_histogram_keyword is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_keyword_field_histogram_keyword ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_keyword_field_histogram_keyword for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_keyword_histogram_keyword {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/keyword/histogram"
;
my
$args
= {
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
interval
=> {
description
=>
"Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)"
,
name
=>
"interval"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
keyword
=> {
description
=>
"Range keyword"
,
name
=>
"keyword"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_keyword_histogram_keyword is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_keyword_histogram_keyword ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_keyword_histogram_keyword for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_keyword_stats_keyword {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/keyword/stats"
;
my
$args
= {
field
=> {
description
=>
"Message field of numeric type to return statistics for"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
keyword
=> {
description
=>
"Range keyword"
,
name
=>
"keyword"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_keyword_stats_keyword is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_keyword_stats_keyword ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_keyword_stats_keyword for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_keyword_terms_keyword {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/keyword/terms"
;
my
$args
= {
field
=> {
description
=>
"Message field of to return terms of"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
keyword
=> {
description
=>
"Range keyword"
,
name
=>
"keyword"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
size
=> {
description
=>
"Maximum number of terms to return"
,
name
=>
"size"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_keyword_terms_keyword is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_keyword_terms_keyword ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_keyword_terms_keyword for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_relative_search_relative {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/relative"
;
my
$args
= {
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
limit
=> {
description
=>
"Maximum number of messages to return."
,
name
=>
"limit"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
},
offset
=> {
description
=>
"Offset"
,
name
=>
"offset"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
range
=> {
description
=>
"Relative timeframe to search in. See method description."
,
name
=>
"range"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
},
sort
=> {
description
=>
"Sorting (field:asc / field:desc)"
,
name
=>
"sort"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_relative_search_relative is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_relative_search_relative ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_relative_search_relative for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_relative_field_histogram_relative {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/relative/fieldhistogram"
;
my
$args
= {
field
=> {
description
=>
"Field of whose values to get the histogram of"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
interval
=> {
description
=>
"Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)"
,
name
=>
"interval"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
range
=> {
description
=>
"Relative timeframe to search in. See search method description."
,
name
=>
"range"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_relative_field_histogram_relative is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_relative_field_histogram_relative ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_relative_field_histogram_relative for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_relative_histogram_relative {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/relative/histogram"
;
my
$args
= {
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
interval
=> {
description
=>
"Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)"
,
name
=>
"interval"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
range
=> {
description
=>
"Relative timeframe to search in. See search method description."
,
name
=>
"range"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_relative_histogram_relative is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_relative_histogram_relative ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_relative_histogram_relative for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_relative_stats_relative {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/relative/stats"
;
my
$args
= {
field
=> {
description
=>
"Message field of numeric type to return statistics for"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
range
=> {
description
=>
"Relative timeframe to search in. See search method description."
,
name
=>
"range"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_relative_stats_relative is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_relative_stats_relative ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_relative_stats_relative for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_relative_terms_relative {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/universal/relative/terms"
;
my
$args
= {
field
=> {
description
=>
"Message field of to return terms of"
,
name
=>
"field"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
filter
=> {
description
=>
"Filter"
,
name
=>
"filter"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"String"
},
query
=> {
description
=>
"Query (Lucene syntax)"
,
name
=>
"query"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"String"
},
range
=> {
description
=>
"Relative timeframe to search in. See search method description."
,
name
=>
"range"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
},
size
=> {
description
=>
"Maximum number of terms to return"
,
name
=>
"size"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_relative_terms_relative is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_relative_terms_relative ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_relative_terms_relative for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_saved_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/saved"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_saved_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/saved"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_saved_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_saved_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_saved_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_saved_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/saved/$params{searchId}"
;
my
$args
= {
searchId
=> {
description
=>
""
,
name
=>
"searchId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_saved_get is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_saved_get ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_saved_get for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
search_saved_delete {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/search/saved/$params{searchId}"
;
my
$args
= {
searchId
=> {
description
=>
""
,
name
=>
"searchId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"search_saved_delete is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to search_saved_delete ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in search_saved_delete for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
sources_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/sources"
;
my
$args
= {
range
=> {
description
=>
"Relative timeframe to search in. See method description."
,
name
=>
"range"
,
paramType
=>
"query"
,
required
=> 1,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"sources_list is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to sources_list ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in sources_list for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
static_fields_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}/staticfields"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"static_fields_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to static_fields_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in static_fields_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
static_fields_delete {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}/staticfields/$params{key}"
;
my
$args
= {
Key
=> {
description
=>
""
,
name
=>
"Key"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"static_fields_delete is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to static_fields_delete ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in static_fields_delete for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
stream_rules_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamid}/rules"
;
my
$args
= {
streamid
=> {
description
=>
"The id of the stream whose stream rules we want."
,
name
=>
"streamid"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"stream_rules_get is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to stream_rules_get ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in stream_rules_get for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
stream_rules_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamid}/rules"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
streamid
=> {
description
=>
"The stream id this new rule belongs to."
,
name
=>
"streamid"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"stream_rules_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to stream_rules_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in stream_rules_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
get_stream_rules_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamid}/rules/$params{streamRuleId}"
;
my
$args
= {
streamRuleId
=> {
description
=>
"The stream rule id we are getting"
,
name
=>
"streamRuleId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
streamid
=> {
description
=>
"The id of the stream whose stream rule we want."
,
name
=>
"streamid"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"get_stream_rules_get is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to get_stream_rules_get ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in get_stream_rules_get for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
stream_rules_delete {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamid}/rules/$params{streamRuleId}"
;
my
$args
= {
streamRuleId
=> {
description
=>
""
,
name
=>
"streamRuleId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
streamid
=> {
description
=>
"The stream id this new rule belongs to."
,
name
=>
"streamid"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"stream_rules_delete is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to stream_rules_delete ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in stream_rules_delete for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
stream_rules_update {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamid}/rules/$params{streamRuleId}"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
streamRuleId
=> {
description
=>
"The stream rule id we are updating"
,
name
=>
"streamRuleId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
streamid
=> {
description
=>
"The stream id this rule belongs to."
,
name
=>
"streamid"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"stream_rules_update is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to stream_rules_update ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in stream_rules_update for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_get_enabled {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/enabled"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_stream_throughput {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/throughput"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
get_streams_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}"
;
my
$args
= {
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"get_streams_get is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to get_streams_get ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in get_streams_get for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_delete {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}"
;
my
$args
= {
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_delete is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_delete ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_delete for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_update {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_update is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_update ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_update for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_clone_stream {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/clone"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_clone_stream is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_clone_stream ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_clone_stream for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_pause {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/pause"
;
my
$args
= {
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_pause is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_pause ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_pause for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_resume {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/resume"
;
my
$args
= {
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_resume is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_resume ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_resume for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_test_match {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/testMatch"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_test_match is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_test_match ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_test_match for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
streams_one_stream_throughput {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/streams/$params{streamId}/throughput"
;
my
$args
= {
streamId
=> {
description
=>
""
,
name
=>
"streamId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"streams_one_stream_throughput is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to streams_one_stream_throughput ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in streams_one_stream_throughput for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system
{
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_fields {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/fields"
;
my
$args
= {
limit
=> {
description
=>
"Maximum number of fields to return. Set to 0 for all fields."
,
name
=>
"limit"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_fields is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_fields ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_fields for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_jvm {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/jvm"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_permissions {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/permissions"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_reader_permissions {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/permissions/reader/$params{username}"
;
my
$args
= {
username
=> {
description
=>
""
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_reader_permissions is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_reader_permissions ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_reader_permissions for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_pause_processing {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/processing/pause"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_resume_processing {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/processing/resume"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_threaddump {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/threaddump"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_buffers_utilization {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/buffers"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_cluster_node {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/cluster/node"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_cluster_nodes {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/cluster/nodes"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
get_system_cluster_node {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/cluster/nodes/$params{nodeId}"
;
my
$args
= {
nodeId
=> {
description
=>
""
,
name
=>
"nodeId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"get_system_cluster_node is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to get_system_cluster_node ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in get_system_cluster_node for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_deflector_deflector {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/deflector"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_deflector_config {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/deflector/config"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_deflector_cycle {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/deflector/cycle"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_index_ranges_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indices/ranges"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_index_ranges_rebuild {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/indices/ranges/rebuild"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_inputs_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_inputs_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_inputs_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_inputs_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_inputs_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_inputs_types {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/types"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_inputs_info {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/types/$params{inputType}"
;
my
$args
= {
inputType
=> {
description
=>
""
,
name
=>
"inputType"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_inputs_info is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_inputs_info ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_inputs_info for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_inputs_single {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}"
;
my
$args
= {
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_inputs_single is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_inputs_single ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_inputs_single for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_inputs_terminate {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}"
;
my
$args
= {
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_inputs_terminate is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_inputs_terminate ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_inputs_terminate for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_inputs_launch_existing {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/inputs/$params{inputId}/launch"
;
my
$args
= {
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_inputs_launch_existing is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_inputs_launch_existing ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_inputs_launch_existing for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_jobs_trigger {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/jobs"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_jobs_trigger is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_jobs_trigger ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_jobs_trigger for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_jobs_list {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/jobs"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_jobs_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/jobs/$params{jobId}"
;
my
$args
= {
jobId
=> {
description
=>
""
,
name
=>
"jobId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_jobs_get is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_jobs_get ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_jobs_get for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_l_d_a_p_get_ldap_settings {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/ldap/settings"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_l_d_a_p_update_ldap_settings {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/ldap/settings"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_l_d_a_p_update_ldap_settings is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_l_d_a_p_update_ldap_settings ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_l_d_a_p_update_ldap_settings for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_l_d_a_p_delete_ldap_settings {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/ldap/settings"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_l_d_a_p_test_ldap_configuration {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/ldap/test"
;
my
$args
= {
"Configuration to test"
=> {
description
=>
""
,
name
=>
"Configuration to test"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"LdapTestConfigRequest"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_l_d_a_p_test_ldap_configuration is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_l_d_a_p_test_ldap_configuration ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_l_d_a_p_test_ldap_configuration for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_loggers_loggers {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/loggers"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_loggers_subsytems {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/loggers/subsystems"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_loggers_set_subsystem_logger_level {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/loggers/subsystems/$params{subsystem}/level/$params{level}"
;
my
$args
= {
level
=> {
description
=>
""
,
name
=>
"level"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
subsystem
=> {
description
=>
""
,
name
=>
"subsystem"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_loggers_set_subsystem_logger_level is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_loggers_set_subsystem_logger_level ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_loggers_set_subsystem_logger_level for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_loggers_set_single_logger_level {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/loggers/$params{loggerName}/level/$params{level}"
;
my
$args
= {
level
=> {
description
=>
""
,
name
=>
"level"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
loggerName
=> {
description
=>
""
,
name
=>
"loggerName"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_loggers_set_single_logger_level is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_loggers_set_single_logger_level ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_loggers_set_single_logger_level for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_messages_all {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/messages"
;
my
$args
= {
page
=> {
description
=>
"Page"
,
name
=>
"page"
,
paramType
=>
"query"
,
required
=> 0,
type
=>
"Integer"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_messages_all is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_messages_all ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_messages_all for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_metrics_metrics {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/metrics"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_metrics_metric_names {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/metrics/names"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_metrics_by_namespace {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/metrics/namespace/$params{namespace}"
;
my
$args
= {
namespace
=> {
description
=>
""
,
name
=>
"namespace"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_metrics_by_namespace is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_metrics_by_namespace ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_metrics_by_namespace for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_metrics_single_metric {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/metrics/$params{metricName}"
;
my
$args
= {
metricName
=> {
description
=>
""
,
name
=>
"metricName"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_metrics_single_metric is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_metrics_single_metric ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_metrics_single_metric for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_metrics_historic_single_metric {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/metrics/$params{metricName}/history"
;
my
$args
= {
after
=> {
description
=>
"Only values for after this UTC timestamp (1970 epoch)"
,
name
=>
"after"
,
paramType
=>
"body"
,
required
=> 0,
type
=>
"Long"
},
metricName
=> {
description
=>
""
,
name
=>
"metricName"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_metrics_historic_single_metric is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_metrics_historic_single_metric ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_metrics_historic_single_metric for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_notifications_list_notifications {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/notifications"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_notifications_delete_notification {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/notifications/$params{notificationType}"
;
my
$args
= {
notificationType
=> {
description
=>
""
,
name
=>
"notificationType"
,
paramType
=>
"path"
,
required
=> 0,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_notifications_delete_notification is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_notifications_delete_notification ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_notifications_delete_notification for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_radios_radios {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/radios"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_radios_radio {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/radios/$params{radioId}"
;
my
$args
= {
radioId
=> {
description
=>
""
,
name
=>
"radioId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_radios_radio is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_radios_radio ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_radios_radio for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_radios_register_input {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/radios/$params{radioId}/inputs"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
radioId
=> {
description
=>
""
,
name
=>
"radioId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_radios_register_input is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_radios_register_input ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_radios_register_input for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_radios_persisted_inputs {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/radios/$params{radioId}/inputs"
;
my
$args
= {
radioId
=> {
description
=>
""
,
name
=>
"radioId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_radios_persisted_inputs is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_radios_persisted_inputs ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_radios_persisted_inputs for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_radios_unregister_input {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/radios/$params{radioId}/inputs/$params{inputId}"
;
my
$args
= {
inputId
=> {
description
=>
""
,
name
=>
"inputId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
radioId
=> {
description
=>
""
,
name
=>
"radioId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_radios_unregister_input is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_radios_unregister_input ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_radios_unregister_input for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_radios_ping {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/radios/$params{radioId}/ping"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
radioId
=> {
description
=>
""
,
name
=>
"radioId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_radios_ping is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_radios_ping ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_radios_ping for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_sessions_new_session {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/sessions"
;
my
$args
= {
"Login request"
=> {
description
=>
"Username and credentials"
,
name
=>
"Login request"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"SessionCreateRequest"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_sessions_new_session is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_sessions_new_session ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_sessions_new_session for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_sessions_terminate_session {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/sessions/$params{sessionId}"
;
my
$args
= {
sessionId
=> {
description
=>
""
,
name
=>
"sessionId"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"system_sessions_terminate_session is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to system_sessions_terminate_session ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in system_sessions_terminate_session for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
system_throughput_total {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/system/throughput"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_list_users {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users"
;
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_create {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users"
;
my
$args
= {
"JSON body"
=> {
description
=>
""
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_create is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_create ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_create for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_change_user {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}"
;
my
$args
= {
username
=> {
description
=>
"The name of the user to modify."
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_change_user is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_change_user ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_change_user for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_delete_user {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}"
;
my
$args
= {
username
=> {
description
=>
"The name of the user to delete."
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_delete_user is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_delete_user ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_delete_user for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_get {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}"
;
my
$args
= {
username
=> {
description
=>
"The username to return information for."
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_get is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_get ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_get for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_change_password {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}/password"
;
my
$args
= {
"JSON body"
=> {
description
=>
"The hashed old and new passwords."
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
username
=> {
description
=>
"The name of the user whose password to change."
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_change_password is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_change_password ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_change_password for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_edit_permissions {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}/permissions"
;
my
$args
= {
"JSON body"
=> {
description
=>
"The list of permissions to assign to the user."
,
name
=>
"JSON body"
,
paramType
=>
"body"
,
required
=> 1,
type
=>
"String"
},
username
=> {
description
=>
"The name of the user to modify."
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_edit_permissions is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_edit_permissions ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_edit_permissions for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'put'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_delete_permissions {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}/permissions"
;
my
$args
= {
username
=> {
description
=>
"The name of the user to modify."
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_delete_permissions is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_delete_permissions ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_delete_permissions for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_list_tokens {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}/tokens"
;
my
$args
= {
username
=> {
description
=>
""
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_list_tokens is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_list_tokens ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_list_tokens for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'get'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_generate_new_token {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}/tokens/$params{name}"
;
my
$args
= {
name
=> {
description
=>
"Descriptive name for this token (e.g. 'cronjob') "
,
name
=>
"name"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
username
=> {
description
=>
""
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_generate_new_token is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_generate_new_token ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_generate_new_token for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'post'
,
$url
, \
%clean_data
,
$body
);
}
sub
users_revoke_token {
my
$self
=
shift
;
my
(
%params
) =
@_
;
my
(
%clean_data
,
$body
);
my
$url
=
"/users/$params{username}/tokens/$params{token}"
;
my
$args
= {
"access token"
=> {
description
=>
""
,
name
=>
"access token"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
},
username
=> {
description
=>
""
,
name
=>
"username"
,
paramType
=>
"path"
,
required
=> 1,
type
=>
"String"
}
};
foreach
my
$a
(
keys
%{
$args
} ) {
die
"users_revoke_token is missing required parameter $a"
if
(
$args
->{
$a
}->{required} && !
$params
{
$a
} );
my
$err
= _validate_parameter(
$params
{
$a
},
$args
->{
$a
} );
die
"Bad argument $params{$a} to users_revoke_token ($err)"
if
(
$err
);
if
(
$args
->{
$a
}->{paramType} eq
'path'
) {
$url
=~ s/\
$params
\{
$a
\}/
$params
{
$a
}/;
next
;
}
if
(
$args
->{
$a
}->{paramType} eq
'body'
) {
die
"body has already been defined in users_revoke_token for $args->{$a}->{name}"
if
(
$body
);
$body
=
$params
{
$a
};
}
else
{
$clean_data
{
$a
} =
$params
{
$a
}
if
(
defined
$params
{
$a
} );
}
}
if
(
ref
(
$body
) ne
'SCALAR'
) {
$body
= to_json(
$body
)
if
(
$body
);
}
return
$self
->_action_url(
'delete'
,
$url
, \
%clean_data
,
$body
);
}
1;
Hide Show 2368 lines of Pod