This returns all hive stand for the currently logged in user. Important to understand is that a user can go back into the past at any point in time (how did my stand look like a month or a year ago), so the cloud stores multiple versions of stand metadata. Any PUT request will create a new version.
curl -X GET \
\
-H "Accept: application/json" \
"https://api.queensaver.com/v1/stands?uuid=41C0FE2F-EB0C-45B4-8842-C117E47C35E3&epoch=1639170002&secondsInThePast=7200&userId=1234"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: cookieAuth
ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
cookieAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.setApiKeyPrefix("Token");
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
String qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either the cookie or this Q-Token must be set to be authorized for the API call.
Long epoch = 1639170002; // Long | The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW()
Long secondsInThePast = 7200; // Long | How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values.
String token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either this cookie or the Q-Token must be set to be authorized for the API call.
String uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3; // String | The UUID of the stand. If not set, the request will return all stands.
Long userId = 1234; // Long | The UserID is set internally and can not set or be overridden with the API request. Please ignore.
try {
get-stands-response result = apiInstance.standsGet(qToken, epoch, secondsInThePast, token, uuid, userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#standsGet");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either the cookie or this Q-Token must be set to be authorized for the API call.
Long epoch = 1639170002; // Long | The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW()
Long secondsInThePast = 7200; // Long | How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values.
String token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either this cookie or the Q-Token must be set to be authorized for the API call.
String uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3; // String | The UUID of the stand. If not set, the request will return all stands.
Long userId = 1234; // Long | The UserID is set internally and can not set or be overridden with the API request. Please ignore.
try {
get-stands-response result = apiInstance.standsGet(qToken, epoch, secondsInThePast, token, uuid, userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#standsGet");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // Either the cookie or this Q-Token must be set to be authorized for the API call. (default to null)
Long *epoch = 1639170002; // The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW() (default to null)
Long *secondsInThePast = 7200; // How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values. (default to null)
String *token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // Either this cookie or the Q-Token must be set to be authorized for the API call. (optional) (default to null)
String *uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3; // The UUID of the stand. If not set, the request will return all stands. (optional) (default to null)
Long *userId = 1234; // The UserID is set internally and can not set or be overridden with the API request. Please ignore. (optional) (default to null)
// Get Stand metadata
[apiInstance standsGetWith:qToken
epoch:epoch
secondsInThePast:secondsInThePast
token:token
uuid:uuid
userId:userId
completionHandler: ^(get-stands-response output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var QueensaverApi = require('queensaver_api');
var defaultClient = QueensaverApi.ApiClient.instance;
// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['token'] = "Token";
// Create an instance of the API class
var api = new QueensaverApi.DefaultApi()
var qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // {String} Either the cookie or this Q-Token must be set to be authorized for the API call.
var epoch = 1639170002; // {Long} The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW()
var secondsInThePast = 7200; // {Long} How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values.
var opts = {
'token': 8B0FE5CF-C096-4B3E-8748-27906B4A9449, // {String} Either this cookie or the Q-Token must be set to be authorized for the API call.
'uuid': 41C0FE2F-EB0C-45B4-8842-C117E47C35E3, // {String} The UUID of the stand. If not set, the request will return all stands.
'userId': 1234 // {Long} The UserID is set internally and can not set or be overridden with the API request. Please ignore.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.standsGet(qToken, epoch, secondsInThePast, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class standsGetExample
{
public void main()
{
// Configure API key authorization: cookieAuth
Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");
// Create an instance of the API class
var apiInstance = new DefaultApi();
var qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either the cookie or this Q-Token must be set to be authorized for the API call. (default to null)
var epoch = 1639170002; // Long | The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW() (default to null)
var secondsInThePast = 7200; // Long | How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values. (default to null)
var token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either this cookie or the Q-Token must be set to be authorized for the API call. (optional) (default to null)
var uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3; // String | The UUID of the stand. If not set, the request will return all stands. (optional) (default to null)
var userId = 1234; // Long | The UserID is set internally and can not set or be overridden with the API request. Please ignore. (optional) (default to null)
try {
// Get Stand metadata
get-stands-response result = apiInstance.standsGet(qToken, epoch, secondsInThePast, token, uuid, userId);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.standsGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either the cookie or this Q-Token must be set to be authorized for the API call.
$epoch = 1639170002; // Long | The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW()
$secondsInThePast = 7200; // Long | How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values.
$token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String | Either this cookie or the Q-Token must be set to be authorized for the API call.
$uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3; // String | The UUID of the stand. If not set, the request will return all stands.
$userId = 1234; // Long | The UserID is set internally and can not set or be overridden with the API request. Please ignore.
try {
$result = $api_instance->standsGet($qToken, $epoch, $secondsInThePast, $token, $uuid, $userId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->standsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; # String | Either the cookie or this Q-Token must be set to be authorized for the API call.
my $epoch = 1639170002; # Long | The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW()
my $secondsInThePast = 7200; # Long | How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values.
my $token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; # String | Either this cookie or the Q-Token must be set to be authorized for the API call.
my $uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3; # String | The UUID of the stand. If not set, the request will return all stands.
my $userId = 1234; # Long | The UserID is set internally and can not set or be overridden with the API request. Please ignore.
eval {
my $result = $api_instance->standsGet(qToken => $qToken, epoch => $epoch, secondsInThePast => $secondsInThePast, token => $token, uuid => $uuid, userId => $userId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->standsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449 # String | Either the cookie or this Q-Token must be set to be authorized for the API call. (default to null)
epoch = 1639170002 # Long | The Unix Time (epoch) that defines the end time of the query. The beginning is defined by the secondsInThePast parameter. If unset, the epoch will be set to NOW() (default to null)
secondsInThePast = 7200 # Long | How many seconds we go to the past to return data versions. If set to zero, we will return exactly one version. If set to non-zero, we will return all results from the past as well, up to 100 values. (default to null)
token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449 # String | Either this cookie or the Q-Token must be set to be authorized for the API call. (optional) (default to null)
uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3 # String | The UUID of the stand. If not set, the request will return all stands. (optional) (default to null)
userId = 1234 # Long | The UserID is set internally and can not set or be overridden with the API request. Please ignore. (optional) (default to null)
try:
# Get Stand metadata
api_response = api_instance.stands_get(qToken, epoch, secondsInThePast, token=token, uuid=uuid, userId=userId)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->standsGet: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let qToken = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String
let epoch = 1639170002; // Long
let secondsInThePast = 7200; // Long
let token = 8B0FE5CF-C096-4B3E-8748-27906B4A9449; // String
let uuid = 41C0FE2F-EB0C-45B4-8842-C117E47C35E3; // String
let userId = 1234; // Long
let mut context = DefaultApi::Context::default();
let result = client.standsGet(qToken, epoch, secondsInThePast, token, uuid, userId, &context).wait();
println!("{:?}", result);
}