Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/de-dot-kibana-version
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkroh authored Sep 29, 2021
2 parents a879121 + a643876 commit d2d233f
Show file tree
Hide file tree
Showing 17 changed files with 550 additions and 71 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
package-registry

.idea
*.iml
build
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* Add categories to /search output. Categories are added to the package and policy-templates. [#735](https://github.com/elastic/package-registry/pull/735)

### Deprecated

### Known Issues
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ Examples for each API endpoint can be found here: https://github.com/elastic/pac

The `/search` API endpoint has few additional query parameters. More might be added in the future, but for now these are:

* kibana: Filters out all the packages which are not compatible with the given Kibana version. If it is set to `7.3.1` and
* `kibana.version`: Filters out all the packages which are not compatible with the given Kibana version. If it is set to `7.3.1` and
a package requires 7.4, the package will not be returned or an older compatible package will be shown.
By default this endpoint always returns only the newest compatible package.
* category: Filters the package by the given category. Available categories can be seend when going to `/categories` endpoint.
* package: Filters by a specific package name, for example `mysql`. Returns the most recent version.
* internal: This can be set to true, to also list internal packages. This is set to `false` by default.
* all: This can be set to true to list all package versions. This is set to `false` by default.
* experimental: This can be set to true to list packages considered to be experimental. This is set to `false` by default.
* `category`: Filters the package by the given category. Available categories can be seend when going to `/categories` endpoint.
* `package`: Filters by a specific package name, for example `mysql`. Returns the most recent version.
* `internal`: This can be set to true, to also list internal packages. This is set to `false` by default.
* `all`: This can be set to true to list all package versions. This is set to `false` by default.
* `experimental`: This can be set to true to list packages considered to be experimental. This is set to `false` by default.

The different query parameters above can be combined, so `?package=mysql&kibana=7.3.0` will return all mysql package versions
which are compatible with `7.3.0`.

The `/categories` API endpoint has two additional query parameters.

* experimental: This can be set to true to list categories from experimental packages. This is set to `false` by default.
* include_policy_templates: This can be set to true to include categories from policy templates. This is set to `false` by default.
* `experimental`: This can be set to true to list categories from experimental packages. This is set to `false` by default.
* `include_policy_templates`: This can be set to true to include categories from policy templates. This is set to `false` by default.

## Package structure

Expand Down
2 changes: 1 addition & 1 deletion openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ paths:
- schema:
type: string
in: query
name: kibana
name: kibana.version
description: 'Filters out all the packages which are not compatible with the given Kibana version. If it is set to 7.3.1 and a package requires 7.4, the package will not be returned or an older compatible package will be shown. By default this endpoint always returns only the newest compatible package.'
- schema:
type: string
Expand Down
95 changes: 86 additions & 9 deletions testdata/generated/search-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"description": "This package contains a datastream with the dataset_is_prefix flag set to true.\n",
"type": "integration",
"download": "/epr/dataset_is_prefix/dataset_is_prefix-0.0.1.zip",
"path": "/package/dataset_is_prefix/0.0.1"
"path": "/package/dataset_is_prefix/0.0.1",
"categories": [
"custom"
]
},
{
"name": "datasources",
Expand All @@ -24,6 +27,9 @@
"title": "Datasource title",
"description": "Details about the data source."
}
],
"categories": [
"custom"
]
},
{
Expand All @@ -41,6 +47,10 @@
"title": "Logs datasource",
"description": "Datasource for your log files."
}
],
"categories": [
"containers",
"message_queue"
]
},
{
Expand All @@ -58,6 +68,9 @@
"title": "Logs datasource",
"description": "Datasource for your log files."
}
],
"categories": [
"monitoring"
]
},
{
Expand All @@ -68,7 +81,10 @@
"description": "Test package-specified Elasticsearch index privileges",
"type": "solution",
"download": "/epr/elasticsearch_privileges/elasticsearch_privileges-1.0.0.zip",
"path": "/package/elasticsearch_privileges/1.0.0"
"path": "/package/elasticsearch_privileges/1.0.0",
"categories": [
"custom"
]
},
{
"name": "example",
Expand All @@ -78,7 +94,10 @@
"description": "This is the example integration.",
"type": "integration",
"download": "/epr/example/example-0.0.2.zip",
"path": "/package/example/0.0.2"
"path": "/package/example/0.0.2",
"categories": [
"web"
]
},
{
"name": "example",
Expand All @@ -93,8 +112,15 @@
{
"name": "logs",
"title": "Logs datasource",
"description": "Datasource for your log files."
"description": "Datasource for your log files.",
"categories": [
"datastore"
]
}
],
"categories": [
"crm",
"azure"
]
},
{
Expand All @@ -105,7 +131,10 @@
"description": "This is the foo integration",
"type": "solution",
"download": "/epr/foo/foo-1.0.0.zip",
"path": "/package/foo/1.0.0"
"path": "/package/foo/1.0.0",
"categories": [
"custom"
]
},
{
"name": "hidden",
Expand All @@ -115,7 +144,10 @@
"description": "This is the hidden integration",
"type": "solution",
"download": "/epr/hidden/hidden-1.0.0.zip",
"path": "/package/hidden/1.0.0"
"path": "/package/hidden/1.0.0",
"categories": [
"custom"
]
},
{
"name": "ilmpolicy",
Expand All @@ -125,7 +157,10 @@
"description": "Test form ILM Policy in Package",
"type": "solution",
"download": "/epr/ilmpolicy/ilmpolicy-1.0.0.zip",
"path": "/package/ilmpolicy/1.0.0"
"path": "/package/ilmpolicy/1.0.0",
"categories": [
"custom"
]
},
{
"name": "input_groups",
Expand Down Expand Up @@ -158,8 +193,15 @@
"size": "32x32",
"type": "image/svg+xml"
}
],
"categories": [
"compute"
]
}
],
"categories": [
"aws",
"cloud"
]
},
{
Expand All @@ -177,6 +219,9 @@
"title": "Input level templates",
"description": "Input with input-level template to use input-level vars with"
}
],
"categories": [
"custom"
]
},
{
Expand All @@ -194,6 +239,10 @@
"path": "/package/longdocs/1.0.4/img/icon.svg",
"type": "image/svg+xml"
}
],
"categories": [
"custom",
"web"
]
},
{
Expand All @@ -211,6 +260,9 @@
"path": "/package/metricsonly/2.0.1/img/icon.svg",
"type": "image/svg+xml"
}
],
"categories": [
"custom"
]
},
{
Expand All @@ -228,6 +280,9 @@
"title": "Logs datasource",
"description": "Datasource for your log files."
}
],
"categories": [
"custom"
]
},
{
Expand All @@ -245,6 +300,10 @@
"path": "/package/multiversion/1.0.3/img/icon.svg",
"type": "image/svg+xml"
}
],
"categories": [
"custom",
"web"
]
},
{
Expand All @@ -262,6 +321,10 @@
"path": "/package/multiversion/1.0.4/img/icon.svg",
"type": "image/svg+xml"
}
],
"categories": [
"custom",
"web"
]
},
{
Expand All @@ -279,6 +342,10 @@
"path": "/package/multiversion/1.1.0/img/icon.svg",
"type": "image/svg+xml"
}
],
"categories": [
"custom",
"web"
]
},
{
Expand All @@ -289,7 +356,10 @@
"description": "This package does contain a dataset but not stream configs.\n",
"type": "integration",
"download": "/epr/no_stream_configs/no_stream_configs-1.0.0.zip",
"path": "/package/no_stream_configs/1.0.0"
"path": "/package/no_stream_configs/1.0.0",
"categories": [
"custom"
]
},
{
"name": "reference",
Expand All @@ -314,6 +384,10 @@
"title": "Nginx logs and metrics.",
"description": "Collecting logs and metrics from nginx."
}
],
"categories": [
"custom",
"web"
]
},
{
Expand All @@ -324,6 +398,9 @@
"description": "This package contains a yaml pipeline.\n",
"type": "integration",
"download": "/epr/yamlpipeline/yamlpipeline-1.0.0.zip",
"path": "/package/yamlpipeline/1.0.0"
"path": "/package/yamlpipeline/1.0.0",
"categories": [
"custom"
]
}
]
Loading

0 comments on commit d2d233f

Please sign in to comment.