Skip to content

Commit

Permalink
Merge pull request #2122 from nfagerlund/nov2016_link_fixes
Browse files Browse the repository at this point in the history
Nov2016 link fixes
  • Loading branch information
wkalt committed Nov 15, 2016
2 parents 5cfdc76 + 279d29c commit df81ba6
Show file tree
Hide file tree
Showing 34 changed files with 157 additions and 151 deletions.
2 changes: 1 addition & 1 deletion documentation/api/admin/v1/archive.markdown
Expand Up @@ -4,7 +4,7 @@ layout: default
canonical: "/puppetdb/latest/api/admin/v1/archive.html"
---

[curl]: ../curl.html#using-curl-from-localhost-non-sslhttp
[curl]: ../../query/curl.html#using-curl-from-localhost-non-sslhttp

The `/archive` endpoint can be used for importing and exporting PuppetDB
archives.
Expand Down
2 changes: 1 addition & 1 deletion documentation/api/admin/v1/cmd.markdown
Expand Up @@ -4,7 +4,7 @@ layout: default
canonical: "/puppetdb/latest/api/admin/v1/cmd.html"
---

[curl]: ../curl.html#using-curl-from-localhost-non-sslhttp
[curl]: ../../query/curl.html#using-curl-from-localhost-non-sslhttp

The `/cmd` endpoint can be used to trigger PuppetDB maintenance
operations. Only one maintenance operation can be running at a time.
Expand Down
2 changes: 1 addition & 1 deletion documentation/api/ext/v1/resource-graphs.markdown
Expand Up @@ -10,7 +10,7 @@ canonical: "/puppetdb/latest/api/ext/v1/resource-graphs.html"
[ast]: ../../query/v4/ast.html
[environments]: ../../query/v4/environments.html
[nodes]: ../../query/v4/nodes.html
[statuses]: /puppet/latest/reference/format_report.html#puppettransactionreport
[statuses]: {{puppet}}/format_report.html#puppettransactionreport

You can query resource-graphs by making an HTTP request to the
`/pdb/ext/v1/resource-graphs` endpoint.
Expand Down
2 changes: 1 addition & 1 deletion documentation/api/meta/v1/server-time.markdown
Expand Up @@ -4,7 +4,7 @@ layout: default
canonical: "/puppetdb/latest/api/meta/v1/server-time.html"
---

[curl]: ../curl.html#using-curl-from-localhost-non-sslhttp
[curl]: ../../query/curl.html#using-curl-from-localhost-non-sslhttp

The `/server-time` endpoint can be used to retrieve the server time from the PuppetDB server.

Expand Down
2 changes: 1 addition & 1 deletion documentation/api/meta/v1/version.markdown
Expand Up @@ -4,7 +4,7 @@ layout: default
canonical: "/puppetdb/latest/api/meta/v1/version.html"
---

[curl]: ../curl.html#using-curl-from-localhost-non-sslhttp
[curl]: ../../query/curl.html#using-curl-from-localhost-non-sslhttp

The `/version` endpoint can be used to retrieve version information from the PuppetDB server.

Expand Down
8 changes: 4 additions & 4 deletions documentation/api/query/curl.markdown
Expand Up @@ -45,8 +45,8 @@ make sure to authorize the certificate you are using:
--cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \
--cert /etc/puppetlabs/puppet/ssl/certs/<node>.pem \
--key /etc/puppetlabs/puppet/ssl/private_keys/<node>.pem


### Using an RBAC token (PE only)

