From 21b021b8a5a6be90ea44d7a85607e8b92a679f26 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Sat, 29 Aug 2015 10:29:19 +0200 Subject: [PATCH] Docs: Fix url anchors in API chapter refs #9105 --- doc/9-icinga2-api.md | 38 +++++++++++++++++++------------------- mkdocs.yml | 29 +++++++++++++++-------------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md index 75bf2e0e5..3ac143859 100644 --- a/doc/9-icinga2-api.md +++ b/doc/9-icinga2-api.md @@ -17,7 +17,7 @@ make calls to This chapter will start with a general overview followed by detailed information about specific endpoints. -### Requests Any tool capable of making HTTP requests can communicate with the API, for example [curl](http://curl.haxx.se). @@ -40,7 +40,7 @@ Supported request methods: PUT | Create a new object. The PUT request must include all attributes required to create a new object. DELETE | Remove an object created by the API. The DELETE method is idempotent and does not require any check if the object actually exists. -### HTTP Statuses The API will return standard [HTTP statuses](https://www.ietf.org/rfc/rfc2616.txt) including error codes. @@ -63,7 +63,7 @@ Ask your Icinga 2 system administrator to check the `icinga2.log` file for furth troubleshooting. -### Responses Succesful requests will send back a response body containing a `results` list. Depending on the number of affected objects in your request, the @@ -82,7 +82,7 @@ The [output](9-icinga2-api.md#icinga2-api-output) will be sent back as JSON obje } -### Authentication There are two different ways for authenticating against the Icinga 2 API: @@ -127,11 +127,11 @@ Now pass the basic auth information to curl and send a GET request to the API: In case you will get `Unauthorized` make sure to check the API user credentials. -### Permissions **TODO** https://dev.icinga.org/issues/9088 -### Parameters Depending on the request method there are two ways of passing parameters to the request: @@ -152,7 +152,7 @@ Example for JSON body: **TODO** -#### Filters Use the same syntax as for apply rule expressions for filtering specific objects. @@ -169,15 +169,15 @@ Example for matching all hosts by name (**Note**: `"` are url-encoded as `%22`): -### Output Format The request and reponse body contain a JSON encoded string. -### Version Each url contains the version string as prefix (currently "/v1"). -### Url Overview The Icinga 2 API provides multiple url endpoints @@ -212,7 +212,7 @@ Additionally there are endpoints for each [config object type](6-object-types.md -## Actions There are several actions available for Icinga 2 provided by the `actions` url endpoint. @@ -290,17 +290,17 @@ Reschedule a service check for all services in NOT-OK state: -## Configuration Management `/v1/config` **TODO** Depends on https://dev.icinga.org/issues/9953 -## Events **TODO** -## Hosts All object attributes are prefixed with their respective object type. @@ -310,7 +310,7 @@ Example: Output listing and url parameters use the same syntax. -### List All Hosts Send a `GET` request to `/v1/hosts` to list all host objects and their attributes. @@ -318,7 +318,7 @@ their attributes. $ curl -u root:icinga -k -s 'https://localhost:5665/v1/hosts' -X GET -### Create New Host Object New objects must be created by sending a PUT request. The following parameters need to be passed inside the JSON body: @@ -371,7 +371,7 @@ contains a detailed error message. The following example omits the required `che ] } -### Show Host Send a `GET` request including the host name inside the url: @@ -392,7 +392,7 @@ attributes must be added one by one, e.g. `?attrs=host.address&attrs=host.name`. ] } -### Modify Host Existing objects must be modifed by sending a `POST` request. The following parameters need to be passed inside the JSON body: @@ -426,7 +426,7 @@ Example for existing object `google.com`: ] } -### Delete Host You can delete objects created using the API by sending a `DELETE` request. Specify the object name inside the url. diff --git a/mkdocs.yml b/mkdocs.yml index bdedfbe46..c49741dcb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -10,20 +10,21 @@ pages: - [6-object-types.md, Object Types] - [7-icinga-template-library.md, Icinga Template Library] - [8-cli-commands.md, CLI Commands] -- [9-monitoring-remote-systems.md, Monitoring Remote Systems] -- [10-icinga2-client.md, Icinga 2 Client] -- [11-agent-based-checks.md, Additional Agent-based Checks] -- [12-distributed-monitoring-ha.md, Distributed Monitoring and High Availability] -- [13-addons-plugins.md, Addons and Plugins] -- [14-alternative-frontends.md, Alternative Frontends] -- [15-livestatus.md, Livestatus] -- [16-troubleshooting.md, Troubleshooting] -- [17-upgrading-icinga-2.md, Upgrading Icinga 2] -- [18-migrating-from-icinga-1x.md, Migrating from Icinga 1.x] -- [19-language-reference.md, Language Reference] -- [20-library-reference.md, Library Reference] -- [21-debug.md, Debug] -- [22-appendix.md, Appendix] +- [9-icinga2-api.md, Icinga 2 API] +- [10-monitoring-remote-systems.md, Monitoring Remote Systems] +- [11-icinga2-client.md, Icinga 2 Client] +- [12-agent-based-checks.md, Additional Agent-based Checks] +- [13-distributed-monitoring-ha.md, Distributed Monitoring and High Availability] +- [14-addons-plugins.md, Addons and Plugins] +- [15-alternative-frontends.md, Alternative Frontends] +- [16-livestatus.md, Livestatus] +- [17-troubleshooting.md, Troubleshooting] +- [18-upgrading-icinga-2.md, Upgrading Icinga 2] +- [19-migrating-from-icinga-1x.md, Migrating from Icinga 1.x] +- [20-language-reference.md, Language Reference] +- [21-library-reference.md, Library Reference] +- [22-debug.md, Debug] +- [23-appendix.md, Appendix] theme: readthedocs markdown_extensions: [smarty] extra_javascript: [scroll.js] -- 2.40.0