You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Table/API/RestAPI-V1_apache.md
+42-19Lines changed: 42 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,34 +31,57 @@ enable_rest_service=true
31
31
```
32
32
33
33
## 2. Authentication
34
+
35
+
All RESTful APIs adopt **Basic Authentication**, except the health check interface `/ping`.
36
+
All requests must carry the `Authorization` information in the request header.
34
37
35
-
Except for the health check endpoint `/ping`, the RESTful service uses basic authentication. Each URL request must include the header `'Authorization':'Basic' + base64.encode(username + ':' + password)`.
36
-
37
-
In the example, the username is `root` and the password is `root`. The corresponding Basic authentication header format is:
38
-
39
-
```Properties
40
-
Authorization : Basic cm9vdDpyb290
38
+
1. Authentication Format
41
39
```
40
+
Authorization: Basic <base64_string>
41
+
```
42
+
The `<base64_string>` is generated by directly Base64-encoding the string in the format `username:password`.
43
+
Quick generation methods are shown below:
42
44
43
-
- If the username or password authentication fails, the following information is returned:
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Table/API/RestAPI-V1_timecho.md
+40-17Lines changed: 40 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,33 +34,56 @@ enable_rest_service=true
34
34
35
35
## 2. Authentication
36
36
37
-
Except for the health check endpoint `/ping`, the RESTful service uses basic authentication. Each URL request must include the header `'Authorization':'Basic' + base64.encode(username + ':' + password)`.
37
+
All RESTful APIs adopt **Basic Authentication**, except the health check interface `/ping`.
38
+
All requests must carry the `Authorization` information in the request header.
38
39
39
-
In the example, the username is `root` and the password is `root`. The corresponding Basic authentication header format is:
40
-
41
-
```Properties
42
-
Authorization : Basic cm9vdDpyb290
40
+
1. Authentication Format
43
41
```
42
+
Authorization: Basic <base64_string>
43
+
```
44
+
The `<base64_string>` is generated by directly Base64-encoding the string in the format `username:password`.
45
+
Quick generation methods are shown below:
44
46
45
-
- If the username or password authentication fails, the following information is returned:
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/API/RestServiceV1_apache.md
+39-22Lines changed: 39 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,39 +33,56 @@ RESTful services are disabled by default.
33
33
```
34
34
35
35
## 2. Authentication
36
-
Except the liveness probe API `/ping`, RESTful services use the basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
37
36
38
-
The username used in the following examples is: `root`, and password is: `root`.
37
+
All RESTful services require **Basic authentication** except the health check interface `/ping`. An `Authorization` header must be carried in all requests.
39
38
40
-
And the authorization header is
39
+
1. Authentication Format
40
+
```
41
+
Authorization: Basic <base64_string>
42
+
```
43
+
Where `<base64_string>` is the Base64 encoding result of the string formatted as `username:password`. Quick generation methods are as follows:
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/API/RestServiceV1_timecho.md
+37-32Lines changed: 37 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,48 +26,53 @@ Note: As of version V2.0.8.2, the TimechoDB installation package does not includ
26
26
27
27
## 1. Enable RESTful Services
28
28
29
-
RESTful services are disabled by default.
29
+
All RESTful services require **Basic authentication** except the health check interface `/ping`. An `Authorization` header must be carried in all requests.
30
30
31
-
Find the `conf/conf/iotdb-system.properties` file under the IoTDB installation directory and set `enable_rest_service` to `true` to enable the module.
31
+
1. Authentication Format
32
+
```
33
+
Authorization: Basic <base64_string>
34
+
```
35
+
Where `<base64_string>` is the Base64 encoding result of the string formatted as `username:password`. Quick generation methods are as follows:
32
36
33
-
```properties
34
-
enable_rest_service=true
35
-
```
37
+
* Linux/macOS
38
+
```bash
39
+
echo -n "your_username:your_password"| base64
40
+
Example: echo -n "root:TimechoDB@2021"| base64
41
+
```
36
42
37
-
## 2. Authentication
38
-
Except the liveness probe API `/ping`, RESTful services use the basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/API/RestServiceV2_apache.md
+38-22Lines changed: 38 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,39 +33,55 @@ RESTful services are disabled by default.
33
33
```
34
34
35
35
## 2. Authentication
36
-
Except the liveness probe API `/ping`, RESTful services use the basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
37
36
38
-
The username used in the following examples is: `root`, and password is: `root`.
37
+
All RESTful services require **Basic authentication** except the health check interface `/ping`. An `Authorization` header must be carried in all requests.
39
38
40
-
And the authorization header is
39
+
1. Authentication Format
40
+
```
41
+
Authorization: Basic <base64_string>
42
+
```
43
+
Where `<base64_string>` is the Base64 encoding result of the string formatted as `username:password`. Quick generation methods are as follows:
0 commit comments