Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Calling an Open API

Updated on 2023-07-26 GMT+08:00

Overview

After an API is published in an environment, it can be called by other users. API calling operations vary depending on the authentication mode used by the API.

Obtaining API Request Information

Before calling an API, you need to obtain the API request information from the API provider, including the access domain name, request protocol, request method, request path, and request parameters.

Obtain the request authentication information based on the authentication mode used by an API.

  • App:
    • Signature authentication: Obtain the key and secret of the integration application (or client AppKey and AppSecret) authorized by the API from the API provider as well as the SDK for calling the API.
    • Simple authentication: Obtain the AppCode of the client authorized by the API from the API provider.
    • Other authentication modes: Obtain the key and secret of the integration application (or client AppKey and AppSecret) authorized by the API from the API provider.
  • The account credential (password or AK/SK) of the cloud service platform is used for authentication. If the AK/SK is used for authentication, you also need to obtain the SDK for calling the API from the API provider.
  • Custom: Obtain the custom authentication information to be carried in the request parameters from the API provider.
  • None: No authentication information is required.
NOTE:

If you use the default subdomain name allocated by the system to access an API, you can access the API for a maximum of 1000 times every day.

Calling an API

  1. Set the parameters related to the request address.

    Scenario

    API Request Parameter Configuration

    Using a domain name to call an API

    ROMA Connect allows APIs to be called using the subdomain name assigned to the API group or the domain name bound to the API group. No additional configuration is required.

    Using an IP address to call an API in the DEFAULT group

    ROMA Connect allows you to use IP addresses to call APIs in the DEFAULT group. No additional configuration is required.

    Using an IP address to call an API in groups except DEFAULT

    • The app_route parameter has been set to on on the Configuration Parameters tab page of a ROMA Connect instance, indicating that an API can be called by using an IP address.
    • ROMA Connect does not allow APIs in non-DEFAULT groups to be directly called using IP addresses. The header parameter X-HW-ID must be added to the request message, and the value must be the key or client AppKey of the integration application authorized by the API.
  2. Set the authentication parameters.

    Authentication Mode

    API Request Parameter Configuration

    App authentication (signature authentication)

    Use the obtained SDK to sign the API request. For details, see Using App Authentication to Call APIs.

    App authentication (simple authentication)

    Add the header parameter X-Apig-AppCode to the API request. The parameter value is the AppCode obtained in Obtaining API Request Information.

    App authentication (app_secret authentication)

    • On the Configuration Parameters tab page of a ROMA Connect instance, the app_secret parameter has been set to on (indicating that app_secret authentication is enabled) and app_api_key has been set to off (indicating that app_api_key authentication is disabled).
    • Add the header parameter X-HW-ID to the API request. The parameter value is the key of the integration application authorized for the API or the client's AppKey.
    • Add the header parameter X-HW-AppKey to the API request. The parameter value is the secret or AppSecret obtained in Obtaining API Request Information.

    App authentication (app_basic authentication)

    • The app_basic parameter has been set to on on the Configuration Parameters tab page of a ROMA Connect instance, indicating that app_basic authentication is enabled.
    • Add the header parameter Authorization to the API request. The value is "Basic "+base64(appkey+":"+appsecret), in which appkey and appsecret are the key and secret (or AppKey and AppSecret) obtained in Obtaining API Request Information.

    App authentication (two-factor authentication)

    An API request carries authentication information of both app authentication and custom authentication.

    authentication (token authentication)

    Obtain the token of the cloud service platform and carry the token in the API request for authentication.

    authentication (AK/SK authentication)

    When calling an API, use the obtained SDK to sign the API request. For details, see AK/SK Authentication.

    authentication (two-factor authentication)

    An API request carries authentication information of both IAM authentication and custom authentication.

    Custom

    Based on the definition of custom authentication, the related authentication information is carried in the API request parameters for authentication.

    None

    No authentication is required, and the API can be directly called.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback