This article introduces the detailed description of the public request and response headers of the AnQiCMS interface.
Common Request Headers (Common Request Headers)
AnQiCMS's RESTful interface uses some common request headers, which can be used by all API requests, and the detailed definition can be seen in the table below.
| name | Type | Example value | description |
|---|---|---|---|
| Token | string | eyJhbGciOiJIUzI1NiIsIn…. | Authentication information used to verify the legality of requests in non-anonymous requests. There are two types of tokens, one is used for importing documents, obtained through the background import function, and the other is used for user operations, obtained through the JSON returned by the user login interface. Default value: none |
| Site-Id | int | 1 | Site ID. Default value: none |
| Content-Length | int | 556 | RFC 2616The length of the defined HTTP request content. Default value: none |
| Content-Type | string | application/ | RFC 2616The content type of the defined HTTP request. Default value: none |
| Date | string | Wed, 08 Jul 2020 07:05:05 GMT | The GMT time specified in HTTP 1.1 protocol. Default value: none |
| Host | string | api.anqicms.com | RFC 2616Defined in the Host field of the HTTP request header. Default value: none |
| Accept | string | application/ | RFC 2616The Accept field of the defined HTTP request header. Default value: none |
Common Response Headers
AnQiCMS's RESTful interface uses some common response headers, which can be used by all API requests. Detailed definitions can be found in the table below.
| name | Type | Example value | description |
|---|---|---|---|
| Update-Token | string | eyJhbGciOiJIUzI1NiIsIn…. | When the Token is about to expire, the program will issue a new Token through the header to maintain the validity of the Token, preventing the user who is accessing from being required to log in again due to the Token expiration.The Token is valid for only 1 hour. Please receive the Update-token and replace the original Token for storage use. Default value: none |
| Content-Length | int | 556 | RFC 2616The length of the defined HTTP request content. Default value: none |
| Content-Type | string | application/ | RFC 2616The content type of the defined HTTP request. Default value: none |
| Date | string | Wed, 08 Jul 2020 07:05:05 GMT | The GMT time specified in HTTP 1.1 protocol. Default value: none |
| Connection | string | keep-alive | RFC 2616Defined in the HTTP request header's Connection field. Default value: none |