123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- @top MultipleRequests { (Authorization space)? Request+ }
- Request { ( HTTPMethod " " URL space Body space*) | HTTPMethod " " URL space* }
- Authorization {
- ("TOKEN" " " UnquotedString) | ("TOKEN=" '"' UnquotedString '"')
- }
- HTTPMethod {
- "GET" | "POST" | "PUT" | "DELETE"
- }
- URL {
- Resource API
- }
- Resource {
- "/v2/vectordb/"
- }
- API {
- Aliases | Collections | Databases | Partitions | Jobs | Indexes | ResourceGroups | Roles | Users | Vectors
- }
- Aliases {
- "aliases/" ("alter" | "create" | "describe" | "drop" | "list")
- }
- Databases {
- "databases/" ("alter" | "create" | "describe" | "drop_properties" | "drop" | "list")
- }
- Collections {
- "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")
- }
- Partitions {
- "partitions/" ("create" | "drop" | "get_stats" | "has" | "list" | "load" | "release")
- }
- Jobs {
- "jobs/" ("import/create" | "import/describe" | "import/list")
- }
- Indexes {
- "indexes/" ("alter_properties" | "create" | "describe" | "drop_properties" | "drop" | "list")
- }
- ResourceGroups {
- "resource_groups/" ("create" | "describe" | "drop" | "list" | "transfer_replica" | "alter")
- }
- Roles {
- "roles/" ("create" | "describe" | "drop" | "grant_privilege" | "list" | "revoke_privilege")
- }
- Users {
- "users/" ("create" | "describe" | "drop" | "grant_role" | "list" | "revoke_role" | "update_password")
- }
- Vectors {
- "entities/" ("delete" | "get" | "hybrid_search" | "insert" | "query" | "search" | "upsert")
- }
- Body {
- "{" (Property ("," Property)*)? "}"
- }
- Property {
- space* Identifier space* ":" space* Value space*
- }
- Value {
- String
- | Number
- | Boolean
- | "null"
- | Body
- | Array
- }
- Array {
- "[" (space* Value space* ("," space* Value space*)*)? "]"
- }
- @tokens {
- LineComment { "#" ![\n]* space+ }
- String {
- '"' (![\\\n"] | "\\" _)* '"'?
- }
- UnquotedString {
- $[a-zA-Z0-9_:-]+
- }
- Identifier { String }
- number {
- (@digit+ ("." @digit*)? | "." @digit+) (("e" | "E") ("+" | "-")? @digit+)? |
- "0x" (@digit | $[a-fA-F])+ |
- "0b" $[01]+ |
- "0o" $[0-7]+
- }
- Number { number | "-" number }
- Boolean { "true" | "false" }
- space { @whitespace+ }
- }
- @skip {
- LineComment
- }
|