Open API and SDK
New in version 2.6.4
DataFlux Func provides complete Open API support, which can be invoked programmatically using the companion DataFlux Func SDK.
1. Enable the Open API Documentation Page
In the "Experimental Features" section, you can enable the Open API documentation page.
The DataFlux Func SDK includes signing capability and is distributed as a single file. Users can directly add it to their project for use.
2. Create an Access Key
- Log in to your DataFlux Func
- Enable Access Key management in "Admin / Experimental Features"
- In "Admin / Access Key", click "New" to create an Access Key
3. Use the SDK to Send Requests
The DataFlux Func SDK supports multiple programming languages. The download URLs are as follows:
| Language | Download URL | Description |
|---|---|---|
| Python | dataflux_func_sdk.py | Single file; basic usage has no dependencies. The upload feature depends on the requests library |
| Node.js | dataflux_func_sdk.js | Single file; basic usage has no dependencies. The upload feature depends on the form-data library |
| Golang | dataflux_func_sdk.go | Single file, completely dependency-free Demo: dataflux_func_sdk_demo.go |
An example of sending requests is as follows:
| Python | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
| JavaScript | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
| Go | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |