Re: [atlas] Querying your own measurements

2016-01-27 Thread Robert Kisteleki
Hi,

>> Can you provide your use case here? What's the purpose for getting a list of
>> your on measurements from a script? Shouldn't your scripts already know
>> about the measurements they started? :-)
>>
> 
> That's usually the case, except when a there is a user interruption of
> the script, a strange failure case or any other that prevents the script
> to save the list of measurements at the right time :)

That can indeed happen -- though one would hope it is really an exception.

We have two other kinds of API keys requested earlier and in the pipeline,
so adding this third one is probably a minor increment in effort needed :-)
However, since we're about to make the v2 API official and eventually remove
v1, we'll most likely do this in the new version.

Cheers,
Robert





Re: [atlas] Querying your own measurements

2016-01-26 Thread Robert Kisteleki

On 2016-01-26 0:41, Sebastian Castro wrote:
> Hi:
> 
> I'm currently testing the API to get a list of my own measurements. The
> API here reports
> 
> ---
> Querying for Your Own Measurements
> 
> In order to limit the results to your measurements only, just add a
> mine=true argument. For example:
> 
>   /api/v1/measurement/?mine=true
> Note that this only works if you're logged in, otherwise the result is
> the same as for any unauthenticated user.
> ---
> 
> This seems to imply you need to manage a session within your code to get
> your own measurements, which I think violates the principle of a REST
> API. If you have the API key that provides you with access, shouldn't be
> reasonable to run the call as
> 
>  /api/v1/measurement/?mine=true=API_KEY
> 
> and get a list of your own measurements?
> 
> Thoughts? Am I reading the documentation in the wrong way?
> 
> Thanks in advance

Hi,

Can you provide your use case here? What's the purpose for getting a list of
your on measurements from a script? Shouldn't your scripts already know
about the measurements they started? :-)

Cheers,
Robert



Re: [atlas] Querying your own measurements

2016-01-26 Thread Sebastian Castro
Hi Robert,

On 27/01/16 1:11 AM, Robert Kisteleki wrote:
> 
> On 2016-01-26 0:41, Sebastian Castro wrote:
>> Hi:
>>
>> I'm currently testing the API to get a list of my own measurements. The
>> API here reports
>>
>> ---
>> Querying for Your Own Measurements
>>
>> In order to limit the results to your measurements only, just add a
>> mine=true argument. For example:
>>
>>   /api/v1/measurement/?mine=true
>> Note that this only works if you're logged in, otherwise the result is
>> the same as for any unauthenticated user.
>> ---
>>
>> This seems to imply you need to manage a session within your code to get
>> your own measurements, which I think violates the principle of a REST
>> API. If you have the API key that provides you with access, shouldn't be
>> reasonable to run the call as
>>
>>  /api/v1/measurement/?mine=true=API_KEY
>>
>> and get a list of your own measurements?
>>
>> Thoughts? Am I reading the documentation in the wrong way?
>>
>> Thanks in advance
> 
> Hi,
> 
> Can you provide your use case here? What's the purpose for getting a list of
> your on measurements from a script? Shouldn't your scripts already know
> about the measurements they started? :-)
> 

That's usually the case, except when a there is a user interruption of
the script, a strange failure case or any other that prevents the script
to save the list of measurements at the right time :)

Cheers,

> Cheers,
> Robert
> 

-- 
Sebastian Castro
Technical Research Manager
NZRS Ltd.
desk: +64 4 495 2337
mobile: +64 21 400535