Skip to content

Commit

Permalink
Merge pull request #952 from milvus-io/restful-mdx
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
AnthonyTsu1984 authored Sep 19, 2024
2 parents c97c6c0 + 74575e7 commit dc1f7c8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions API_Reference_MDX/milvus-restful/v2.3.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.

```shell
export CLUSTER_ENDPOINT="http://localhost:19530"
export const code1 =`export CLUSTER_ENDPOINT="http://localhost:19530"
curl --request GET \
--url '${CLUSTER_ENDPOINT}/v2/vectordb/collections/list' \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header 'accept: application/json' \
--header 'content-type: 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`.

```shell
export CLUSTER_ENDPOINT="http://localhost:19530"
export const code2 = `export CLUSTER_ENDPOINT="http://localhost:19530"
export TOKEN="root:milvus"
curl --request GET \
--url '${CLUSTER_ENDPOINT}/v2/vectordb/collections/list' \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header "Authorization: Bearer ${TOKEN}" \
--header 'accept: application/json' \
--header 'content-type: application/json'
```
--header 'content-type: application/json'`

<CodeBlock children={code2} />

## API endpoint versioning

Expand Down
20 changes: 10 additions & 10 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.

```shell
export CLUSTER_ENDPOINT="http://localhost:19530"
export const code1 =`export CLUSTER_ENDPOINT="http://localhost:19530"
curl --request GET \
--url '${CLUSTER_ENDPOINT}/v2/vectordb/collections/list' \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header 'accept: application/json' \
--header 'content-type: 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`.

```shell
export CLUSTER_ENDPOINT="http://localhost:19530"
export const code2 = `export CLUSTER_ENDPOINT="http://localhost:19530"
export TOKEN="root:milvus"
curl --request GET \
--url '${CLUSTER_ENDPOINT}/v2/vectordb/collections/list' \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/list" \
--header "Authorization: Bearer ${TOKEN}" \
--header 'accept: application/json' \
--header 'content-type: application/json'
```
--header 'content-type: application/json'`

<CodeBlock children={code2} />

## API endpoint versioning

Expand Down

0 comments on commit dc1f7c8

Please sign in to comment.