<commit_before>
A RESTful interface is a web service conforming to the REST architectural style as described in the book link:http://oreilly.com/catalog/9780596529260[RESTful Web Services].
This page is describes the RESTful interface for {opennms-product-name}.

=== ReST URL

The base URL for Rest Calls is: http://opennmsserver:8980/opennms/rest/

For instance, http://localhost:8980/opennms/rest/alarms/ will give you the current alarms in the system.

=== Authentication

Use HTTP Basic authentication to provide a valid username and password.
By default you will not receive a challenge, so you must configure your ReST client library to send basic authentication proactively.

=== Data format

Jersey allows ReST calls to be made using either XML or JSON.
By default a request to the API is returned in XML.
To get JSON encoded responses one has to send the following header with the request: `Accept: application/json`.

=== Standard Parameters

The following are standard params which are available on most resources (noted below)

.ReST standard parameter for resources
[options="header", cols="1,10"]
|===
| Parameter   | Description
| `limit`     | integer, limiting the number of results. This is particularly handy on events and notifications, where an accidental call with no limit could result in many thousands of results being returned, killing either the client or the server. If set to 0, then no limit applied
| `offset`    | integer, being the numeric offset into the result set from which results should start being returned. E.g., if there are 100 result entries, offset is 15, and limit is 10, then entries 15-24 will be returned. Used for pagination
2+| *Filtering*: All properties of the entity being accessed can be specified as parameters in either the _URL_ (for _GET_) or the form value (for _PUT_ and _POST_). If so, the value will be used to add a filter to the result. By default, the operation is equality, unless the `comparator` parameter is sent, in which case it applies to *all* comparisons in the filter. Multiple properties will result in an `AND` operation between the filter elements. Available comparators are:
| `eq`        | Checks for equality
| `ne`        | Checks for non-equality
| `ilike`     | Case-insensitive wildcarding (`%` is the wildcard)
| `like`      | Case-sensitive wildcarding (`%` is the wildcard)
| `gt`        | Greater than
| `lt`        | Less than<commit_msg>NMS-8524 updated documentation on XML response on rest api: no namespace is delivered<commit_after>
A RESTful interface is a web service conforming to the REST architectural style as described in the book link:http://oreilly.com/catalog/9780596529260[RESTful Web Services].
This page is describes the RESTful interface for {opennms-product-name}.

=== ReST URL

The base URL for Rest Calls is: http://opennmsserver:8980/opennms/rest/

For instance, http://localhost:8980/opennms/rest/alarms/ will give you the current alarms in the system.

=== Authentication

Use HTTP Basic authentication to provide a valid username and password.
By default you will not receive a challenge, so you must configure your ReST client library to send basic authentication proactively.

=== Data format

Jersey allows ReST calls to be made using either XML or JSON.
By default a request to the API is returned in XML. XML is delivered without namespaces.
To get JSON encoded responses one has to send the following header with the request: `Accept: application/json`.

=== Standard Parameters

The following are standard params which are available on most resources (noted below)

.ReST standard parameter for resources
[options="header", cols="1,10"]
|===
| Parameter   | Description
| `limit`     | integer, limiting the number of results. This is particularly handy on events and notifications, where an accidental call with no limit could result in many thousands of results being returned, killing either the client or the server. If set to 0, then no limit applied
| `offset`    | integer, being the numeric offset into the result set from which results should start being returned. E.g., if there are 100 result entries, offset is 15, and limit is 10, then entries 15-24 will be returned. Used for pagination
2+| *Filtering*: All properties of the entity being accessed can be specified as parameters in either the _URL_ (for _GET_) or the form value (for _PUT_ and _POST_). If so, the value will be used to add a filter to the result. By default, the operation is equality, unless the `comparator` parameter is sent, in which case it applies to *all* comparisons in the filter. Multiple properties will result in an `AND` operation between the filter elements. Available comparators are:
| `eq`        | Checks for equality
| `ne`        | Checks for non-equality
| `ilike`     | Case-insensitive wildcarding (`%` is the wildcard)
| `like`      | Case-sensitive wildcarding (`%` is the wildcard)
| `gt`        | Greater than
| `lt`        | Less than
{'fraction_non_alphanumeric': 0.06621050513181727, 'fraction_numerical': 0.015697323405111693, 'mean_word_length': 4.220588235294118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4555505', 'n_tokens_mistral': 1325, 'n_tokens_neox': 1244, 'n_words': 704}