To make secured requests from other hosts, you will need to supply the following
Expand All @@ -58,7 +58,7 @@ via the command line:
Any node managed by Puppet agent will already have the CA certificate, and you
can reuse the CA certificate for contacting PuppetDB. You can read more about
generating RBAC tokens and how they work in the
[PE documention](https://docs.puppet.com/pe/latest/rbac_token_auth.html).
[PE documention]({{pe}}/rbac_token_auth.html).

**Note:** The token the user is for must have the correct permissions for
viewing or editting node data depending on the operation.
Expand All @@ -67,7 +67,7 @@ viewing or editting node data depending on the operation.
-H "X-Authentication: <token contents>"
--tlsv1 \
--cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \

**Note:** PE 2016.2 users will need to set `client-auth = want` under the
`[jetty]` header of their jetty.ini configuration. Later versions of PE have
this setting managed by the `puppetlabs-puppet_enterprise` module by default.
Expand Down
2 changes: 1 addition & 1 deletion documentation/api/query/v4/fact-paths.markdown
Expand Up @@ -7,7 +7,7 @@ canonical: "/puppetdb/latest/api/query/v4/fact-paths.html"
[curl]: ../curl.html#using-curl-from-localhost-non-sslhttp
[paging]: ./paging.html
[query]: ./query.html
[fact-names]: ./query/v4/fact-names.html
[fact-names]: ./fact-names.html
[subqueries]: ./ast.html#subquery-operators
[ast]: ./ast.html
[facts]: ./facts.html
Expand Down
2 changes: 1 addition & 1 deletion documentation/api/query/v4/nodes.markdown
Expand Up @@ -6,7 +6,7 @@ canonical: "/puppetdb/latest/api/query/v4/nodes.html"

[resource]: ./resources.html
[curl]: ../curl.html#using-curl-from-localhost-non-sslhttp
[statuses]: /puppet/latest/reference/format_report.html#puppettransactionreport
[statuses]: {{puppet}}/format_report.html#puppettransactionreport
[paging]: ./paging.html
[query]: ./query.html
[8601]: http://en.wikipedia.org/wiki/ISO_8601
Expand Down
16 changes: 11 additions & 5 deletions documentation/api/query/v4/pql.markdown
Expand Up @@ -79,7 +79,7 @@ In this case, this would return only the certname field of nodes starting with
The entity or context of a query (or subquery) defines what results you will get
returned when performing a query, and provides the main context for any
projections or filters in the query. There are many entities; for a full list
see the [entities] documentation.
see the [entities][] documentation.

For PQL queries, the entity context is the minimal amount of information one
must provide, as it defines the results returned. For example, if you wanted to
Expand All @@ -89,8 +89,10 @@ see all node information, you could provide a query as follows:

And it would be enough to return all node data, without filtering or pagination.

The entity context can also be used within a subquery, see the [subquery]
section for more details.
The entity context can also be used within a subquery; for more details, see:

* [The `in` operator][in], which can take a subquery.
* [Implicit subqueries][].

## Projection

Expand Down Expand Up @@ -240,6 +242,8 @@ operator and a valid regular expression:
#### Array Match: `in`

[in]: #array-match-in

The `in` operator matches a field or set of fields against either an array or a
subquery.

Expand Down Expand Up @@ -376,6 +380,8 @@ Currently lists are only supported with the `in` operator.

### Implicit Subqueries

[Implicit subqueries]: #implicit-subqueries

Implicit subqueries work the same way as the `in` operator,
however the relationship between some entities is clear. When an implicit
relationship exists between two entity types, you can avoid the overhead of
Expand All @@ -395,7 +401,7 @@ only Debian nodes).

This often allows you to avoid having to know which fields are
required, unlike the `in` operator, but be aware that only some relationships are well
defined. See the [entities] documentation for each entity to learn which
defined. See the [entities][] documentation for each entity to learn which
implicit subqueries are provided automatically.

Also, implicit subqueries are like any other conditional operator, and therefore
Expand All @@ -408,7 +414,7 @@ subquery as before, included with a `certname` match on the node itself:
}

They can even be combined with other implict subqueries, to provide more complex
matching capabilities. This query combines everything we've discussed so far,
matching capabilities. This query combines everything we've discussed so far,
and adds a `resource` subquery for `Package[tomcat]`:

