Created
September 7, 2016 04:17
-
-
Save travist/838f5cf5255b74111cef6075188dedc9 to your computer and use it in GitHub Desktop.
Form.io Submission Index Requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This will request all submissions where they provided "Smith" in the Last Name field. | |
| * | |
| * GET - https://yourproject.form.io/yourform/submission?data.lastName=Smith | |
| */ | |
| var request = require("request"); | |
| var options = { | |
| method: 'GET', | |
| url: 'https://yourproject.form.io/yourform/submission', | |
| qs: {'data.lastName': 'Smith'}, | |
| headers: { | |
| 'x-jwt-token': '--- ENTER JWT TOKEN HERE ---', | |
| 'content-type': 'application/json' | |
| } | |
| json: true | |
| }; | |
| request(options, function (error, response, body) { | |
| if (error) throw new Error(error); | |
| console.log(body); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This will request all submissions. | |
| * | |
| * GET - https://yourproject.form.io/yourform/submission | |
| */ | |
| var request = require("request"); | |
| var options = { | |
| method: 'GET', | |
| url: 'https://yourproject.form.io/yourform/submission', | |
| headers: { | |
| 'x-jwt-token': '--- ENTER JWT TOKEN HERE ---', | |
| 'content-type': 'application/json' | |
| } | |
| json: true | |
| }; | |
| request(options, function (error, response, body) { | |
| if (error) throw new Error(error); | |
| console.log(body); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment