Location via proxy:   
[Report a bug]   [Manage cookies]                

Taplytics Universal API

Bucketing

bucketingGet

Get Experiments and Variations for the user.

Returns a key/value pairing of all experiments that the user has been segmented into, as well as the variation the users are assigned. If there are no experiments currently being delivered to the user, an empty response will be returned.


/bucketing

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://universal-api.taplytics.com/v1/bucketing?token=token_example&user_id=userId_example&verbose=true&attributes=&customData=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BucketingApi;

import java.io.File;
import java.util.*;

public class BucketingApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        BucketingApi apiInstance = new BucketingApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object
        Boolean verbose = true; // Boolean | Flag to return object of experiments and variations with variables

        try {
            apiInstance.bucketingGet(token, userId, attributes, customData, verbose);
        } catch (ApiException e) {
            System.err.println("Exception when calling BucketingApi#bucketingGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final UserAttributes attributes = new UserAttributes(); // UserAttributes | serialized attributes object
final Object customData = new Object(); // Object | serialized custom data object
final Boolean verbose = new Boolean(); // Boolean | Flag to return object of experiments and variations with variables

try {
    final result = await api_instance.bucketingGet(token, userId, attributes, customData, verbose);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->bucketingGet: $e\n');
}

import org.openapitools.client.api.BucketingApi;

public class BucketingApiExample {
    public static void main(String[] args) {
        BucketingApi apiInstance = new BucketingApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object
        Boolean verbose = true; // Boolean | Flag to return object of experiments and variations with variables

        try {
            apiInstance.bucketingGet(token, userId, attributes, customData, verbose);
        } catch (ApiException e) {
            System.err.println("Exception when calling BucketingApi#bucketingGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
BucketingApi *apiInstance = [[BucketingApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
UserAttributes *attributes = ; // serialized attributes object (default to null)
Object *customData = Object; // serialized custom data object (default to null)
Boolean *verbose = true; // Flag to return object of experiments and variations with variables (optional) (default to null)

// Get Experiments and Variations for the user.
[apiInstance bucketingGetWith:token
    userId:userId
    attributes:attributes
    customData:customData
    verbose:verbose
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.BucketingApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var attributes = ; // {UserAttributes} serialized attributes object
var customData = Object; // {Object} serialized custom data object
var opts = {
  'verbose': true // {Boolean} Flag to return object of experiments and variations with variables
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.bucketingGet(token, userId, attributes, customData, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class bucketingGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new BucketingApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var attributes = new UserAttributes(); // UserAttributes | serialized attributes object (default to null)
            var customData = new Object(); // Object | serialized custom data object (default to null)
            var verbose = true;  // Boolean | Flag to return object of experiments and variations with variables (optional)  (default to null)

            try {
                // Get Experiments and Variations for the user.
                apiInstance.bucketingGet(token, userId, attributes, customData, verbose);
            } catch (Exception e) {
                Debug.Print("Exception when calling BucketingApi.bucketingGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\BucketingApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$attributes = ; // UserAttributes | serialized attributes object
$customData = Object; // Object | serialized custom data object
$verbose = true; // Boolean | Flag to return object of experiments and variations with variables

try {
    $api_instance->bucketingGet($token, $userId, $attributes, $customData, $verbose);
} catch (Exception $e) {
    echo 'Exception when calling BucketingApi->bucketingGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::BucketingApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::BucketingApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $attributes = ; # UserAttributes | serialized attributes object
my $customData = Object; # Object | serialized custom data object
my $verbose = true; # Boolean | Flag to return object of experiments and variations with variables

eval {
    $api_instance->bucketingGet(token => $token, userId => $userId, attributes => $attributes, customData => $customData, verbose => $verbose);
};
if ($@) {
    warn "Exception when calling BucketingApi->bucketingGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.BucketingApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
attributes =  # UserAttributes | serialized attributes object (default to null)
customData = Object # Object | serialized custom data object (default to null)
verbose = true # Boolean | Flag to return object of experiments and variations with variables (optional) (default to null)

try:
    # Get Experiments and Variations for the user.
    api_instance.bucketing_get(token, userId, attributes, customData, verbose=verbose)
except ApiException as e:
    print("Exception when calling BucketingApi->bucketingGet: %s\n" % e)
extern crate BucketingApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let attributes = ; // UserAttributes
    let customData = Object; // Object
    let verbose = true; // Boolean

    let mut context = BucketingApi::Context::default();
    let result = client.bucketingGet(token, userId, attributes, customData, verbose, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
verbose
Boolean
Flag to return object of experiments and variations with variables
attributes*
UserAttributes
serialized attributes object
Required
customData*
Object
serialized custom data object
Required

Responses


bucketingPost

Get Experiments and Variations for the user.

Returns a key/value pairing of all experiments that the user has been segmented into, as well as the variation the users are assigned. If there are no experiments currently being delivered to the user, an empty response will be returned.


/bucketing

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/jason" \
 "https://universal-api.taplytics.com/v1/bucketing?token=token_example&user_id=userId_example&verbose=true" \
 -d 'Custom MIME type example not yet supported: application/jason'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BucketingApi;

import java.io.File;
import java.util.*;

public class BucketingApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        BucketingApi apiInstance = new BucketingApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        Boolean verbose = true; // Boolean | Flag to return object of experiments and variations with variables
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.bucketingPost(token, userId, verbose, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling BucketingApi#bucketingPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final Boolean verbose = new Boolean(); // Boolean | Flag to return object of experiments and variations with variables
final UserAttributesWithCustomData userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData | 

try {
    final result = await api_instance.bucketingPost(token, userId, verbose, userAttributesWithCustomData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->bucketingPost: $e\n');
}

import org.openapitools.client.api.BucketingApi;

public class BucketingApiExample {
    public static void main(String[] args) {
        BucketingApi apiInstance = new BucketingApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        Boolean verbose = true; // Boolean | Flag to return object of experiments and variations with variables
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.bucketingPost(token, userId, verbose, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling BucketingApi#bucketingPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
BucketingApi *apiInstance = [[BucketingApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
Boolean *verbose = true; // Flag to return object of experiments and variations with variables (optional) (default to null)
UserAttributesWithCustomData *userAttributesWithCustomData = ; //  (optional)

// Get Experiments and Variations for the user.
[apiInstance bucketingPostWith:token
    userId:userId
    verbose:verbose
    userAttributesWithCustomData:userAttributesWithCustomData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.BucketingApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var opts = {
  'verbose': true, // {Boolean} Flag to return object of experiments and variations with variables
  'userAttributesWithCustomData':  // {UserAttributesWithCustomData} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.bucketingPost(token, userId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class bucketingPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new BucketingApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var verbose = true;  // Boolean | Flag to return object of experiments and variations with variables (optional)  (default to null)
            var userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData |  (optional) 

            try {
                // Get Experiments and Variations for the user.
                apiInstance.bucketingPost(token, userId, verbose, userAttributesWithCustomData);
            } catch (Exception e) {
                Debug.Print("Exception when calling BucketingApi.bucketingPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\BucketingApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$verbose = true; // Boolean | Flag to return object of experiments and variations with variables
$userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

try {
    $api_instance->bucketingPost($token, $userId, $verbose, $userAttributesWithCustomData);
} catch (Exception $e) {
    echo 'Exception when calling BucketingApi->bucketingPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::BucketingApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::BucketingApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $verbose = true; # Boolean | Flag to return object of experiments and variations with variables
my $userAttributesWithCustomData = WWW::OPenAPIClient::Object::UserAttributesWithCustomData->new(); # UserAttributesWithCustomData | 

eval {
    $api_instance->bucketingPost(token => $token, userId => $userId, verbose => $verbose, userAttributesWithCustomData => $userAttributesWithCustomData);
};
if ($@) {
    warn "Exception when calling BucketingApi->bucketingPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.BucketingApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
verbose = true # Boolean | Flag to return object of experiments and variations with variables (optional) (default to null)
userAttributesWithCustomData =  # UserAttributesWithCustomData |  (optional)

try:
    # Get Experiments and Variations for the user.
    api_instance.bucketing_post(token, userId, verbose=verbose, userAttributesWithCustomData=userAttributesWithCustomData)
except ApiException as e:
    print("Exception when calling BucketingApi->bucketingPost: %s\n" % e)
extern crate BucketingApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let verbose = true; // Boolean
    let userAttributesWithCustomData = ; // UserAttributesWithCustomData

    let mut context = BucketingApi::Context::default();
    let result = client.bucketingPost(token, userId, verbose, userAttributesWithCustomData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
userAttributesWithCustomData

All user attributes and optional custom data

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
verbose
Boolean
Flag to return object of experiments and variations with variables

Responses


Config

configGet

Get Verbose Project Config Document for User

Returns the entire configuration for the project. This is the document that captures all experiment information for the entire project, such as segmentation and active code variables. Extremely verbose and should be used for debugging.


/config

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://universal-api.taplytics.com/v1/config?token=token_example&user_id=userId_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ConfigApi;

import java.io.File;
import java.util.*;

public class ConfigApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ConfigApi apiInstance = new ConfigApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user

        try {
            Object result = apiInstance.configGet(token, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#configGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user

try {
    final result = await api_instance.configGet(token, userId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->configGet: $e\n');
}

import org.openapitools.client.api.ConfigApi;

public class ConfigApiExample {
    public static void main(String[] args) {
        ConfigApi apiInstance = new ConfigApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user

        try {
            Object result = apiInstance.configGet(token, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#configGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ConfigApi *apiInstance = [[ConfigApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)

// Get Verbose Project Config Document for User
[apiInstance configGetWith:token
    userId:userId
              completionHandler: ^(Object output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.ConfigApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.configGet(token, userId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class configGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ConfigApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)

            try {
                // Get Verbose Project Config Document for User
                Object result = apiInstance.configGet(token, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ConfigApi.configGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ConfigApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user

try {
    $result = $api_instance->configGet($token, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->configGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ConfigApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ConfigApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user

eval {
    my $result = $api_instance->configGet(token => $token, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConfigApi->configGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ConfigApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)

try:
    # Get Verbose Project Config Document for User
    api_response = api_instance.config_get(token, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigApi->configGet: %s\n" % e)
extern crate ConfigApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String

    let mut context = ConfigApi::Context::default();
    let result = client.configGet(token, userId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required

Responses


configPost

Get Verbose Project Config Document for User

Returns the entire configuration for the project. This is the document that captures all experiment information for the entire project, such as segmentation and active code variables. Extremely verbose and should be used for debugging.


/config

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://universal-api.taplytics.com/v1/config?token=token_example&user_id=userId_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ConfigApi;

import java.io.File;
import java.util.*;

public class ConfigApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ConfigApi apiInstance = new ConfigApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user

        try {
            Object result = apiInstance.configPost(token, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#configPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user

try {
    final result = await api_instance.configPost(token, userId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->configPost: $e\n');
}

import org.openapitools.client.api.ConfigApi;

public class ConfigApiExample {
    public static void main(String[] args) {
        ConfigApi apiInstance = new ConfigApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user

        try {
            Object result = apiInstance.configPost(token, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConfigApi#configPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ConfigApi *apiInstance = [[ConfigApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)

// Get Verbose Project Config Document for User
[apiInstance configPostWith:token
    userId:userId
              completionHandler: ^(Object output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.ConfigApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.configPost(token, userId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class configPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ConfigApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)

            try {
                // Get Verbose Project Config Document for User
                Object result = apiInstance.configPost(token, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ConfigApi.configPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ConfigApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user

try {
    $result = $api_instance->configPost($token, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->configPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ConfigApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ConfigApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user

eval {
    my $result = $api_instance->configPost(token => $token, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConfigApi->configPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ConfigApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)

try:
    # Get Verbose Project Config Document for User
    api_response = api_instance.config_post(token, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigApi->configPost: %s\n" % e)
extern crate ConfigApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String

    let mut context = ConfigApi::Context::default();
    let result = client.configPost(token, userId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required

Responses


FeatureFlags

featureflagsGet

Get enabled Feature Flags for the user

Returns a list of objects that have the name and the key name of the enabled Feature Flags for the user. For more information on setting up feature flags, you may visit our Launch Control documentation: https://docs.taplytics.com/docs/guides-feature-flag


/featureflags

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://universal-api.taplytics.com/v1/featureflags?token=token_example&user_id=userId_example&attributes=&customData=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FeatureFlagsApi;

import java.io.File;
import java.util.*;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.featureflagsGet(token, userId, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#featureflagsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final UserAttributes attributes = new UserAttributes(); // UserAttributes | serialized attributes object
final Object customData = new Object(); // Object | serialized custom data object

try {
    final result = await api_instance.featureflagsGet(token, userId, attributes, customData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->featureflagsGet: $e\n');
}

import org.openapitools.client.api.FeatureFlagsApi;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.featureflagsGet(token, userId, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#featureflagsGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
FeatureFlagsApi *apiInstance = [[FeatureFlagsApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
UserAttributes *attributes = ; // serialized attributes object (default to null)
Object *customData = Object; // serialized custom data object (default to null)

// Get enabled Feature Flags for the user
[apiInstance featureflagsGetWith:token
    userId:userId
    attributes:attributes
    customData:customData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.FeatureFlagsApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var attributes = ; // {UserAttributes} serialized attributes object
var customData = Object; // {Object} serialized custom data object

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.featureflagsGet(token, userId, attributes, customData, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class featureflagsGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new FeatureFlagsApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var attributes = new UserAttributes(); // UserAttributes | serialized attributes object (default to null)
            var customData = new Object(); // Object | serialized custom data object (default to null)

            try {
                // Get enabled Feature Flags for the user
                apiInstance.featureflagsGet(token, userId, attributes, customData);
            } catch (Exception e) {
                Debug.Print("Exception when calling FeatureFlagsApi.featureflagsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FeatureFlagsApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$attributes = ; // UserAttributes | serialized attributes object
$customData = Object; // Object | serialized custom data object

try {
    $api_instance->featureflagsGet($token, $userId, $attributes, $customData);
} catch (Exception $e) {
    echo 'Exception when calling FeatureFlagsApi->featureflagsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::FeatureFlagsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FeatureFlagsApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $attributes = ; # UserAttributes | serialized attributes object
my $customData = Object; # Object | serialized custom data object

eval {
    $api_instance->featureflagsGet(token => $token, userId => $userId, attributes => $attributes, customData => $customData);
};
if ($@) {
    warn "Exception when calling FeatureFlagsApi->featureflagsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.FeatureFlagsApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
attributes =  # UserAttributes | serialized attributes object (default to null)
customData = Object # Object | serialized custom data object (default to null)

try:
    # Get enabled Feature Flags for the user
    api_instance.featureflags_get(token, userId, attributes, customData)
except ApiException as e:
    print("Exception when calling FeatureFlagsApi->featureflagsGet: %s\n" % e)
extern crate FeatureFlagsApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let attributes = ; // UserAttributes
    let customData = Object; // Object

    let mut context = FeatureFlagsApi::Context::default();
    let result = client.featureflagsGet(token, userId, attributes, customData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
attributes*
UserAttributes
serialized attributes object
Required
customData*
Object
serialized custom data object
Required

Responses


featureflagsPost

Get enabled Feature Flags for the user

Returns a list of objects that have the name and the key name of the enabled Feature Flags for the user. For more information on setting up feature flags, you may visit our Launch Control documentation: https://docs.taplytics.com/docs/guides-feature-flag


/featureflags

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/jason" \
 "https://universal-api.taplytics.com/v1/featureflags?token=token_example&user_id=userId_example" \
 -d 'Custom MIME type example not yet supported: application/jason'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FeatureFlagsApi;

import java.io.File;
import java.util.*;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.featureflagsPost(token, userId, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#featureflagsPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final UserAttributesWithCustomData userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData | 

try {
    final result = await api_instance.featureflagsPost(token, userId, userAttributesWithCustomData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->featureflagsPost: $e\n');
}

import org.openapitools.client.api.FeatureFlagsApi;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.featureflagsPost(token, userId, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#featureflagsPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
FeatureFlagsApi *apiInstance = [[FeatureFlagsApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
UserAttributesWithCustomData *userAttributesWithCustomData = ; //  (optional)

// Get enabled Feature Flags for the user
[apiInstance featureflagsPostWith:token
    userId:userId
    userAttributesWithCustomData:userAttributesWithCustomData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.FeatureFlagsApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var opts = {
  'userAttributesWithCustomData':  // {UserAttributesWithCustomData} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.featureflagsPost(token, userId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class featureflagsPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new FeatureFlagsApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData |  (optional) 

            try {
                // Get enabled Feature Flags for the user
                apiInstance.featureflagsPost(token, userId, userAttributesWithCustomData);
            } catch (Exception e) {
                Debug.Print("Exception when calling FeatureFlagsApi.featureflagsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FeatureFlagsApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

try {
    $api_instance->featureflagsPost($token, $userId, $userAttributesWithCustomData);
} catch (Exception $e) {
    echo 'Exception when calling FeatureFlagsApi->featureflagsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::FeatureFlagsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FeatureFlagsApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $userAttributesWithCustomData = WWW::OPenAPIClient::Object::UserAttributesWithCustomData->new(); # UserAttributesWithCustomData | 

eval {
    $api_instance->featureflagsPost(token => $token, userId => $userId, userAttributesWithCustomData => $userAttributesWithCustomData);
};
if ($@) {
    warn "Exception when calling FeatureFlagsApi->featureflagsPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.FeatureFlagsApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
userAttributesWithCustomData =  # UserAttributesWithCustomData |  (optional)

try:
    # Get enabled Feature Flags for the user
    api_instance.featureflags_post(token, userId, userAttributesWithCustomData=userAttributesWithCustomData)
except ApiException as e:
    print("Exception when calling FeatureFlagsApi->featureflagsPost: %s\n" % e)
extern crate FeatureFlagsApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let userAttributesWithCustomData = ; // UserAttributesWithCustomData

    let mut context = FeatureFlagsApi::Context::default();
    let result = client.featureflagsPost(token, userId, userAttributesWithCustomData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
userAttributesWithCustomData

All user attributes and optional custom data

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required

Responses


isfeatureflagenabledGet

Get if feature flag is enabled

Returns true or false based on if the Feature Flag key passed in maps to a Feature Flag that is currently enabled for the user.


/isfeatureflagenabled

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://universal-api.taplytics.com/v1/isfeatureflagenabled?token=token_example&user_id=userId_example&featureFlagKey=featureFlagKey_example&attributes=&customData=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FeatureFlagsApi;

import java.io.File;
import java.util.*;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String featureFlagKey = featureFlagKey_example; // String | key for the feature flag you want to check
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.isfeatureflagenabledGet(token, userId, featureFlagKey, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#isfeatureflagenabledGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final String featureFlagKey = new String(); // String | key for the feature flag you want to check
final UserAttributes attributes = new UserAttributes(); // UserAttributes | serialized attributes object
final Object customData = new Object(); // Object | serialized custom data object

try {
    final result = await api_instance.isfeatureflagenabledGet(token, userId, featureFlagKey, attributes, customData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->isfeatureflagenabledGet: $e\n');
}

import org.openapitools.client.api.FeatureFlagsApi;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String featureFlagKey = featureFlagKey_example; // String | key for the feature flag you want to check
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.isfeatureflagenabledGet(token, userId, featureFlagKey, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#isfeatureflagenabledGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
FeatureFlagsApi *apiInstance = [[FeatureFlagsApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
String *featureFlagKey = featureFlagKey_example; // key for the feature flag you want to check (default to null)
UserAttributes *attributes = ; // serialized attributes object (default to null)
Object *customData = Object; // serialized custom data object (default to null)

// Get if feature flag is enabled
[apiInstance isfeatureflagenabledGetWith:token
    userId:userId
    featureFlagKey:featureFlagKey
    attributes:attributes
    customData:customData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.FeatureFlagsApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var featureFlagKey = featureFlagKey_example; // {String} key for the feature flag you want to check
var attributes = ; // {UserAttributes} serialized attributes object
var customData = Object; // {Object} serialized custom data object

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.isfeatureflagenabledGet(token, userId, featureFlagKey, attributes, customData, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class isfeatureflagenabledGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new FeatureFlagsApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var featureFlagKey = featureFlagKey_example;  // String | key for the feature flag you want to check (default to null)
            var attributes = new UserAttributes(); // UserAttributes | serialized attributes object (default to null)
            var customData = new Object(); // Object | serialized custom data object (default to null)

            try {
                // Get if feature flag is enabled
                apiInstance.isfeatureflagenabledGet(token, userId, featureFlagKey, attributes, customData);
            } catch (Exception e) {
                Debug.Print("Exception when calling FeatureFlagsApi.isfeatureflagenabledGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FeatureFlagsApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$featureFlagKey = featureFlagKey_example; // String | key for the feature flag you want to check
$attributes = ; // UserAttributes | serialized attributes object
$customData = Object; // Object | serialized custom data object

try {
    $api_instance->isfeatureflagenabledGet($token, $userId, $featureFlagKey, $attributes, $customData);
} catch (Exception $e) {
    echo 'Exception when calling FeatureFlagsApi->isfeatureflagenabledGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::FeatureFlagsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FeatureFlagsApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $featureFlagKey = featureFlagKey_example; # String | key for the feature flag you want to check
my $attributes = ; # UserAttributes | serialized attributes object
my $customData = Object; # Object | serialized custom data object

eval {
    $api_instance->isfeatureflagenabledGet(token => $token, userId => $userId, featureFlagKey => $featureFlagKey, attributes => $attributes, customData => $customData);
};
if ($@) {
    warn "Exception when calling FeatureFlagsApi->isfeatureflagenabledGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.FeatureFlagsApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
featureFlagKey = featureFlagKey_example # String | key for the feature flag you want to check (default to null)
attributes =  # UserAttributes | serialized attributes object (default to null)
customData = Object # Object | serialized custom data object (default to null)

try:
    # Get if feature flag is enabled
    api_instance.isfeatureflagenabled_get(token, userId, featureFlagKey, attributes, customData)
except ApiException as e:
    print("Exception when calling FeatureFlagsApi->isfeatureflagenabledGet: %s\n" % e)
extern crate FeatureFlagsApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let featureFlagKey = featureFlagKey_example; // String
    let attributes = ; // UserAttributes
    let customData = Object; // Object

    let mut context = FeatureFlagsApi::Context::default();
    let result = client.isfeatureflagenabledGet(token, userId, featureFlagKey, attributes, customData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
featureFlagKey*
String
key for the feature flag you want to check
Required
attributes*
UserAttributes
serialized attributes object
Required
customData*
Object
serialized custom data object
Required

Responses


isfeatureflagenabledPost

Get if feature flag is enabled

Returns true or false based on if the Feature Flag key passed in maps to a Feature Flag that is currently enabled for the user.


/isfeatureflagenabled

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/jason" \
 "https://universal-api.taplytics.com/v1/isfeatureflagenabled?token=token_example&user_id=userId_example&featureFlagKey=featureFlagKey_example" \
 -d 'Custom MIME type example not yet supported: application/jason'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FeatureFlagsApi;

import java.io.File;
import java.util.*;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String featureFlagKey = featureFlagKey_example; // String | key for the feature flag you want to check
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.isfeatureflagenabledPost(token, userId, featureFlagKey, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#isfeatureflagenabledPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final String featureFlagKey = new String(); // String | key for the feature flag you want to check
final UserAttributesWithCustomData userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData | 

try {
    final result = await api_instance.isfeatureflagenabledPost(token, userId, featureFlagKey, userAttributesWithCustomData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->isfeatureflagenabledPost: $e\n');
}

import org.openapitools.client.api.FeatureFlagsApi;

public class FeatureFlagsApiExample {
    public static void main(String[] args) {
        FeatureFlagsApi apiInstance = new FeatureFlagsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String featureFlagKey = featureFlagKey_example; // String | key for the feature flag you want to check
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.isfeatureflagenabledPost(token, userId, featureFlagKey, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeatureFlagsApi#isfeatureflagenabledPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
FeatureFlagsApi *apiInstance = [[FeatureFlagsApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
String *featureFlagKey = featureFlagKey_example; // key for the feature flag you want to check (default to null)
UserAttributesWithCustomData *userAttributesWithCustomData = ; //  (optional)

// Get if feature flag is enabled
[apiInstance isfeatureflagenabledPostWith:token
    userId:userId
    featureFlagKey:featureFlagKey
    userAttributesWithCustomData:userAttributesWithCustomData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.FeatureFlagsApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var featureFlagKey = featureFlagKey_example; // {String} key for the feature flag you want to check
var opts = {
  'userAttributesWithCustomData':  // {UserAttributesWithCustomData} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.isfeatureflagenabledPost(token, userId, featureFlagKey, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class isfeatureflagenabledPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new FeatureFlagsApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var featureFlagKey = featureFlagKey_example;  // String | key for the feature flag you want to check (default to null)
            var userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData |  (optional) 

            try {
                // Get if feature flag is enabled
                apiInstance.isfeatureflagenabledPost(token, userId, featureFlagKey, userAttributesWithCustomData);
            } catch (Exception e) {
                Debug.Print("Exception when calling FeatureFlagsApi.isfeatureflagenabledPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FeatureFlagsApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$featureFlagKey = featureFlagKey_example; // String | key for the feature flag you want to check
$userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

try {
    $api_instance->isfeatureflagenabledPost($token, $userId, $featureFlagKey, $userAttributesWithCustomData);
} catch (Exception $e) {
    echo 'Exception when calling FeatureFlagsApi->isfeatureflagenabledPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::FeatureFlagsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FeatureFlagsApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $featureFlagKey = featureFlagKey_example; # String | key for the feature flag you want to check
my $userAttributesWithCustomData = WWW::OPenAPIClient::Object::UserAttributesWithCustomData->new(); # UserAttributesWithCustomData | 

eval {
    $api_instance->isfeatureflagenabledPost(token => $token, userId => $userId, featureFlagKey => $featureFlagKey, userAttributesWithCustomData => $userAttributesWithCustomData);
};
if ($@) {
    warn "Exception when calling FeatureFlagsApi->isfeatureflagenabledPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.FeatureFlagsApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
featureFlagKey = featureFlagKey_example # String | key for the feature flag you want to check (default to null)
userAttributesWithCustomData =  # UserAttributesWithCustomData |  (optional)

try:
    # Get if feature flag is enabled
    api_instance.isfeatureflagenabled_post(token, userId, featureFlagKey, userAttributesWithCustomData=userAttributesWithCustomData)
except ApiException as e:
    print("Exception when calling FeatureFlagsApi->isfeatureflagenabledPost: %s\n" % e)
extern crate FeatureFlagsApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let featureFlagKey = featureFlagKey_example; // String
    let userAttributesWithCustomData = ; // UserAttributesWithCustomData

    let mut context = FeatureFlagsApi::Context::default();
    let result = client.isfeatureflagenabledPost(token, userId, featureFlagKey, userAttributesWithCustomData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
userAttributesWithCustomData

All user attributes and optional custom data

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
featureFlagKey*
String
key for the feature flag you want to check
Required

Responses


Variables

variablesGet

Get all active variables for user

Returns all code variables and their values for the given user.


/variables

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://universal-api.taplytics.com/v1/variables?token=token_example&user_id=userId_example&attributes=&customData=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VariablesApi;

import java.io.File;
import java.util.*;

public class VariablesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            array[Variable] result = apiInstance.variablesGet(token, userId, attributes, customData);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final UserAttributes attributes = new UserAttributes(); // UserAttributes | serialized attributes object
final Object customData = new Object(); // Object | serialized custom data object

try {
    final result = await api_instance.variablesGet(token, userId, attributes, customData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->variablesGet: $e\n');
}

import org.openapitools.client.api.VariablesApi;

public class VariablesApiExample {
    public static void main(String[] args) {
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            array[Variable] result = apiInstance.variablesGet(token, userId, attributes, customData);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablesGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
VariablesApi *apiInstance = [[VariablesApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
UserAttributes *attributes = ; // serialized attributes object (default to null)
Object *customData = Object; // serialized custom data object (default to null)

// Get all active variables for user
[apiInstance variablesGetWith:token
    userId:userId
    attributes:attributes
    customData:customData
              completionHandler: ^(array[Variable] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.VariablesApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var attributes = ; // {UserAttributes} serialized attributes object
var customData = Object; // {Object} serialized custom data object

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.variablesGet(token, userId, attributes, customData, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class variablesGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new VariablesApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var attributes = new UserAttributes(); // UserAttributes | serialized attributes object (default to null)
            var customData = new Object(); // Object | serialized custom data object (default to null)

            try {
                // Get all active variables for user
                array[Variable] result = apiInstance.variablesGet(token, userId, attributes, customData);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling VariablesApi.variablesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VariablesApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$attributes = ; // UserAttributes | serialized attributes object
$customData = Object; // Object | serialized custom data object

try {
    $result = $api_instance->variablesGet($token, $userId, $attributes, $customData);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VariablesApi->variablesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VariablesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VariablesApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $attributes = ; # UserAttributes | serialized attributes object
my $customData = Object; # Object | serialized custom data object

eval {
    my $result = $api_instance->variablesGet(token => $token, userId => $userId, attributes => $attributes, customData => $customData);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VariablesApi->variablesGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.VariablesApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
attributes =  # UserAttributes | serialized attributes object (default to null)
customData = Object # Object | serialized custom data object (default to null)

try:
    # Get all active variables for user
    api_response = api_instance.variables_get(token, userId, attributes, customData)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VariablesApi->variablesGet: %s\n" % e)
extern crate VariablesApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let attributes = ; // UserAttributes
    let customData = Object; // Object

    let mut context = VariablesApi::Context::default();
    let result = client.variablesGet(token, userId, attributes, customData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
attributes*
UserAttributes
serialized attributes object
Required
customData*
Object
serialized custom data object
Required

Responses


variablesPost

Get all active variables for user

Returns all code variables and their values for the given user.


/variables

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/jason" \
 "https://universal-api.taplytics.com/v1/variables?token=token_example&user_id=userId_example" \
 -d 'Custom MIME type example not yet supported: application/jason'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VariablesApi;

import java.io.File;
import java.util.*;

public class VariablesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            array[Variable] result = apiInstance.variablesPost(token, userId, userAttributesWithCustomData);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablesPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final UserAttributesWithCustomData userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData | 

try {
    final result = await api_instance.variablesPost(token, userId, userAttributesWithCustomData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->variablesPost: $e\n');
}

import org.openapitools.client.api.VariablesApi;

public class VariablesApiExample {
    public static void main(String[] args) {
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            array[Variable] result = apiInstance.variablesPost(token, userId, userAttributesWithCustomData);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablesPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
VariablesApi *apiInstance = [[VariablesApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
UserAttributesWithCustomData *userAttributesWithCustomData = ; //  (optional)

// Get all active variables for user
[apiInstance variablesPostWith:token
    userId:userId
    userAttributesWithCustomData:userAttributesWithCustomData
              completionHandler: ^(array[Variable] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.VariablesApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var opts = {
  'userAttributesWithCustomData':  // {UserAttributesWithCustomData} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.variablesPost(token, userId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class variablesPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new VariablesApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData |  (optional) 

            try {
                // Get all active variables for user
                array[Variable] result = apiInstance.variablesPost(token, userId, userAttributesWithCustomData);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling VariablesApi.variablesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VariablesApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

try {
    $result = $api_instance->variablesPost($token, $userId, $userAttributesWithCustomData);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VariablesApi->variablesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VariablesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VariablesApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $userAttributesWithCustomData = WWW::OPenAPIClient::Object::UserAttributesWithCustomData->new(); # UserAttributesWithCustomData | 

eval {
    my $result = $api_instance->variablesPost(token => $token, userId => $userId, userAttributesWithCustomData => $userAttributesWithCustomData);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VariablesApi->variablesPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.VariablesApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
userAttributesWithCustomData =  # UserAttributesWithCustomData |  (optional)

try:
    # Get all active variables for user
    api_response = api_instance.variables_post(token, userId, userAttributesWithCustomData=userAttributesWithCustomData)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VariablesApi->variablesPost: %s\n" % e)
extern crate VariablesApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let userAttributesWithCustomData = ; // UserAttributesWithCustomData

    let mut context = VariablesApi::Context::default();
    let result = client.variablesPost(token, userId, userAttributesWithCustomData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
userAttributesWithCustomData

All user attributes and optional custom data

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required

Responses


variablevalueGet

Get value for a Taplytics Variable

Value for given Taplytics code variable. For more information on setting up code variables, you may visit our code experiment setup documentation: https://docs.taplytics.com/docs/guides-code-based-experiments


/variablevalue

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://universal-api.taplytics.com/v1/variablevalue?token=token_example&user_id=userId_example&varName=varName_example&defaultValue=defaultValue_example&attributes=&customData=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VariablesApi;

import java.io.File;
import java.util.*;

public class VariablesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String varName = varName_example; // String | name of variable
        String defaultValue = defaultValue_example; // String | default value to be used if user does not have variable available.
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.variablevalueGet(token, userId, varName, defaultValue, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablevalueGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final String varName = new String(); // String | name of variable
final String defaultValue = new String(); // String | default value to be used if user does not have variable available.
final UserAttributes attributes = new UserAttributes(); // UserAttributes | serialized attributes object
final Object customData = new Object(); // Object | serialized custom data object

try {
    final result = await api_instance.variablevalueGet(token, userId, varName, defaultValue, attributes, customData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->variablevalueGet: $e\n');
}

import org.openapitools.client.api.VariablesApi;

public class VariablesApiExample {
    public static void main(String[] args) {
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String varName = varName_example; // String | name of variable
        String defaultValue = defaultValue_example; // String | default value to be used if user does not have variable available.
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.variablevalueGet(token, userId, varName, defaultValue, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablevalueGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
VariablesApi *apiInstance = [[VariablesApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
String *varName = varName_example; // name of variable (default to null)
String *defaultValue = defaultValue_example; // default value to be used if user does not have variable available. (default to null)
UserAttributes *attributes = ; // serialized attributes object (default to null)
Object *customData = Object; // serialized custom data object (default to null)

// Get value for a Taplytics Variable
[apiInstance variablevalueGetWith:token
    userId:userId
    varName:varName
    defaultValue:defaultValue
    attributes:attributes
    customData:customData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.VariablesApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var varName = varName_example; // {String} name of variable
var defaultValue = defaultValue_example; // {String} default value to be used if user does not have variable available.
var attributes = ; // {UserAttributes} serialized attributes object
var customData = Object; // {Object} serialized custom data object

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.variablevalueGet(token, userId, varName, defaultValue, attributes, customData, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class variablevalueGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new VariablesApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var varName = varName_example;  // String | name of variable (default to null)
            var defaultValue = defaultValue_example;  // String | default value to be used if user does not have variable available. (default to null)
            var attributes = new UserAttributes(); // UserAttributes | serialized attributes object (default to null)
            var customData = new Object(); // Object | serialized custom data object (default to null)

            try {
                // Get value for a Taplytics Variable
                apiInstance.variablevalueGet(token, userId, varName, defaultValue, attributes, customData);
            } catch (Exception e) {
                Debug.Print("Exception when calling VariablesApi.variablevalueGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VariablesApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$varName = varName_example; // String | name of variable
$defaultValue = defaultValue_example; // String | default value to be used if user does not have variable available.
$attributes = ; // UserAttributes | serialized attributes object
$customData = Object; // Object | serialized custom data object

try {
    $api_instance->variablevalueGet($token, $userId, $varName, $defaultValue, $attributes, $customData);
} catch (Exception $e) {
    echo 'Exception when calling VariablesApi->variablevalueGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VariablesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VariablesApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $varName = varName_example; # String | name of variable
my $defaultValue = defaultValue_example; # String | default value to be used if user does not have variable available.
my $attributes = ; # UserAttributes | serialized attributes object
my $customData = Object; # Object | serialized custom data object

eval {
    $api_instance->variablevalueGet(token => $token, userId => $userId, varName => $varName, defaultValue => $defaultValue, attributes => $attributes, customData => $customData);
};
if ($@) {
    warn "Exception when calling VariablesApi->variablevalueGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.VariablesApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
varName = varName_example # String | name of variable (default to null)
defaultValue = defaultValue_example # String | default value to be used if user does not have variable available. (default to null)
attributes =  # UserAttributes | serialized attributes object (default to null)
customData = Object # Object | serialized custom data object (default to null)

try:
    # Get value for a Taplytics Variable
    api_instance.variablevalue_get(token, userId, varName, defaultValue, attributes, customData)
except ApiException as e:
    print("Exception when calling VariablesApi->variablevalueGet: %s\n" % e)
extern crate VariablesApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let varName = varName_example; // String
    let defaultValue = defaultValue_example; // String
    let attributes = ; // UserAttributes
    let customData = Object; // Object

    let mut context = VariablesApi::Context::default();
    let result = client.variablevalueGet(token, userId, varName, defaultValue, attributes, customData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
varName*
String
name of variable
Required
defaultValue*
String
default value to be used if user does not have variable available.
Required
attributes*
UserAttributes
serialized attributes object
Required
customData*
Object
serialized custom data object
Required

Responses


variablevaluePost

Get value for a Taplytics Variable

Value for given Taplytics code variable. For more information on setting up code variables, you may visit our code experiment setup documentation: https://docs.taplytics.com/docs/guides-code-based-experiments


/variablevalue

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/jason" \
 "https://universal-api.taplytics.com/v1/variablevalue?token=token_example&user_id=userId_example&varName=varName_example&defaultValue=defaultValue_example" \
 -d 'Custom MIME type example not yet supported: application/jason'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VariablesApi;

import java.io.File;
import java.util.*;

public class VariablesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String varName = varName_example; // String | name of variable
        String defaultValue = defaultValue_example; // String | default value to be used if user does not have variable available.
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.variablevaluePost(token, userId, varName, defaultValue, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablevaluePost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final String varName = new String(); // String | name of variable
final String defaultValue = new String(); // String | default value to be used if user does not have variable available.
final UserAttributesWithCustomData userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData | 

try {
    final result = await api_instance.variablevaluePost(token, userId, varName, defaultValue, userAttributesWithCustomData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->variablevaluePost: $e\n');
}

import org.openapitools.client.api.VariablesApi;

public class VariablesApiExample {
    public static void main(String[] args) {
        VariablesApi apiInstance = new VariablesApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String varName = varName_example; // String | name of variable
        String defaultValue = defaultValue_example; // String | default value to be used if user does not have variable available.
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.variablevaluePost(token, userId, varName, defaultValue, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariablesApi#variablevaluePost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
VariablesApi *apiInstance = [[VariablesApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
String *varName = varName_example; // name of variable (default to null)
String *defaultValue = defaultValue_example; // default value to be used if user does not have variable available. (default to null)
UserAttributesWithCustomData *userAttributesWithCustomData = ; //  (optional)

// Get value for a Taplytics Variable
[apiInstance variablevaluePostWith:token
    userId:userId
    varName:varName
    defaultValue:defaultValue
    userAttributesWithCustomData:userAttributesWithCustomData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.VariablesApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var varName = varName_example; // {String} name of variable
var defaultValue = defaultValue_example; // {String} default value to be used if user does not have variable available.
var opts = {
  'userAttributesWithCustomData':  // {UserAttributesWithCustomData} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.variablevaluePost(token, userId, varName, defaultValue, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class variablevaluePostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new VariablesApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var varName = varName_example;  // String | name of variable (default to null)
            var defaultValue = defaultValue_example;  // String | default value to be used if user does not have variable available. (default to null)
            var userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData |  (optional) 

            try {
                // Get value for a Taplytics Variable
                apiInstance.variablevaluePost(token, userId, varName, defaultValue, userAttributesWithCustomData);
            } catch (Exception e) {
                Debug.Print("Exception when calling VariablesApi.variablevaluePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VariablesApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$varName = varName_example; // String | name of variable
$defaultValue = defaultValue_example; // String | default value to be used if user does not have variable available.
$userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

try {
    $api_instance->variablevaluePost($token, $userId, $varName, $defaultValue, $userAttributesWithCustomData);
} catch (Exception $e) {
    echo 'Exception when calling VariablesApi->variablevaluePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VariablesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VariablesApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $varName = varName_example; # String | name of variable
my $defaultValue = defaultValue_example; # String | default value to be used if user does not have variable available.
my $userAttributesWithCustomData = WWW::OPenAPIClient::Object::UserAttributesWithCustomData->new(); # UserAttributesWithCustomData | 

eval {
    $api_instance->variablevaluePost(token => $token, userId => $userId, varName => $varName, defaultValue => $defaultValue, userAttributesWithCustomData => $userAttributesWithCustomData);
};
if ($@) {
    warn "Exception when calling VariablesApi->variablevaluePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.VariablesApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
varName = varName_example # String | name of variable (default to null)
defaultValue = defaultValue_example # String | default value to be used if user does not have variable available. (default to null)
userAttributesWithCustomData =  # UserAttributesWithCustomData |  (optional)

try:
    # Get value for a Taplytics Variable
    api_instance.variablevalue_post(token, userId, varName, defaultValue, userAttributesWithCustomData=userAttributesWithCustomData)
except ApiException as e:
    print("Exception when calling VariablesApi->variablevaluePost: %s\n" % e)
extern crate VariablesApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let varName = varName_example; // String
    let defaultValue = defaultValue_example; // String
    let userAttributesWithCustomData = ; // UserAttributesWithCustomData

    let mut context = VariablesApi::Context::default();
    let result = client.variablevaluePost(token, userId, varName, defaultValue, userAttributesWithCustomData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
userAttributesWithCustomData

All user attributes and optional custom data

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
varName*
String
name of variable
Required
defaultValue*
String
default value to be used if user does not have variable available.
Required

Responses


Variations

variationGet

Get Variation for a Taplytics Experiment

For a given experiment, determine whether or not a user is in the experiment, and in which variation. If the user is not in the experiment, returns an empty response.


/variation

Usage and SDK Samples

curl -X GET \
 -H "Accept: text/plain" \
 "https://universal-api.taplytics.com/v1/variation?token=token_example&user_id=userId_example&experimentName=experimentName_example&attributes=&customData=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VariationsApi;

import java.io.File;
import java.util.*;

public class VariationsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        VariationsApi apiInstance = new VariationsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String experimentName = experimentName_example; // String | Name of an Experiment
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.variationGet(token, userId, experimentName, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariationsApi#variationGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final String experimentName = new String(); // String | Name of an Experiment
final UserAttributes attributes = new UserAttributes(); // UserAttributes | serialized attributes object
final Object customData = new Object(); // Object | serialized custom data object

try {
    final result = await api_instance.variationGet(token, userId, experimentName, attributes, customData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->variationGet: $e\n');
}

import org.openapitools.client.api.VariationsApi;

public class VariationsApiExample {
    public static void main(String[] args) {
        VariationsApi apiInstance = new VariationsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String experimentName = experimentName_example; // String | Name of an Experiment
        UserAttributes attributes = ; // UserAttributes | serialized attributes object
        Object customData = Object; // Object | serialized custom data object

        try {
            apiInstance.variationGet(token, userId, experimentName, attributes, customData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariationsApi#variationGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
VariationsApi *apiInstance = [[VariationsApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
String *experimentName = experimentName_example; // Name of an Experiment (default to null)
UserAttributes *attributes = ; // serialized attributes object (default to null)
Object *customData = Object; // serialized custom data object (default to null)

// Get Variation for a Taplytics Experiment
[apiInstance variationGetWith:token
    userId:userId
    experimentName:experimentName
    attributes:attributes
    customData:customData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.VariationsApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var experimentName = experimentName_example; // {String} Name of an Experiment
var attributes = ; // {UserAttributes} serialized attributes object
var customData = Object; // {Object} serialized custom data object

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.variationGet(token, userId, experimentName, attributes, customData, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class variationGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new VariationsApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var experimentName = experimentName_example;  // String | Name of an Experiment (default to null)
            var attributes = new UserAttributes(); // UserAttributes | serialized attributes object (default to null)
            var customData = new Object(); // Object | serialized custom data object (default to null)

            try {
                // Get Variation for a Taplytics Experiment
                apiInstance.variationGet(token, userId, experimentName, attributes, customData);
            } catch (Exception e) {
                Debug.Print("Exception when calling VariationsApi.variationGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VariationsApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$experimentName = experimentName_example; // String | Name of an Experiment
$attributes = ; // UserAttributes | serialized attributes object
$customData = Object; // Object | serialized custom data object

try {
    $api_instance->variationGet($token, $userId, $experimentName, $attributes, $customData);
} catch (Exception $e) {
    echo 'Exception when calling VariationsApi->variationGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VariationsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VariationsApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $experimentName = experimentName_example; # String | Name of an Experiment
my $attributes = ; # UserAttributes | serialized attributes object
my $customData = Object; # Object | serialized custom data object

eval {
    $api_instance->variationGet(token => $token, userId => $userId, experimentName => $experimentName, attributes => $attributes, customData => $customData);
};
if ($@) {
    warn "Exception when calling VariationsApi->variationGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.VariationsApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
experimentName = experimentName_example # String | Name of an Experiment (default to null)
attributes =  # UserAttributes | serialized attributes object (default to null)
customData = Object # Object | serialized custom data object (default to null)

try:
    # Get Variation for a Taplytics Experiment
    api_instance.variation_get(token, userId, experimentName, attributes, customData)
except ApiException as e:
    print("Exception when calling VariationsApi->variationGet: %s\n" % e)
extern crate VariationsApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let experimentName = experimentName_example; // String
    let attributes = ; // UserAttributes
    let customData = Object; // Object

    let mut context = VariationsApi::Context::default();
    let result = client.variationGet(token, userId, experimentName, attributes, customData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
experimentName*
String
Name of an Experiment
Required
attributes*
UserAttributes
serialized attributes object
Required
customData*
Object
serialized custom data object
Required

Responses


variationPost

Get Variation for a Taplytics Experiment

For a given experiment, determine whether or not a user is in the experiment, and in which variation. If the user is not in the experiment, returns an empty response.


/variation

Usage and SDK Samples

curl -X POST \
 -H "Accept: text/plain" \
 -H "Content-Type: application/jason" \
 "https://universal-api.taplytics.com/v1/variation?token=token_example&user_id=userId_example&experimentName=experimentName_example" \
 -d 'Custom MIME type example not yet supported: application/jason'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VariationsApi;

import java.io.File;
import java.util.*;

public class VariationsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        VariationsApi apiInstance = new VariationsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String experimentName = experimentName_example; // String | Name of an Experiment
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.variationPost(token, userId, experimentName, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariationsApi#variationPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String token = new String(); // String | SDK token for the project
final String userId = new String(); // String | ID for current user
final String experimentName = new String(); // String | Name of an Experiment
final UserAttributesWithCustomData userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData | 

try {
    final result = await api_instance.variationPost(token, userId, experimentName, userAttributesWithCustomData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->variationPost: $e\n');
}

import org.openapitools.client.api.VariationsApi;

public class VariationsApiExample {
    public static void main(String[] args) {
        VariationsApi apiInstance = new VariationsApi();
        String token = token_example; // String | SDK token for the project
        String userId = userId_example; // String | ID for current user
        String experimentName = experimentName_example; // String | Name of an Experiment
        UserAttributesWithCustomData userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

        try {
            apiInstance.variationPost(token, userId, experimentName, userAttributesWithCustomData);
        } catch (ApiException e) {
            System.err.println("Exception when calling VariationsApi#variationPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
VariationsApi *apiInstance = [[VariationsApi alloc] init];
String *token = token_example; // SDK token for the project (default to null)
String *userId = userId_example; // ID for current user (default to null)
String *experimentName = experimentName_example; // Name of an Experiment (default to null)
UserAttributesWithCustomData *userAttributesWithCustomData = ; //  (optional)

// Get Variation for a Taplytics Experiment
[apiInstance variationPostWith:token
    userId:userId
    experimentName:experimentName
    userAttributesWithCustomData:userAttributesWithCustomData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var TaplyticsUniversalApi = require('taplytics_universal_api');

// Create an instance of the API class
var api = new TaplyticsUniversalApi.VariationsApi()
var token = token_example; // {String} SDK token for the project
var userId = userId_example; // {String} ID for current user
var experimentName = experimentName_example; // {String} Name of an Experiment
var opts = {
  'userAttributesWithCustomData':  // {UserAttributesWithCustomData} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.variationPost(token, userId, experimentName, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class variationPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new VariationsApi();
            var token = token_example;  // String | SDK token for the project (default to null)
            var userId = userId_example;  // String | ID for current user (default to null)
            var experimentName = experimentName_example;  // String | Name of an Experiment (default to null)
            var userAttributesWithCustomData = new UserAttributesWithCustomData(); // UserAttributesWithCustomData |  (optional) 

            try {
                // Get Variation for a Taplytics Experiment
                apiInstance.variationPost(token, userId, experimentName, userAttributesWithCustomData);
            } catch (Exception e) {
                Debug.Print("Exception when calling VariationsApi.variationPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VariationsApi();
$token = token_example; // String | SDK token for the project
$userId = userId_example; // String | ID for current user
$experimentName = experimentName_example; // String | Name of an Experiment
$userAttributesWithCustomData = ; // UserAttributesWithCustomData | 

try {
    $api_instance->variationPost($token, $userId, $experimentName, $userAttributesWithCustomData);
} catch (Exception $e) {
    echo 'Exception when calling VariationsApi->variationPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VariationsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VariationsApi->new();
my $token = token_example; # String | SDK token for the project
my $userId = userId_example; # String | ID for current user
my $experimentName = experimentName_example; # String | Name of an Experiment
my $userAttributesWithCustomData = WWW::OPenAPIClient::Object::UserAttributesWithCustomData->new(); # UserAttributesWithCustomData | 

eval {
    $api_instance->variationPost(token => $token, userId => $userId, experimentName => $experimentName, userAttributesWithCustomData => $userAttributesWithCustomData);
};
if ($@) {
    warn "Exception when calling VariationsApi->variationPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.VariationsApi()
token = token_example # String | SDK token for the project (default to null)
userId = userId_example # String | ID for current user (default to null)
experimentName = experimentName_example # String | Name of an Experiment (default to null)
userAttributesWithCustomData =  # UserAttributesWithCustomData |  (optional)

try:
    # Get Variation for a Taplytics Experiment
    api_instance.variation_post(token, userId, experimentName, userAttributesWithCustomData=userAttributesWithCustomData)
except ApiException as e:
    print("Exception when calling VariationsApi->variationPost: %s\n" % e)
extern crate VariationsApi;

pub fn main() {
    let token = token_example; // String
    let userId = userId_example; // String
    let experimentName = experimentName_example; // String
    let userAttributesWithCustomData = ; // UserAttributesWithCustomData

    let mut context = VariationsApi::Context::default();
    let result = client.variationPost(token, userId, experimentName, userAttributesWithCustomData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
userAttributesWithCustomData

All user attributes and optional custom data

Query parameters
Name Description
token*
String
SDK token for the project
Required
user_id*
String
ID for current user
Required
experimentName*
String
Name of an Experiment
Required

Responses