nodes {
Expand Down
2 changes: 1 addition & 1 deletion documentation/api/query/v4/reports.markdown
Expand Up @@ -8,7 +8,7 @@ canonical: "/puppetdb/latest/api/query/v4/reports.html"
[ast]: ./ast.html
[events]: ./events.html
[paging]: ./paging.html
[statuses]: /puppet/latest/reference/format_report.html#puppettransactionreport
[statuses]: {{puppet}}/format_report.html#puppettransactionreport
[query]: ./query.html
[8601]: http://en.wikipedia.org/wiki/ISO_8601
[subqueries]: ./ast.html#subquery-operators
Expand Down
46 changes: 23 additions & 23 deletions documentation/api/query/v4/upgrading-from-v3.markdown
Expand Up @@ -12,7 +12,7 @@ marked 'experimental' since 2.0.0 but is the only API available in 3.0.
Note that this document focuses on API changes only, and only includes changes
leading up to the release of 3.0. For a more complete description
of the changes listed and changes in versions subsequent to 3.0, see the
[release notes](https://docs.puppetlabs.com/puppetdb/latest/release_notes.html).
[release notes]({{puppetdb}}/release_notes.html).

Each change below is marked with the corresponding release version.

Expand All @@ -23,7 +23,7 @@ Each change below is marked with the corresponding release version.
* (3.0) The query API has been moved from `/` to `/pdb/query`, so
http://localhost:8080/v4/facts has become
http://localhost:8080/pdb/query/v4/facts.

* (3.0) The `/commands` endpoint has been moved to its own API at `/pdb/cmd`, so
http://localhost:8080/v3/commands has become
http://localhost:8080/pdb/cmd/v1.
Expand Down Expand Up @@ -60,7 +60,7 @@ Each change below is marked with the corresponding release version.
compose the v4 response body, along with the new fields
`producer_timestamp`, `hash`, and `environment`. For more
information, see the
[/pdb/query/v4/catalogs documentation](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/catalogs.html).
[/pdb/query/v4/catalogs documentation]({{puppetdb}}/api/query/v4/catalogs.html).

#### /pdb/query/v4/facts

Expand All @@ -73,13 +73,13 @@ Each change below is marked with the corresponding release version.

* (2.2) The v4 factsets endpoint was added to facilitate the grouping
of facts per node. For more information, see the
[/pdb/query/v4/factsets documentation](./api/query/v4/factsets.html).
[/pdb/query/v4/factsets documentation]({{puppetdb}}/api/query/v4/factsets.html).

* (3.0) We added a `hash` field to the endpoint fields to support a unique identifer for factsets.

* (3.0) The `facts` field is now expanded as per our new expansion
convention, so the data format has changed. For more information, see
the [/pdb/query/v4/factsets documentation](./api/query/v4/factsets.html).
the [/pdb/query/v4/factsets documentation]({{puppetdb}}/api/query/v4/factsets.html).

* (3.0) The `/pdb/query/v4/factsets/<node>/facts` endpoints will now
return results even for deactivated or expired nodes.
Expand All @@ -92,14 +92,14 @@ Each change below is marked with the corresponding release version.
parameters and returns an array of maps instead of a map. An additional
`summarize_by` field has also been added to describe the parameter used. For
more information, see the [aggregate-event-counts
documentation](./api/query/v4/aggregate_event_counts).
documentation]({{puppetdb}}/api/query/v4/aggregate_event_counts).

#### /metrics/v1 (formerly /v3/metrics)

* (3.0) The former metrics endpoint has been split off into a separate service, and
reversioned at v1. If you are currently accessing mbeans at
http://localhost:8080/v3/metrics/mbeans, you will now access them at
http://localhost:8080/metrics/v1/mbeans and so on, according to the [metrics api documentation](https://docs.puppetlabs.com/puppetdb/master/api/metrics/v1/index.html).
http://localhost:8080/metrics/v1/mbeans and so on, according to the [metrics api documentation]({{puppetdb}}/api/metrics/v1/mbeans.html).

* (3.0) PuppetDB's mbeans (listed at /metrics/v1/mbeans) are no longer prefixed with
"com."
Expand All @@ -109,9 +109,9 @@ Each change below is marked with the corresponding release version.
* (3.0) For users posting commands directly to the
/pdb/cmd/v1 endpoint, the only valid command submission
versions will be
[replace catalogs v6](https://docs.puppetlabs.com/puppetdb/master/api/wire_format/catalog_format_v6.html),
[store report v5](https://docs.puppetlabs.com/puppetdb/master/api/wire_format/report_format_v5.html),
and [replace facts v4](https://docs.puppetlabs.com/puppetdb/master/api/wire_format/facts_format_v4.html).
[replace catalogs v6]({{puppetdb}}/api/wire_format/catalog_format_v6.html),
[store report v5]({{puppetdb}}/api/wire_format/report_format_v5.html),
and [replace facts v4]({{puppetdb}}/api/wire_format/facts_format_v4.html).

#### /pdb/meta/v1/version (formerly /v3/version)
* (3.0) The version endpoint has been split from the query service and mounted
Expand All @@ -127,16 +127,16 @@ Each change below is marked with the corresponding release version.

* (2.2.0) `/pdb/query/v4/factsets` This endpoint returns a key-value
hash for each certname. For more information, see the
[/pdb/query/v4/factsets documentation](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/factsets.html#response-format).
[/pdb/query/v4/factsets documentation]({{puppetdb}}/api/query/v4/factsets.html#response-format).

* (2.2.0) `/pdb/query/v4/fact-paths` This endpoint is similar to the
existing fact-names endpoint in that one expected use is GUI
autocompletion. For more information, see the
[/pdb/query/v4/fact-paths documentation](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/fact-paths.html).
[/pdb/query/v4/fact-paths documentation]({{puppetdb}}/api/query/v4/fact-paths.html).

* (2.2.0) `/pdb/query/v4/fact-contents` This endpoint allows
fine-grained querying of structured facts. For more information, see
the [/pdb/query/v4/fact-contents documentation](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/fact-contents.html).
the [/pdb/query/v4/fact-contents documentation]({{puppetdb}}/api/query/v4/fact-contents.html).

* (3.0) `/pdb/query/v4/edges` This endpoint allows querying edges
inside a catalog. For more information, see the
Expand All @@ -157,12 +157,12 @@ Each change below is marked with the corresponding release version.
* (3.0) `/pdb/query/v4/catalogs/<node>/[resources|edges]` Both of
these endpoints provide convenience for drilling into resources and
edges data specific to a particular catalog. See
[/pdb/query/v4/catalogs documentation](./catalogs)
[/pdb/query/v4/catalogs documentation](./catalogs.html)

#### Features affecting all endpoints

* (3.0) Extract is available as a top-level query operator, useful for selecting only
certain fields from a response. See the [documentation on the extract operator](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/ast.html#extract) for more information.
certain fields from a response. See the [documentation on the extract operator]({{puppetdb}}/api/query/v4/ast.html#extract) for more information.

* (2.2.0) The `in` and `extract` operators have been changed to accept multiple fields,
allowing more concise subquerying as explained [here](https://github.com/puppetlabs/puppetdb/pull/1053).
Expand All @@ -171,18 +171,18 @@ Each change below is marked with the corresponding release version.

* (3.0) The v4 events endpoint does not require a query parameter, so
`/pdb/query/v4/events` is now a valid query. See the
[events endpoint documentation](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/events.html#get-v4events)
[events endpoint documentation]({{puppetdb}}/api/query/v4/events.html#pdbqueryv4events)
for more information.

#### /pdb/query/v4/reports

* (3.0) The response of the reports endpoint includes the new fields `noop`,
`environment`, `status`, `resource_events`, `logs`, and `metrics`. For more information, see the [documentation on the reports endpoint](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/reports.html). For comparison, see [an example of the new format](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/reports.html#examples), and [an example of the old format](https://docs.puppetlabs.com/puppetdb/latest/api/query/v3/reports.html#response-format).
`environment`, `status`, `resource_events`, `logs`, and `metrics`. For more information, see the [documentation on the reports endpoint]({{puppetdb}}/api/query/v4/reports.html). For comparison, see [an example of the new format]({{puppetdb}}/api/query/v4/reports.html#examples), and [an example of the old format](/puppetdb/2.3/api/query/v3/reports.html#response-format) (PuppetDB 2.3 docs).

* (3.0) The reports endpoint takes a `latest_report?` query to return only reports
associated with the most recent puppet run for their nodes. Similar to the
corresponding events query, there is no corresponding field in the response.
For more information, see the [documentation on the report query fields](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/reports.html#query-fields).
For more information, see the [documentation on the report query fields]({{puppetdb}}/api/query/v4/reports.html#query-fields).

#### /pdb/query/v4/catalogs

Expand All @@ -191,17 +191,17 @@ Each change below is marked with the corresponding release version.
single host. The old query format (`/pdb/query/v4/catalogs/myhost`)
still works as before, but `/pdb/query/v4/catalogs` returns results
too. For more information, see the
[catalog query examples](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/catalogs.html#examples).
[catalog query examples]({{puppetdb}}/api/query/v4/catalogs.html#examples).

#### Operators

* (2.2.0) The new `select_fact_contents` subquery operator allows for filtering the
results of other endpoints based on detailed queries about structured fact
values. This is exhibited on the bottom of the [subquery examples documentation](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/ast.html#subquery-examples).
values. This is exhibited on the bottom of the [subquery examples documentation]({{puppetdb}}/api/query/v4/ast.html#explicit-subquery-examples).

* (2.2.0) We have added the regexp array match operator `~>` for querying fact paths on
the `fact-contents` or `fact-paths endpoints`. This is documented with the other [operators](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/ast.html#regexp-array-match).
An example of usage is given at the bottom of the [subquery examples page](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/ast.html#subquery-examples).
the `fact-contents` or `fact-paths endpoints`. This is documented with the other [operators]({{puppetdb}}/api/query/v4/ast.html#regexp-array-match).
An example of usage is given at the bottom of the [subquery examples page]({{puppetdb}}/api/query/v4/ast.html#explicit-subquery-examples).

* (3.0) We have added the `group_by` and `function` operators, as well as
support for the `count` function. For more information, see the [operators documentation](https://docs.puppetlabs.com/puppetdb/master/api/query/v4/ast.html#function).
support for the `count` function. For more information, see the [operators documentation]({{puppetdb}}/api/query/v4/ast.html#function).
2 changes: 1 addition & 1 deletion documentation/api/status/v1/status.markdown
Expand Up @@ -5,7 +5,7 @@ canonical: "/puppetdb/latest/api/status/v1/status.html"
---

[curl]: ../curl.html#using-curl-from-localhost-non-sslhttp
[status-api]: https://docs.puppetlabs.com/pe/latest/status_api.html
[status-api]: {{pe}}/status_api.html

The `/status` endpoint implements the Puppet Labs Status API for coordinated
monitoring of Puppet Labs services. See the [central documentation][status-api]
Expand Down

0 comments on commit df81ba6

Please sign in to comment.