Thank you very much, i never used that notation.

El 25/09/2014 11:58, Sam Corbett escribió:
> Hi,
> 
> You need to access properties of API with spaces in their name with
> square bracket notation. For example, to get the entity sensors api you
> should write API["Entity Sensors"].
> 
> As Aled referenced, we use Swagger and Swagger UI to populate the API
> documentation within the Brooklyn web console. You can refer to
> apidoc.js [1] to see how we invoke Swagger.
> 
> Sam
> 
> 1.
> https://github.com/apache/incubator-brooklyn/blob/4b02716b09f91938649daf6774b7bf3de2e2801e/usage/jsgui/src/main/webapp/assets/js/view/apidoc.js#L52-72
> 
> 
> On 25/09/2014 08:41, Adrián Nieto wrote:
>>
>> Hello, I'm currently developing a sample of a monitoring dashboard fed
>> with  Brooklyn's Sensors for the SeaClouds project. In order to connect
>> to the backend, I'm using Swagger.JS
>>
>> Getting the list of deployed applications and their entities is pretty
>> straightforward:
>>
>>      var API = new SwaggerApi({
>>          basePath: BROOKLYN_ENDPOINT,
>>          discoveryUrl: BROOKLYN_ENDPOINT + "/v1/apidoc",
>>          success: refreshUI,
>>          fail: checkBackendStatus
>>      })
>>
>>
>> After calling the success function, the application list can be
>> retrieved by using for example
>> "API.Applications.applicationTree(params,success,fail)"
>>
>> However, I'm not able to find anything related with the sensor
>> information, because it only provides the following subAPIs:
>> "Activities, Applications, Catalog, Entities, Locations, Scripting,
>> Server, Usage and Version".
>>
>> The remaining subAPIs (API Documentation, Access Control, Entity Config,
>> Entity Effectors, Entity Policies, Entity Policy Config, Entity Sensors)
>> are missing. Probably it will be due the whitespaces in the name.
>>
>> Anyone could point me in the right direction? Maybe i should fill a JIRA
>> Issue?
>>
>> Thank you very much.
>>
>>
>>
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to