Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-20

FIWARE.Request.Tech.Apps.ApplicationMashup.HowToSubscribeToOrion

    Details

    • HD-Chapter:
      Apps
    • HD-Enabler:
      Wirecloud

      Description

      Buenos días,

      Estoy intentando generar una subscripcion desde un operator del wireCloud y
      necesitaría anadir una cabecera oauth en la request. esta parte no me esta
      funcionando muy bien y querría saber como debería hacerlo...

      Hasta ahora, el codigo para la subscripcipon es:

      var doInitialSubscription = function doInitialSubscription() {

      ngsi_server = MashupPlatform.prefs.get('ngsi_server');
      ngsi_proxy = MashupPlatform.prefs.get('ngsi_proxy');

      /*
      connection = new NGSI.Connection(ngsi_server,

      { ngsi_proxy_url: ngsi_proxy }

      );
      */

      connection = new NGSI.Connection(ngsi_server, {
      requestHeaders:

      {X-Auth-Token: 'Em_RZ3UvtN9EJedfQrJCX-sA60NSwr9mk6tNha5n3EsmZypfLQ'}

      });

      var entityIdList = [

      {type: 'pragmation', id: '.*', isPattern: true}

      ];
      var attributeList = ['aciertos'];
      var duration = 'P1M';
      var throttling = null;
      var notifyConditions = [

      { type: 'ONTIMEINTERVAL', condValues: ['PT10S'] }

      ];
      var options = {
      flat: true,
      onNotify: process_entities,
      onSuccess: function (data)

      { //ngsi_subscriptionId = data.subscriptionId; //ngsi_refresh_interval = setInterval(refreshNGSISubscription, 1000 * 60 * 60 * 2); // each 2 hours }

      };
      connection.createSubscription(entityIdList, attributeList,
      duration, throttling, notifyConditions, options);
      };

      Gracias de antemano por vuestra atención.

      Un saludo,
      Juan Carlos Hdez.

      _______________________________________________
      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-lab-help

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        To Do To Do Open Open
        28d 1h 28m 1 Manuel Escriche 22/Oct/14 4:01 PM
        Open Open In Progress In Progress
        11d 21h 14m 1 Álvaro Arranz 03/Nov/14 12:16 PM
        In Progress In Progress Done Done
        4s 1 Álvaro Arranz 03/Nov/14 12:16 PM
        Done Done Closed Closed
        434d 20h 52m 1 Manuel Escriche 12/Jan/16 9:08 AM

          People

          • Assignee:
            aarranz Álvaro Arranz
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: