|
| 1 | +{ |
| 2 | + "ml.find_file_structure":{ |
| 3 | + "documentation":{ |
| 4 | + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html", |
| 5 | + "description":"Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch." |
| 6 | + }, |
| 7 | + "stability":"experimental", |
| 8 | + "visibility":"public", |
| 9 | + "headers":{ |
| 10 | + "accept": [ "application/json"], |
| 11 | + "content_type": ["application/x-ndjson"] |
| 12 | + }, |
| 13 | + "url":{ |
| 14 | + "paths":[ |
| 15 | + { |
| 16 | + "path":"/_ml/find_file_structure", |
| 17 | + "methods":[ |
| 18 | + "POST" |
| 19 | + ], |
| 20 | + "deprecated":{ |
| 21 | + "version":"7.12.0", |
| 22 | + "description":"This endpoint has changed to _text_structure/find_structure, please use that API instead" |
| 23 | + } |
| 24 | + } |
| 25 | + ] |
| 26 | + }, |
| 27 | + "params":{ |
| 28 | + "lines_to_sample":{ |
| 29 | + "type":"int", |
| 30 | + "description":"How many lines of the file should be included in the analysis", |
| 31 | + "default":1000 |
| 32 | + }, |
| 33 | + "line_merge_size_limit":{ |
| 34 | + "type":"int", |
| 35 | + "description":"Maximum number of characters permitted in a single message when lines are merged to create messages.", |
| 36 | + "default":10000 |
| 37 | + }, |
| 38 | + "timeout":{ |
| 39 | + "type":"time", |
| 40 | + "description":"Timeout after which the analysis will be aborted", |
| 41 | + "default":"25s" |
| 42 | + }, |
| 43 | + "charset":{ |
| 44 | + "type":"string", |
| 45 | + "description":"Optional parameter to specify the character set of the file" |
| 46 | + }, |
| 47 | + "format":{ |
| 48 | + "type":"enum", |
| 49 | + "options":[ |
| 50 | + "ndjson", |
| 51 | + "xml", |
| 52 | + "delimited", |
| 53 | + "semi_structured_text" |
| 54 | + ], |
| 55 | + "description":"Optional parameter to specify the high level file format" |
| 56 | + }, |
| 57 | + "has_header_row":{ |
| 58 | + "type":"boolean", |
| 59 | + "description":"Optional parameter to specify whether a delimited file includes the column names in its first row" |
| 60 | + }, |
| 61 | + "column_names":{ |
| 62 | + "type":"list", |
| 63 | + "description":"Optional parameter containing a comma separated list of the column names for a delimited file" |
| 64 | + }, |
| 65 | + "delimiter":{ |
| 66 | + "type":"string", |
| 67 | + "description":"Optional parameter to specify the delimiter character for a delimited file - must be a single character" |
| 68 | + }, |
| 69 | + "quote":{ |
| 70 | + "type":"string", |
| 71 | + "description":"Optional parameter to specify the quote character for a delimited file - must be a single character" |
| 72 | + }, |
| 73 | + "should_trim_fields":{ |
| 74 | + "type":"boolean", |
| 75 | + "description":"Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them" |
| 76 | + }, |
| 77 | + "grok_pattern":{ |
| 78 | + "type":"string", |
| 79 | + "description":"Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file" |
| 80 | + }, |
| 81 | + "timestamp_field":{ |
| 82 | + "type":"string", |
| 83 | + "description":"Optional parameter to specify the timestamp field in the file" |
| 84 | + }, |
| 85 | + "timestamp_format":{ |
| 86 | + "type":"string", |
| 87 | + "description":"Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format" |
| 88 | + }, |
| 89 | + "explain":{ |
| 90 | + "type":"boolean", |
| 91 | + "description":"Whether to include a commentary on how the structure was derived", |
| 92 | + "default":false |
| 93 | + } |
| 94 | + }, |
| 95 | + "body":{ |
| 96 | + "description":"The contents of the file to be analyzed", |
| 97 | + "required":true, |
| 98 | + "serialize":"bulk" |
| 99 | + } |
| 100 | + } |
| 101 | +} |
0 commit comments