Kintone Proxy -
Runs an external API that lies outside of Kintone.
kintone.proxy(url, method, headers, data, callback, errback)
|url||String||Yes||The request URL.|
|method||String||Yes||The HTTP method. Specify one of the following: GET / POST / PUT / DELETE.|
|headers||Object||Yes||Specify the request header as an object. To ignore this parameter, input
|data||Object or String||Yes||The data that will be sent in the request.To ignore this parameter, input
Applied only for POST/PUT requests. Ignored for GET/DELETE requests.
For GET/DELETE requests, set the parameter on the QueryString of the URL instead.
|callback||Function||Optional||The callback function that will run once the request to the other end of the proxy has finished. It will receive the response body (string), the status code (number) and the response header (object) as parameters from the external API.
If ignored, a kintone.Promise object will be returned that can be fulfilled with an array containing a Response body (string), Status code (number) and Response header (object).
|errback||Function||Optional||The callback function that will run when the API request to the other end of the proxy fails. It will receive the response body (string) as the parameter from the external API.
If the callback is ignored, a kintone.Promise object will be returned that can be fulfilled with the Response body (string) from the proxy API.
kintone.Promise object will be returned if the callback parameter is ignored. Otherwise, there will be no response.
Sample Request using Promises
- This API can be used on both Desktops and Smartphones.
- This API cannot be initiated from apps attached to bodies of Spaces/Threads/Announcements.
- The site on the other end of the proxy will not automatically issue cookies.
- The maximum lines of the response header from the other end of the proxy is 100 lines, and the maximum size for each line is 8192 bytes.
- The maximum size of the response body from the other end of the proxy is 10MB.
- Errors will occur if lines or sizes go over the maximum.
- Any kind of Content-type can be used.