Preparations for Using an SDK
- Download an SDK and import it to a local development tool.
- Log in to the DataArts Studio console.
- Click DataArts DataService.
- In the navigation pane, choose DataArts DataService Exclusive > SDKs.
- On the SDKs page, download an SDK.
- Verify integrity of the SDK. In Windows, open the CLI and run the following command to generate the SHA-256 value of the downloaded SDK. In the command, D:\java-sdk.zip is an example local path and name of the SDK. Replace it with the actual value.
certutil -hashfile D:\java-sdk.zip SHA256
The following is an example command output:
SHA-256 hash value of D:\java-sdk.zip 3a86f1ba249a00727db506e4075ec9630e6cf74f312bddf6c3901c9d0786f53e CertUtil: -hashfile command executed. 3a86f1ba249a00727db506e4075ec9630e6cf74f312bddf6c3901c9d0786f53e
Compare the SHA-256 value of the downloaded SDK with that provided in the following table. If they are the same, no tampering or packet loss occurred during the package download.
Table 1 SDK packages and the corresponding SHA-256 values Language
SHA-256 Value of the SDK
Java
3a86f1ba249a00727db506e4075ec9630e6cf74f312bddf6c3901c9d0786f53e
Go
23734867eae2e7ef61427c64aa33aa89512571946f2f43a1a5fef5e801e3129f
Python
57636d8bacc459cab9dc08c70d01ccc42391ace60e6960c4e947566da1dc5d26
C#
e5a3b677f75c28ba3f1e16645d8171f7b6f34a42143f8a32a68bb18719b5e65d
JavaScript
442ac2fcb41d84525dc0139ec3f05d190e4e337cdbcdfdfc82a09d79d2ecd25e
PHP
2cc76bd2ecd48f00899d18b0f76d05ce2623065180f111c3f70ac14ddf0506f3
C++
2a54c3f2486d562ea6af1384eca40b301918bdc02f98bbf2c114f282dc059c00
C
4957556c108e0174d55b4b8d720f296967a9367ca54010792b1b3de039b87363
Android
0fdcc6fd93a68dce5c3e1b8e6370cc9340429cabfb0f268c3f9e5ea05238ae96
- Prepare the parameters of the request message.
Table 2 Parameters Type
Description
Example
Path parameter
The path parameter is part of the URL. Use it to replace the parameter in {} in the URL.
Parameter: param = xxx
Original URL: http://Domain name/p1/{param}/p2
Actual URL: http://Domain name/p1/xxx/p2
Query parameter
The query parameter is a supplementary part of the URL.
Parameter: param = xxx
Parameter 2: param2 = xxx2
Example 1:
Add the query parameter to a method (use the SDK of each language as an example).
Example: request.addQueryStringParam("param"," xxx");
Example 2:
Add a question mark (?) and the parameter to the end of the URL. If there are multiple parameters, separate them by ampersands (&).
Original URL: http://Domain name/p1
Actual URL: http://Domain name/p1?param=xxx¶m2=xxx2
Header parameter
The header parameter is part of the request header. The parameter name is case insensitive.
Parameter: param = xxx
Add a header parameter to a method or add a header parameter when constructing a request (subject to the SDK of each language).
Example: request.addHeader("param"," xxx");
Body parameter
The request body parameter is a JSON string in the SDK. This parameter is unavailable in earlier versions.
"{}"
- Modify the SDK and obtain the signature parameter Authorization in the request header after the request is signed. In addition, add the x-Authorization parameter with the same value as Authorization. For details about how to obtain the Authorization parameter and add the x-Authorization parameter, see Preparation.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot