Skip to content

Commit

Permalink
📝 add api status code description
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <[email protected]>
  • Loading branch information
vankichi committed May 26, 2022
1 parent f3f0823 commit 7a706ba
Show file tree
Hide file tree
Showing 7 changed files with 856 additions and 619 deletions.
154 changes: 85 additions & 69 deletions docs/api/insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,26 @@ Inset RPC is the method to add a new single vector.
```

- Insert.Request
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|vector|Object.Vector| | \* | the information of vector |
|config|Config| | \* | the configuration of the insert request |

| field | type | label | required | desc. |
| :----: | :------------ | :---- | :------: | :-------------------------------------- |
| vector | Object.Vector | | \* | the information of vector |
| config | Config | | \* | the configuration of the insert request |

- Insert.Config
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|skip_strict_exist_check|bool| | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
|timestamp|int64| | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
|filters|Filter.Config| | | configuration for filter |

| field | type | label | required | desc. |
| :---------------------: | :------------ | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | Filter.Config | | | configuration for filter |

- Object.Vector
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|id|string| | \* | the ID of a vector. ID should consist of 1 or more characters. |
|vector|float| repeated(Array[float]) | \* | the vector data. its dimension is between 2 and 65,536.|

| field | type | label | required | desc. |
| :----: | :----- | :--------------------- | :------: | :------------------------------------------------------------- |
| id | string | | \* | the ID of a vector. ID should consist of 1 or more characters. |
| vector | float | repeated(Array[float]) | \* | the vector data. its dimension is between 2 and 65,536. |

### Output

Expand All @@ -78,11 +81,12 @@ Inset RPC is the method to add a new single vector.
```

- Object.Location
|field|type|label|desc.|
|:---:|:---|:---|:---|
|name|string| | the name of vald agent pod where the request vector is inserted. |
|uuid|string| | the ID of the inserted vector. It is the same as an `Object.Vector`. |
|ips|string| repeated(Array[string]) | the IP list of `vald-agent` pods where the request vector is inserted. |

| field | type | label | desc. |
| :---: | :----- | :---------------------- | :--------------------------------------------------------------------- |
| name | string | | the name of vald agent pod where the request vector is inserted. |
| uuid | string | | the ID of the inserted vector. It is the same as an `Object.Vector`. |
| ips | string | repeated(Array[string]) | the IP list of `vald-agent` pods where the request vector is inserted. |

### Status Code

Expand Down Expand Up @@ -126,23 +130,26 @@ It's the recommended method to insert the large amount of vectors.
```

- Insert.Request
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|vector|Object.Vector| | \* | the information of vector |
|config|Config| | \* | the configuration of the insert request |

| field | type | label | required | desc. |
| :----: | :------------ | :---- | :------: | :-------------------------------------- |
| vector | Object.Vector | | \* | the information of vector |
| config | Config | | \* | the configuration of the insert request |

- Insert.Config
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|skip_strict_exist_check|bool| | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
|timestamp|int64| | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
|filters|Filter.Config| | | configuration for filter |

| field | type | label | required | desc. |
| :---------------------: | :------------ | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | Filter.Config | | | configuration for filter |

- Object.Vector
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|id|string| | \* | the ID of the vector. ID should consist of 1 or more characters. |
|vector|float| repeated(Array[float]) | \* | the vector data. its dimension is between 2 and 65,536. |

| field | type | label | required | desc. |
| :----: | :----- | :--------------------- | :------: | :--------------------------------------------------------------- |
| id | string | | \* | the ID of the vector. ID should consist of 1 or more characters. |
| vector | float | repeated(Array[float]) | \* | the vector data. its dimension is between 2 and 65,536. |

### Output

Expand All @@ -166,24 +173,27 @@ It's the recommended method to insert the large amount of vectors.
```

- Object.StreamLocation
|field|type|label|desc.|
|:---:|:---|:---|:---|
|location|Object.Location| | the information of `Object.Location` data. |
|status|google.rpc.Status| | the status of google RPC. |

| field | type | label | desc. |
| :------: | :---------------- | :---- | :----------------------------------------- |
| location | Object.Location | | the information of `Object.Location` data. |
| status | google.rpc.Status | | the status of google RPC. |

