milvus.http.grammar 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. @top MultipleRequests { (Authorization space)? Request+ }
  2. Request { ( HTTPMethod " " URL space Body space*) | HTTPMethod " " URL space* }
  3. Authorization {
  4. ("TOKEN" " " UnquotedString) | ("TOKEN=" '"' UnquotedString '"')
  5. }
  6. HTTPMethod {
  7. "GET" | "POST" | "PUT" | "DELETE"
  8. }
  9. URL {
  10. Resource API
  11. }
  12. Resource {
  13. "/v2/vectordb/"
  14. }
  15. API {
  16. Aliases | Collections | Databases | Partitions | Jobs | Indexes | ResourceGroups | Roles | Users | Vectors
  17. }
  18. Aliases {
  19. "aliases/" ("alter" | "create" | "describe" | "drop" | "list")
  20. }
  21. Databases {
  22. "databases/" ("alter" | "create" | "describe" | "drop_properties" | "drop" | "list")
  23. }
  24. Collections {
  25. "collections/" ("fields/alter_properties" | "alter_properties" | "compact" | "create" | "describe" | "drop_properties" | "drop" | "flush" | "get_load_state" | "get_stats" | "has" | "list" | "load" | "release" | "rename" | "refresh_load")
  26. }
  27. Partitions {
  28. "partitions/" ("create" | "drop" | "get_stats" | "has" | "list" | "load" | "release")
  29. }
  30. Jobs {
  31. "jobs/" ("import/create" | "import/describe" | "import/list")
  32. }
  33. Indexes {
  34. "indexes/" ("alter_properties" | "create" | "describe" | "drop_properties" | "drop" | "list")
  35. }
  36. ResourceGroups {
  37. "resource_groups/" ("create" | "describe" | "drop" | "list" | "transfer_replica" | "alter")
  38. }
  39. Roles {
  40. "roles/" ("create" | "describe" | "drop" | "grant_privilege" | "list" | "revoke_privilege")
  41. }
  42. Users {
  43. "users/" ("create" | "describe" | "drop" | "grant_role" | "list" | "revoke_role" | "update_password")
  44. }
  45. Vectors {
  46. "entities/" ("delete" | "get" | "hybrid_search" | "insert" | "query" | "search" | "upsert")
  47. }
  48. Body {
  49. "{" (Property ("," Property)*)? "}"
  50. }
  51. Property {
  52. space* Identifier space* ":" space* Value space*
  53. }
  54. Value {
  55. String
  56. | Number
  57. | Boolean
  58. | "null"
  59. | Body
  60. | Array
  61. }
  62. Array {
  63. "[" (space* Value space* ("," space* Value space*)*)? "]"
  64. }
  65. @tokens {
  66. LineComment { "#" ![\n]* space+ }
  67. String {
  68. '"' (![\\\n"] | "\\" _)* '"'?
  69. }
  70. UnquotedString {
  71. $[a-zA-Z0-9_:-]+
  72. }
  73. Identifier { String }
  74. number {
  75. (@digit+ ("." @digit*)? | "." @digit+) (("e" | "E") ("+" | "-")? @digit+)? |
  76. "0x" (@digit | $[a-fA-F])+ |
  77. "0b" $[01]+ |
  78. "0o" $[0-7]+
  79. }
  80. Number { number | "-" number }
  81. Boolean { "true" | "false" }
  82. space { @whitespace+ }
  83. }
  84. @skip {
  85. LineComment
  86. }