mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
[DOCS] Add authorization info to get and update transform APIs (#87994)
This commit is contained in:
parent
fc93f77d3b
commit
4e18993f55
2 changed files with 66 additions and 42 deletions
|
@ -1,4 +1,3 @@
|
||||||
[role="xpack"]
|
|
||||||
[[get-transform]]
|
[[get-transform]]
|
||||||
= Get {transforms} API
|
= Get {transforms} API
|
||||||
|
|
||||||
|
@ -98,11 +97,11 @@ GET _transform?size=10
|
||||||
// TEST[skip:setup kibana sample data]
|
// TEST[skip:setup kibana sample data]
|
||||||
|
|
||||||
The following example gets configuration information for the
|
The following example gets configuration information for the
|
||||||
`ecommerce_transform` {transform}:
|
`ecommerce_transform1` {transform}:
|
||||||
|
|
||||||
[source,console]
|
[source,console]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
GET _transform/ecommerce_transform
|
GET _transform/ecommerce_transform1
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// TEST[skip:setup kibana sample data]
|
// TEST[skip:setup kibana sample data]
|
||||||
|
|
||||||
|
@ -114,7 +113,14 @@ The API returns the following results:
|
||||||
"count" : 1,
|
"count" : 1,
|
||||||
"transforms" : [
|
"transforms" : [
|
||||||
{
|
{
|
||||||
"id" : "ecommerce_transform",
|
"id" : "ecommerce_transform1",
|
||||||
|
"authorization" : {
|
||||||
|
"roles" : [
|
||||||
|
"superuser"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"version" : "8.4.0",
|
||||||
|
"create_time" : 1656023416565,
|
||||||
"source" : {
|
"source" : {
|
||||||
"index" : [
|
"index" : [
|
||||||
"kibana_sample_data_ecommerce"
|
"kibana_sample_data_ecommerce"
|
||||||
|
@ -128,9 +134,16 @@ The API returns the following results:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dest" : {
|
"dest" : {
|
||||||
"index" : "kibana_sample_data_ecommerce_transform"
|
"index" : "kibana_sample_data_ecommerce_transform1",
|
||||||
|
"pipeline" : "add_timestamp_pipeline"
|
||||||
|
},
|
||||||
|
"frequency" : "5m",
|
||||||
|
"sync" : {
|
||||||
|
"time" : {
|
||||||
|
"field" : "order_date",
|
||||||
|
"delay" : "60s"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"frequency": "1m",
|
|
||||||
"pivot" : {
|
"pivot" : {
|
||||||
"group_by" : {
|
"group_by" : {
|
||||||
"customer_id" : {
|
"customer_id" : {
|
||||||
|
@ -149,10 +162,13 @@ The API returns the following results:
|
||||||
},
|
},
|
||||||
"description" : "Maximum priced ecommerce data by customer_id in Asia",
|
"description" : "Maximum priced ecommerce data by customer_id in Asia",
|
||||||
"settings" : { },
|
"settings" : { },
|
||||||
"version" : "7.5.0",
|
"retention_policy" : {
|
||||||
"create_time" : 1576094542936
|
"time" : {
|
||||||
|
"field" : "order_date",
|
||||||
|
"max_age" : "30d"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
|
@ -265,49 +265,57 @@ When the {transform} is updated, you receive the updated configuration:
|
||||||
[source,console-result]
|
[source,console-result]
|
||||||
----
|
----
|
||||||
{
|
{
|
||||||
"id": "simple-kibana-ecomm-pivot",
|
"id" : "simple-kibana-ecomm-pivot",
|
||||||
"source": {
|
"authorization" : {
|
||||||
"index": ["kibana_sample_data_ecommerce"],
|
"roles" : [
|
||||||
"query": {
|
"superuser"
|
||||||
"term": {
|
]
|
||||||
"geoip.continent_name": {
|
},
|
||||||
"value": "Asia"
|
"version" : "8.4.0",
|
||||||
|
"create_time" : 1656113450613,
|
||||||
|
"source" : {
|
||||||
|
"index" : [
|
||||||
|
"kibana_sample_data_ecommerce"
|
||||||
|
],
|
||||||
|
"query" : {
|
||||||
|
"term" : {
|
||||||
|
"geoip.continent_name" : {
|
||||||
|
"value" : "Asia"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pivot": {
|
"dest" : {
|
||||||
"group_by": {
|
"index" : "kibana_sample_data_ecommerce_transform_v2",
|
||||||
"customer_id": {
|
"pipeline" : "add_timestamp_pipeline"
|
||||||
"terms": {
|
},
|
||||||
"field": "customer_id"
|
"frequency" : "15m",
|
||||||
|
"sync" : {
|
||||||
|
"time" : {
|
||||||
|
"field" : "order_date",
|
||||||
|
"delay" : "120s"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pivot" : {
|
||||||
|
"group_by" : {
|
||||||
|
"customer_id" : {
|
||||||
|
"terms" : {
|
||||||
|
"field" : "customer_id"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"aggregations": {
|
"aggregations" : {
|
||||||
"max_price": {
|
"max_price" : {
|
||||||
"max": {
|
"max" : {
|
||||||
"field": "taxful_total_price"
|
"field" : "taxful_total_price"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "Maximum priced ecommerce data by customer_id in Asia",
|
"description" : "Maximum priced ecommerce data by customer_id in Asia",
|
||||||
"dest": {
|
"settings" : { }
|
||||||
"index": "kibana_sample_data_ecommerce_transform_v2",
|
|
||||||
"pipeline": "add_timestamp_pipeline"
|
|
||||||
},
|
|
||||||
"frequency": "15m",
|
|
||||||
"sync": {
|
|
||||||
"time": {
|
|
||||||
"field": "order_date",
|
|
||||||
"delay": "120s"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settings": { },
|
|
||||||
"version": "7.5.0",
|
|
||||||
"create_time": 1518808660505
|
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
// TESTRESPONSE[s/"version": "7.5.0"/"version": $body.version/]
|
// TESTRESPONSE[s/"version" : "8.4.0"/"version" : $body.version/]
|
||||||
// TESTRESPONSE[s/"create_time": 1518808660505/"create_time": $body.create_time/]
|
// TESTRESPONSE[s/"create_time" : 1656113450613/"create_time" : $body.create_time/]
|
||||||
|
// TESTRESPONSE[s/"authorization" : \{[^}]*\},//]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue