Updated on 2024-04-29 GMT+08:00

Overview

This document provides guidance for API callers to call data APIs using the DataArts DataService SDK code. Currently, the DataArts DataService SDK code can only be used to call APIs.

Introduction to the DataArts DataService SDK

This type of SDK is encapsulated based on the data APIs created in DataArts DataService of DataArts Studio. By invoking the sample code provided by the SDK, you can call the data APIs in DataArts DataService to obtain open data easily and quickly.

Application Scenarios

The authentication mode of data APIs determines whether they can be called using a DataArts DataService SDK. If an API uses the app authentication mode, the API can only be called using an SDK. If an API uses any other authentication mode, the API can be called using a tool or SDK.
  • App authentication: App authentication is used for calling an API. The AppKey & AppSecret is used for authentication. It is highly secure.

    When App authentication is used, an SDK is required for access. Java, Go, Python, JavaScript, C#, PHP, C++, C, and Android SDKs are available. For details about how to call APIs in each language, see Calling APIs Through App Authentication.

  • IAM authentication: IAM authenticates API requests. This mode is available only for Huawei cloud users. The security level is medium.

    When using IAM authentication, you need to call the Obtaining a User Token API of IAM to obtain a token, add the X-Auth-Token parameter with the obtained token as the value to the request header, and use an API calling tool or SDK to call released APIs.

  • Non-authentication: No authentication is required. This mode allows all users to access APIs, which may pose security risks. It is recommended only for testing APIs. If the caller is not a trusted user, there is a risk of data leakage, breakdowns caused by high concurrent access, SQL injection, and others.

    This mode does not require any authentication information. You can use an API calling tool or SDK to directly call an API by specifying required parameters.