Needs review
Project:
Views JSON Query
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2016 at 14:26 UTC
Updated:
28 Nov 2017 at 22:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ChristianWespire commentedCreated a patch for review
Comment #3
lquessenberry commented@ChristianWespire Do you mind giving an example of how this works? I am interested.
Comment #4
ChristianWespire commentedThis patch adds a field to the views_json_query settings page (in a view) where you can fill in an api key. This api key will be sent as header with the HTTP request to the endpoint.
This is useful when you have another Drupal instance with services enabled, and you want to use this module to decode the JSON. If you use Services API Token Authentication as authentication procedure, you need to sent an API-KEY with the HTTP header.
Comment #5
lquessenberry commented@ChristianWespire
This doesn't seem to want to work for me unfortunately. The only way I can get it to work is to append the API key as an argument in the URL.
Comment #6
ChristianWespire commentedThat will work as well, but if you update Services module to the latest version, passing the API key via the URL isn't supported anymore.
Comment #7
mpaler commentedThanks for this patch, works perfectly, except new field isn't exportable. I've re-rolled it to include declaration of new form field so it's picked up by Features/view export.
Comment #8
mpaler commentedOne more re-roll tweak so you don't need to save an API key into your codebase, but rather you can set it via a variable_set (or similar method).
Comment #9
mpaler commentedThree's a charm. Please use this patch. Permits using both variable_set or UI to set API key.