HTTP Status Code

This document defines the specification of HTTP return code for the JPush REST API. The new version of the JPush Push API v3 API meets this specification. The JPush Report API also satisfies this specification.

Definition of Status Code

Code Description Detailed Explanation
200 OK Success!
400 Wrong Request This request is invalid. The corresponding description information will explain the reason.
401 Unverified No verification information or verification failed
403 Rejected Understand the request but it is not accepted. The corresponding description information will explain the reason.
404 Not Found The resource does not exist, the requested user does not exist, and the format of the request is not supported.
405 Unsuitable request method The interface does not support requests for this method.
410 Has been offline The requested resource has gone offline. Please refer to the relevant announcement.
429 Excessive requests The request exceeded the frequency limit. The corresponding description information will explain the specific reason.
500 Internal service error There was an error inside the server. Please contact us to solve the problem as soon as possible.
502 Invalid proxy The business server is offline or upgrading. Please try again later.
503 Temporary service failure The server could not respond to the request. Please try again later.
504 Agent timeout The server is running, but it cannot respond to the request. Please try again later.

Compliance with the specifications

  • 200 must be correct. Do not use 200 return codes for all exceptions
  • Errors in business logic. Use 4xx as much as possible if there are special error codes, otherwise use 400.
  • Internal server error. Use 500 if there is no special error code.
  • When the business is abnormal, the returned content defines the error information by using the JSON format.

Documentation Reference


Copyright 2011-2018, jiguang.cn, All Rights Reserved.
粤ICP备12056275号-13 深圳市和讯华谷信息技术有限公司

Documentation built with MkDocs.