Fixed formatting errors
@@ -19,7 +19,7 @@ info:
Usually the API is available at `https://<ST2_IP>/api`. The default implementation is to use Nginx as a front-end, passing `/api`/ requests through to the `st2api` service, which by default listens on port `9101`. On a [reference single-system deployment](https://docs.stackstorm.com/install/index.html), all processes run on the same system. If you have a [multi-system deployment](https://docs.stackstorm.com/reference/ha.html), the components may be running on multiple systems, and may be load-balanced.
- ## Authentication (****Section needs updating****)
+ ## Authentication
To authenticate against the StackStorm API, either an authentication token or an API key (but not both) should be provided in the HTTP request headers. The headers are named `X-Auth-Token` and `St2-Api-Key` respectively.
@@ -55,8 +55,7 @@ info:
Note the use of the option `-m` flag to provide key metadata. This is good practice, because it helps to identify what the key is used for. This is useful if you need to later revoke or disable keys.
- Keys can also be created using the API,
-
+ Keys can also be created using the `[apikeys](api/v1/apikeys/)` API.
Using the API key:
@@ -86,8 +85,7 @@ info:
The StackStorm API only supports JSON, not XML. Most POST requests require a well-formatted JSON object body.
-
- ## Code Examples (****SECTION NEEDS UPDATE****)
+ ## Code Examples
These are some examples to show how to use the StackStorm API with cURL. You can use any REST-capable client, library or programming language to access the StackStorm API.
@@ -98,8 +96,6 @@ info:
{"user": "st2admin", "token": "866218ad67e141e4aaddbbb92964e67e", "expiry": "2017-04-06T01:15:06.602758Z", "id": "58e4451ac4da5f1e040fb859", "metadata": {}}
```
- ```
-
List rules for the ChatOps pack:
```
@@ -136,8 +132,7 @@ info:
+---------------------------------+---------+--------------------------------------------+
```
- **NOTE**: The URL displayed in the cURL commands above is directly accessing the API service on port 9101. If you are connecting to the ST2 API from a remote system, you should modify this to work with Nginx on port 443. In the above output, `http://127.0.0.1:9101/v1/actions?pack=chatops` would become `https://myhost.example.com/api/v1/actions?pack=chatops`.
-
+ **NOTE**: The URL displayed in the `curl` commands above is directly accessing the API service on port 9101. If you are connecting to the ST2 API from a remote system, you should modify this to work with Nginx on port 443. In the above output, `http://127.0.0.1:9101/v1/actions?pack=chatops` would become `https://myhost.example.com/api/v1/actions?pack=chatops`.
## Errors
