Skip to content

Commit

Permalink
feat: update restful about
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanshuyou committed Sep 20, 2024
1 parent d23ca1f commit 3d22419
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
15 changes: 7 additions & 8 deletions API_Reference_MDX/milvus-restful/v2.2.x/About.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ The prefix of an API endpoint should always be the URI of your Milvus instance,

The following is the API endpoint used to list collections in a Milvus cluster.

export const code = `export MILVUS_HOST="http://localhost"
```shell
export MILVUS_HOST="http://localhost"
export MILVUS_PORT=19530
export TOKEN="root:Milvus"

curl --request GET \
--url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/collections" \
--header "Authorization: Bearer ${TOKEN}" \
--header "accept: application/json" \
--header "content-type: application/json"
`

<CodeBlock children={code} />
--url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/collections" \
--header "Authorization: Bearer ${TOKEN}" \
--header "accept: application/json" \
--header "content-type: application/json"
```

## Authentication credentials

Expand Down
14 changes: 7 additions & 7 deletions API_Reference_MDX/milvus-restful/v2.3.x/About.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ The following is the API endpoint used to list collections in a Milvus cluster.
export const code1 =`export CLUSTER_ENDPOINT="http://localhost:19530"
curl --request GET \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header 'accept: application/json' \
--header 'content-type: application/json'`
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header 'accept: application/json' \
--header 'content-type: application/json'`

<CodeBlock children={code1} />

## Authentication credentials

With default settings, you do not need to provide any authentication credentials to access the API endpoints. However, if you have enabled authentication in your Milvus instance, you need to provide the correct credentials in the request header. You can use a token as the authentication method when you access the API endpoints. To obtain a token, you should use a colon (:) to concatenate the username and password that you use to access your Milvus instance. For example, `root:milvus`.

export const code2 = `export CLUSTER_ENDPOINT="http://localhost:19530"
```shell
export CLUSTER_ENDPOINT="http://localhost:19530"
export TOKEN="root:milvus"

curl --request GET \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header "Authorization: Bearer ${TOKEN}" \
--header 'accept: application/json' \
--header 'content-type: application/json'`

<CodeBlock children={code2} />
--header 'content-type: application/json'
```

## API endpoint versioning

Expand Down
16 changes: 8 additions & 8 deletions API_Reference_MDX/milvus-restful/v2.4.x/About.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ The prefix of an API endpoint should always be the URI of your Milvus instance,

The following is the API endpoint used to list collections in a Milvus cluster.

export const code1 =`export CLUSTER_ENDPOINT="http://localhost:19530"
```shell
export CLUSTER_ENDPOINT="http://localhost:19530"

curl --request GET \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header 'accept: application/json' \
--header 'content-type: application/json'`

<CodeBlock children={code1} />
--header 'content-type: application/json'
```

## Authentication credentials

With default settings, you do not need to provide any authentication credentials to access the API endpoints. However, if you have enabled authentication in your Milvus instance, you need to provide the correct credentials in the request header. You can use a token as the authentication method when you access the API endpoints. To obtain a token, you should use a colon (:) to concatenate the username and password that you use to access your Milvus instance. For example, `root:milvus`.

export const code2 = `export CLUSTER_ENDPOINT="http://localhost:19530"
```shell
export CLUSTER_ENDPOINT="http://localhost:19530"
export TOKEN="root:milvus"

curl --request GET \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header "Authorization: Bearer ${TOKEN}" \
--header 'accept: application/json' \
--header 'content-type: application/json'`

<CodeBlock children={code2} />
--header 'content-type: application/json'
```

## API endpoint versioning

Expand Down

0 comments on commit 3d22419

Please sign in to comment.