- Object.Location
|field|type|label|desc.|
|:---:|:---|:---|:---|
|name|string| | the name of vald agent pod where the request vector is inserted. |
|uuid|string| | the ID of the inserted vector. It is the same as an `Object.Vector`. |
|ips|string| repeated(Array[string]) | the IP list of `vald-agent` pods where the request vector is inserted. |

| field | type | label | desc. |
| :---: | :----- | :---------------------- | :--------------------------------------------------------------------- |
| name | string | | the name of vald agent pod where the request vector is inserted. |
| uuid | string | | the ID of the inserted vector. It is the same as an `Object.Vector`. |
| ips | string | repeated(Array[string]) | the IP list of `vald-agent` pods where the request vector is inserted. |

- [google.rpc.Status](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
|field|type|label|desc.|
|:---:|:---|:---|:---|
|code|int32| | status code (code list is next section)|
|message|string| | error message |
|details|google.protobuf.Any| repeated(Array[any]) | the details error message list|

| field | type | label | desc. |
| :-----: | :------------------ | :------------------- | :-------------------------------------- |
| code | int32 | | status code (code list is next section) |
| message | string | | error message |
| details | google.protobuf.Any | repeated(Array[any]) | the details error message list |

### Status Code

Expand Down Expand Up @@ -232,28 +242,32 @@ Please be careful that the size of the request exceed the limit.
```

- Insert.MultiRequest
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|requests|Insert.Request| repeated(Array[Insert.Request]) | \* | the request list |

| field | type | label | required | desc. |
| :------: | :------------- | :------------------------------ | :------: | :--------------- |
| requests | Insert.Request | repeated(Array[Insert.Request]) | \* | the request list |

- Insert.Request
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|vector|Object.Vector| | \* | the information of vector |
|config|Config| | \* | the configuration of the insert request |

| field | type | label | required | desc. |
| :----: | :------------ | :---- | :------: | :-------------------------------------- |
| vector | Object.Vector | | \* | the information of vector |
| config | Config | | \* | the configuration of the insert request |

- Insert.Config
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|skip_strict_exist_check|bool| | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
|timestamp|int64| | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
|filters|Filter.Config| | | configuration for filter |

| field | type | label | required | desc. |
| :---------------------: | :------------ | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | Filter.Config | | | configuration for filter |

- Object.Vector
|field|type|label|required|desc.|
|:---:|:---|:---|:---:|:---|
|id|string| | \* | the ID of a vector. ID should consist of 1 or more characters. |
|vector|float| repeated(Array[float]) | \* | the vector data. its dimension is between 2 and 65,536.|

| field | type | label | required | desc. |
| :----: | :----- | :--------------------- | :------: | :------------------------------------------------------------- |
| id | string | | \* | the ID of a vector. ID should consist of 1 or more characters. |
| vector | float | repeated(Array[float]) | \* | the vector data. its dimension is between 2 and 65,536. |

### Output

Expand All @@ -272,16 +286,18 @@ Please be careful that the size of the request exceed the limit.
```

- Object.Locations
|field|type|label|desc.|
|:---:|:---|:---|:---|
|location|Object.Location| repeated(Array[Object.Location]) | the list of `Object.Location`. |

| field | type | label | desc. |
| :------: | :-------------- | :------------------------------- | :----------------------------- |
| location | Object.Location | repeated(Array[Object.Location]) | the list of `Object.Location`. |

- Object.Location
|field|type|label|desc.|
|:---:|:---|:---|:---|
|name|string| | the name of vald agent pod where the request vector is inserted. |
|uuid|string| | the ID of the inserted vector. It is the same as an `Object.Vector`. |
|ips|string| repeated(Array[string]) | the IP list of `vald-agent` pods where the request vector is inserted. |

| field | type | label | desc. |
| :---: | :----- | :---------------------- | :--------------------------------------------------------------------- |
| name | string | | the name of vald agent pod where the request vector is inserted. |
| uuid | string | | the ID of the inserted vector. It is the same as an `Object.Vector`. |
| ips | string | repeated(Array[string]) | the IP list of `vald-agent` pods where the request vector is inserted. |

### Status Code

Expand Down
Loading

0 comments on commit 7a706ba

Please sign in to comment.