Service REST API Overview

Last updated:2021-12-15
Expand all
Service REST API Overview

JMLink Providing compliance REST Normative HTTP APIto enable developers to call remotely JMLink ProvidedVIPServices.

At the same time, for use by developers JMLink APIAlso providedDevelopment packages in a variety of commonly used programming languages SDK)


VIP Functions

JMLink Yes VIP Provides exclusive REST API function, if you need experience, pleaseContact sales

REST API Basic constraints

  • API Designed to match HTTP,REST Regulation. For example, a search request is used Get Method, submission of request for use Post Method. If a request is not matched HTTP The way, will return the error.
  • In the absence of a special description, the call parameter value shall be converted to:UTF-8,URL Encode
  • API Request.Frequency limit

API Resource List

Name Resources Base URL
Short-chain queries GET /v1/links https://api.jmlk.co
Short-chain statistics GET /v1/links/{link_key}/stat https://api.jmlk.co

Authentication

Jiguang REST API Adopt HTTP Basic authentication.

The basic approach is:HTTP HeaderRiga. Authorization:

Authorization: Basic ${base64_auth_string}

The header name is "Authorization" and the value is the Base64-encoded "username:password. Yes.JMLink API In the scene,username is appKeyThe password is... masterSecret These two can... JMLink Web The console applies settings to view. Namely, above base64_auth_string The generation algorithm is:base64(appKey:masterSecret)

Examples of jurisdiction

Yours. appKey Yes "7d431e42dfa6a6d693ac2d04", masterSecret Yes "5e987ac6d2e04d95a9d8f0d1", when calling short-chain queries, use curl If so, say:

curl --insecure -X GET -v https://api.jpush.cn/v1/links?page_index=1&page_size=20 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"
          curl --insecure -X GET -v https://api.jpush.cn/v1/links?page_index=1&page_size=20
-u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"

        
This code block is shown in the floating window

HTTP The requests are:

> GET /v1/links HTTP/1.1 > Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
          > GET /v1/links HTTP/1.1
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==

        
This code block is shown in the floating window

API Frequency Control

JMLink API Frequency control of the number of visits. It's a time window.API The number of calls allowed is limited.

Frequency definition

Within a time window, currently defined as: 1 minute. Each AppKey API Call number.

Each API The frequency is as follows:

API Type Frequency (min/min)
Short-chain queries 100
Short-chain statistics 500

Return Code

If the request fails,API returns as follows: JSON Return code and description for format

{ "error": { "code": *****, "message": "*****" } }
          {
 "error": {
 "code": *****,
 "message": "*****"
 }
}

        
This code block is shown in the floating window

REST API Return Code Sum

HTTP CODE CODE MESSAGE DESC
200 3000 success Request succeeded
400 3001 missing auth auth empty
401 3002 auth failed auth Authentication failed
400 3003 missing body body empty
403 3004 invalid body body Invalid
400 3005 parameter invalid Parameter error
403 3006 out of freq Request Overfrequency
404 3007 api not found API does not exist
405 3008 request method not support Request method not supported
405 3009 app in black Apply blacklisted
405 3010 this is vip function, pls contact to sales@jiguang.cn vipFunction, pleaseContact salesConsultantsvipFunctions
500 3011 server error Service-end anomaly

If your application is blacklisted, send an email to support@jiguang.cn Further communication and coordination.

Was this document helpful?

Copyright 2011-2026, jiguang.cn, All Rights Reserved. 粤ICP备12056275号-13 Shenzhen Hexun Huagu Information Technology Co., Ltd.

Open in Docs Center