Introduction

Yseop Savvy API provides tools to understand graphs, diagrams and charts, by generating clear and intelligible descriptions. It automatically explains what the charts, data and analysis mean and writes insights like a human being.

All the functionality of Yseop Savvy is accessible with our API. This API is mainly meant for BI purposes but can be used in various sectors, as it is flexible and not semantically bound to a specific domain (for more information, you can visit Yseop Savvy).

For now, it already has been integrated in Yseop Savvy for Qlik (plugin for Qlik Sense Desktop), and Yseop Savvy for Microsoft Excel (add-in for Microsoft Office 2010 and further).

General Information

Yseop Savvy API is a REST API. You can process tests using the Google Chrome Extension Postman (see more here).

For testing purposes, our API is available in a sandbox environment at the following URL: https://savvy-api.yseop-cloud.com/sandbox/api/v1/describe-chart

Please note that this sandbox environment is meant to make some tests with fair use. If you’re sending too many requests too quickly, you will get back a 429 error code.

To further optimize latency, the API is available in 2 regions:

The generic domain savvy-api.yseop-cloud.com is using EU (Ireland, Europe) resources.

To call the API, you have to execute a POST call with HTTP Headers and Body.

HTTP Headers

Security

API calls are protected via HTTP Basic Authentication with an API key. Contact Yseop for getting your API key: Yseop Savvy. Once you’ve got your API key, use it as HTTP Basic username. Leave password empty.

For example, if the API key is ‘fooBar’ then the Authorization Header is formed as follows:

 Authorization="Basic Zm9vQmFyOg=="

(Base64(“fooBar:”) = “Zm9vQmFyOg==”)

For more information on HTTP Basic, you can read this page: https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side

Input Type

You need to indicate the input format, which is always json:

 Content-Type="application/json;charset=UTF-8"

Output Format

The output format has to be set as html:

 Accept="text/html"

HTTP Body

The HTTP Body contains a json document (charts information).

Objects

Root Object

Top-level object that provides all the necessary information to the application. There can be several charts descriptions, but one is mandatory.

Field Type Mandatory Description
extensionVersion String Yes Version Number of the input.
profile ProfileObject or ProfileId No Profile contains information to customize your text, as vocabulary and analysis parameters. https://savvy-registration-staging.yseop-cloud.com/savvy-profiles/savvy-profiles#/savvy-profiles/help/.
charts [ChartObject] Yes List of charts to describe.
{
    "extensionVersion": "2",
     "profile" : {
        "id" : "xx007xx"
    },
    "charts": [ ... ]
}

Profile Id

Contains the id of the currently used profile.

Field Type Mandatory Description
id String Yes Id of the profile you want to use. https://savvy-registration-staging.yseop-cloud.com/savvy-profiles/.
{
    "id" : "xx007xx"
}

Profile Object

Contains the raw profile to use with Savvy.

Field Type Mandatory Description
options ProfileOptionsObject No Object describing the changes you want to apply on specific thresholds or default values used by Savvy.
vocabulary_en VocabularyEnObject No Object describing the changes you want to apply to the English vocabulary used by Savvy.
vocabulary_fr VocabularyFrObject No Object describing the changes you want to apply to the French vocabulary used by Savvy.
{
    "options" : {...},
    "vocabulary_en" : {...},
    "vocabulary_fr" : {...},
}

Profile Options Object

A Profile Options Object allows you to override some thresholds or default values use by Savvy. None of them are mandatory. You will find more explanations on each of this options in this file.

Field Mandatory
coefRegressionThreshold No
lowerThreshold No
lowerThresholdMeaning No
lowerAverageThreshold No
lowerAverageThresholdMeaning No
lowerMaxThreshold No
lowerMaxThresholdMeaning No
minGapBetweenCluster No
numberDecimalsCount No
rangeDisplay No
regressionQualityTrendThreshold No
upperThreshold No
upperThresholdMeaning No
upperAverageThreshold No
upperAverageThresholdMeaning No
upperMaxThreshold No
upperMaxThresholdMeaning No
variationThresholdDown No
variationThresholdAverage No
variationThresholdUp No
numberOfRelevantPointThreshold No
{
    "rangeDisplay" : true,
    "numberDecimalsCount" : 2,
    ...
}

English Vocabulary Object

This object allows you to override some English words or expressions used by Savvy when generating text in English. Using only one VocabularyItemObject in an array will just replace the word or expression, while an array of more than one element will allow you to add synonyms.

Field Type Mandatory Description
augmentation [VocabularyItemObject] No Describes how to override the expression “augmentation” used by Savvy.
bar_chart [VocabularyItemObject] No Describes how to override the expression “bar chart” used by Savvy.
biggest [VocabularyItemObject] No Describes how to override the expression “biggest” used by Savvy.
breakdown [VocabularyItemObject] No Describes how to override the expression “breakdown” used by Savvy.
category [VocabularyItemObject] No Describes how to override the expression “category” used by Savvy.
chart [VocabularyItemObject] No Describes how to override the expression “chart” used by Savvy.
data [VocabularyItemObject] No Describes how to override the expression “data” used by Savvy.
decline [VocabularyItemObject] No Describes how to override the expression “decline” used by Savvy.
decrease [VocabularyItemObject] No Describes how to override the expression “decrease” used by Savvy.
diminution [VocabularyItemObject] No Describes how to override the expression “diminution” used by Savvy.
drop [VocabularyItemObject] No Describes how to override the expression “drop” used by Savvy.
fall [VocabularyItemObject] No Describes how to override the expression “fall” used by Savvy.
flow [VocabularyItemObject] No Describes how to override the expression “flow” used by Savvy.
following [VocabularyItemObject] No Describes how to override the expression “following” used by Savvy.
goal [VocabularyItemObject] No Describes how to override the expression “goal” used by Savvy.
group [VocabularyItemObject] No Describes how to override the expression “group” used by Savvy.
growth [VocabularyItemObject] No Describes how to override the expression “growth” used by Savvy.
high [VocabularyItemObject] No Describes how to override the expression “high” used by Savvy.
higher [VocabularyItemObject] No Describes how to override the expression “higher” used by Savvy.
increase [VocabularyItemObject] No Describes how to override the expression “increase” used by Savvy.
interval [VocabularyItemObject] No Describes how to override the expression “interval” used by Savvy.
item [VocabularyItemObject] No Describes how to override the expression “item” used by Savvy.
largest [VocabularyItemObject] No Describes how to override the expression “largest” used by Savvy.
line_chart [VocabularyItemObject] No Describes how to override the expression “line chart” used by Savvy.
list [VocabularyItemObject] No Describes how to override the expression “list” used by Savvy.
low [VocabularyItemObject] No Describes how to override the expression “low” used by Savvy.
lower [VocabularyItemObject] No Describes how to override the expression “lower” used by Savvy.
lower_average_threshold [VocabularyItemObject] No Describes how to override the expression “lower average threshold” used by Savvy.
lower_max_threshold [VocabularyItemObject] No Describes how to override the expression “lower max threshold” used by Savvy.
lower_threshold [VocabularyItemObject] No Describes how to override the expression “lower threshold” used by Savvy.
majority [VocabularyItemObject] No Describes how to override the expression “majority” used by Savvy.
measure [VocabularyItemObject] No Describes how to override the expression “measure” used by Savvy.
most_important [VocabularyItemObject] No Describes how to override the expression “most important” used by Savvy.
next [VocabularyItemObject] No Describes how to override the expression “next” used by Savvy.
noticeably [VocabularyItemObject] No Describes how to override the expression “noticeably” used by Savvy.
objective [VocabularyItemObject] No Describes how to override the expression “objective” used by Savvy.
one [VocabularyItemObject] No Describes how to override the expression “one” used by Savvy.
other [VocabularyItemObject] No Describes how to override the expression “other” used by Savvy.
outlier [VocabularyItemObject] No Describes how to override the expression “outlier” used by Savvy.
part [VocabularyItemObject] No Describes how to override the expression “part” used by Savvy.
path [VocabularyItemObject] No Describes how to override the expression “path” used by Savvy.
peak [VocabularyItemObject] No Describes how to override the expression “peak” used by Savvy.
period [VocabularyItemObject] No Describes how to override the expression “period” used by Savvy.
pie_chart [VocabularyItemObject] No Describes how to override the expression “pie chart” used by Savvy.
point [VocabularyItemObject] No Describes how to override the expression “point” used by Savvy.
rise [VocabularyItemObject] No Describes how to override the expression “rise” used by Savvy.
sankey_chart [VocabularyItemObject] No Describes how to override the expression “sankey chart” used by Savvy.
section [VocabularyItemObject] No Describes how to override the expression “section” used by Savvy.
segment [VocabularyItemObject] No Describes how to override the expression “segment” used by Savvy.
share [VocabularyItemObject] No Describes how to override the expression “share” used by Savvy.
simultaneous [VocabularyItemObject] No Describes how to override the expression “simultaneous” used by Savvy.
single [VocabularyItemObject] No Describes how to override the expression “single” used by Savvy.
size [VocabularyItemObject] No Describes how to override the expression “size” used by Savvy.
stagnation [VocabularyItemObject] No Describes how to override the expression “stagnation” used by Savvy.
step [VocabularyItemObject] No Describes how to override the expression “step” used by Savvy.
substantial [VocabularyItemObject] No Describes how to override the expression “substantial” used by Savvy.
target [VocabularyItemObject] No Describes how to override the expression “target” used by Savvy.
total [VocabularyItemObject] No Describes how to override the expression “total” used by Savvy.
trough [VocabularyItemObject] No Describes how to override the expression “trough” used by Savvy.
upper_average_threshold [VocabularyItemObject] No Describes how to override the expression “upper average threshold” used by Savvy.
upper_max_threshold [VocabularyItemObject] No Describes how to override the expression “upper max threshold” used by Savvy.
upper_threshold [VocabularyItemObject] No Describes how to override the expression “upper threshold” used by Savvy.
value [VocabularyItemObject] No Describes how to override the expression “value” used by Savvy.
variation [VocabularyItemObject] No Describes how to override the expression “variation” used by Savvy.
{
    "value": [ { "root": "value"}, { "root": "amount" }, ... ],
    "size": [ { "root": "length"} ],
    [...]
}

French Vocabulary Object

This object allows you to override some French words or expressions used by Savvy when generating text in French. Using only one VocabularyItemObject in an array will just replace the word or expression, while an array of more than one element will allow you to add synonyms.

Field Type Mandatory Description
augmentation [VocabularyItemObject] No Describes how to override the expression “augmentation” used by Savvy.
autre [VocabularyItemObject] No Describes how to override the expression “autre” used by Savvy.
baisse [VocabularyItemObject] No Describes how to override the expression “baisse” used by Savvy.
barre [VocabularyItemObject] No Describes how to override the expression “barre” used by Savvy.
chemin [VocabularyItemObject] No Describes how to override the expression “chemin” used by Savvy.
chute [VocabularyItemObject] No Describes how to override the expression “chute” used by Savvy.
contributeur [VocabularyItemObject] No Describes how to override the expression “contributeur” used by Savvy.
courbe [VocabularyItemObject] No Describes how to override the expression “courbe” used by Savvy.
creux [VocabularyItemObject] No Describes how to override the expression “creux” used by Savvy.
croissance [VocabularyItemObject] No Describes how to override the expression “croissance” used by Savvy.
declin [VocabularyItemObject] No Describes how to override the expression “déclin” used by Savvy.
decroissance [VocabularyItemObject] No Describes how to override the expression “décroissance” used by Savvy.
diminution [VocabularyItemObject] No Describes how to override the expression “diminution” used by Savvy.
ecart [VocabularyItemObject] No Describes how to override the expression “écart” used by Savvy.
eleve [VocabularyItemObject] No Describes how to override the expression “élevé” used by Savvy.
ensemble [VocabularyItemObject] No Describes how to override the expression “ensemble” used by Savvy.
evenement [VocabularyItemObject] No Describes how to override the expression “événement” used by Savvy.
evolution [VocabularyItemObject] No Describes how to override the expression “évolution” used by Savvy.
exceptionnel [VocabularyItemObject] No Describes how to override the expression “exceptionnel” used by Savvy.
faible [VocabularyItemObject] No Describes how to override the expression “faible” used by Savvy.
fluctuation [VocabularyItemObject] No Describes how to override the expression “fluctuation” used by Savvy.
grandeur [VocabularyItemObject] No Describes how to override the expression “grandeur” used by Savvy.
graphique [VocabularyItemObject] No Describes how to override the expression “graphique” used by Savvy.
groupe [VocabularyItemObject] No Describes how to override the expression “groupe” used by Savvy.
histogramme [VocabularyItemObject] No Describes how to override the expression “histogramme” used by Savvy.
important [VocabularyItemObject] No Describes how to override the expression “important” used by Savvy.
inferieur [VocabularyItemObject] No Describes how to override the expression “inférieur” used by Savvy.
intervalle [VocabularyItemObject] No Describes how to override the expression “intervalle” used by Savvy.
item [VocabularyItemObject] No Describes how to override the expression “item” used by Savvy.
limite_basse [VocabularyItemObject] No Describes how to override the expression “limite basse” used by Savvy.
limite_haute [VocabularyItemObject] No Describes how to override the expression “limite haute” used by Savvy.
limite_max_basse [VocabularyItemObject] No Describes how to override the expression “limite max basse” used by Savvy.
limite_max_haute [VocabularyItemObject] No Describes how to override the expression “limite max haute” used by Savvy.
limite_moyenne_basse [VocabularyItemObject] No Describes how to override the expression “limite moyenne basse” used by Savvy.
limite_moyenne_haute [VocabularyItemObject] No Describes how to override the expression “limite moyenne haute” used by Savvy.
maximum [VocabularyItemObject] No Describes how to override the expression “maximum” used by Savvy.
mesure [VocabularyItemObject] No Describes how to override the expression “mesure” used by Savvy.
minimum [VocabularyItemObject] No Describes how to override the expression “minimum” used by Savvy.
montee [VocabularyItemObject] No Describes how to override the expression “montée” used by Savvy.
mouvement [VocabularyItemObject] No Describes how to override the expression “mouvement” used by Savvy.
niveau [VocabularyItemObject] No Describes how to override the expression “niveau” used by Savvy.
objectif [VocabularyItemObject] No Describes how to override the expression “objectif” used by Savvy.
part [VocabularyItemObject] No Describes how to override the expression “part” used by Savvy.
partie [VocabularyItemObject] No Describes how to override the expression “partie” used by Savvy.
periode [VocabularyItemObject] No Describes how to override the expression “période” used by Savvy.
pic [VocabularyItemObject] No Describes how to override the expression “pic” used by Savvy.
point [VocabularyItemObject] No Describes how to override the expression “point” used by Savvy.
sankey [VocabularyItemObject] No Describes how to override the expression “sankey” used by Savvy.
section [VocabularyItemObject] No Describes how to override the expression “section” used by Savvy.
selection [VocabularyItemObject] No Describes how to override the expression “sélection” used by Savvy.
significativement [VocabularyItemObject] No Describes how to override the expression “significativement” used by Savvy.
sommet [VocabularyItemObject] No Describes how to override the expression “sommet” used by Savvy.
stagnation [VocabularyItemObject] No Describes how to override the expression “stagnation” used by Savvy.
suivant [VocabularyItemObject] No Describes how to override the expression “suivant” used by Savvy.
superieur [VocabularyItemObject] No Describes how to override the expression “supérieur” used by Savvy.
taille [VocabularyItemObject] No Describes how to override the expression “taille” used by Savvy.
tendance [VocabularyItemObject] No Describes how to override the expression “tendance” used by Savvy.
valeur [VocabularyItemObject] No Describes how to override the expression “valeur” used by Savvy.
visiblement [VocabularyItemObject] No Describes how to override the expression “visiblement” used by Savvy.
{
    "valeur": [ { "root": "valeur", "gender": "FEMININE"}, { "root": "montant" }, ... ],
    "taille": [ { "root": "longueur", "gender": "FEMININE"} ],
    [...]
}

Vocabulary Item Object

Describes a vocabulary element.

Field Type Mandatory Description
root String Yes The word root to use.
gender GenderEnum No The gender of the word. It is highly recommanded for French nouns.
{
    "root": "grandeur",
    "gender": "FEMININE"
}

Chart Object

Chart Information about dimensions, measures and facts.

Field Type Mandatory Description
inputChart InputChartObject Yes General information on the Chart.
outputText OutputParamObject Yes Meta-data for preferences relating to the output text.
dimensions [DimensionInfoObject] Yes There must be one Dimension block per dimension in the chart, 2 max.
measures [MeasureInfoObject] Yes There must be one Measure block per measure in the chart, 2 max.
facts [FactObject] Yes List of facts, representing the measures values for each dimension (or couple of dimensions).
{
    "inputChart":
    {
        "type": "LINE_CHART",
        "multiSeriesType": "UNRELATED"
    },
    "outputText":
    {
        "levelOfDetail":7,
        "lang":"en"
    },
    "dimensions":
    [{
        "label": "serie",
        "cardinal": 3
    }],
    "measures":
    [{
        "label": "sales",
        "defaultValue": "0",
        "meaningOfUp": "GOOD"
    }],
    "facts": [...]
}

Input Chart Object

Semantic information about the chart. Those meta-data are used to understand the relations between data.

Field Type Mandatory Description
type ChartTypeEnum Yes Format of the chart.
multiSeriesType [MultiSeriesEnum] Yes How the data are related to each other.
mainDimensionIndex Integer No The index of the dimension which is considered as main in the analysis. Only used when there are several dimensions.
mainDimensionOrdered Boolean No Deprecated. Use the property ordered of each dimension description.
disableInterpolation Boolean No When data values are missing in a chart, the generator tries to compute approximate ones. If interpolation is disabled, the default value is used for those missing values.
disableAggregation Boolean No When there are multiple dimensions defined for a single measure you could block the fact that the dimensions should be grouped together for the purpose of creating a more general analysis on the behavior of the chart data.
currentSelection [SelectionObject] No The selection tag is optional, it is used to describe the current selection (on other dimensions than the one of the data). Eg: The commented chart displays the sales by month, but only for the United Kingdom.
otherPartPresents Boolean No Indicates if low values should be grouped together to form a section Others.
singularExceptions [String] No Yseop identifies if your measures and dimensions are singular or plural. However, you can override this identification by entering here the nouns that should be singular.
pluralExceptions [String] No Same as for singularExceptions, but for plural entities.
relevantEntryThreshold Integer No Option for Sankey charts - number of entry points to consider. Select -1 for all results, or any real number for a limited selection.
relevantExitThreshold Integer No Option for Sankey charts - number of exit points to consider. Select -1 for all results, or any real number for a limited selection.
nbrPathThreshold Integer No Option for Sankey charts - number of intermediate steps to consider. Select -1 for all results, or any real number for a limited selection.
exitLabel Integer No Option for Sankey charts - When there is only one exit, set the label for this exit to influence recommendation. exitLabel. 0 = neutral, 1 = positif and -1 = negatif label.
{
    "type": "LINE_CHART",
    "mainDimensionIndex": 0,
    "multiSeriesType": "UNRELATED"
}

Output Param Object

Information about the expected output text.

Field Type Mandatory Description
levelOfDetail Integer Yes Number between 1 and 7, where 1 produces the shortest text, and 7 the most verbose one.
lang LangEnum Yes Language of the generated text.
useBulletPoints Boolean No Specifies whether bullet points should be used when generating output text.
modelProjection ProjectionEnum No Choice beteween the two methods used to compute the projection.
sizeTrend Integer No Number of data points used to compute the trend of the projection.
sizeProjection Integer No Number between 2 and sizeTrend, number of projected points. Limited to 1000 points.
externalProjection List(Integer) No If the modelProjectiopn choose is external, it is the list of your projected value.
{
    "levelOfDetail": 7,
    "lang": "en",
    "modeleProjection":"linear",
    "sizeTrend":2,
    "sizeProjection":2
}

{
    "levelOfDetail": 7,
    "lang": "en",
    "modeleProjection":external,
    "externalProjection":
        [1,
        2,
        3..]
}

Dimension Info Object

This object describes one of the dimensions of the chart. It is a part of the chart definition here.

Dimensions are the basis on which all calculations are performed. They are descriptive attributes, e.g. text fields, dates or discrete numbers. There can be several dimensions if charts aggregate several calculations.

Field Type Mandatory Description
label String Yes The Dimension’s name (can contain spaces).
technicalLabel Boolean No Set to true if the label is technical (eg: =SUM({sales}, Month)) rather than textual (eg: Sales) and thus shouldn’t be used in the generated chart description.
othersLabel String No Sometimes data are grouped in a section ‘Other’ in charts. You can define here a specific label for this section.
cardinal Integer Yes Number of elements in the Dimension.
tags [String] No Optional, it can be used to determine if the dimension is ordered or unordered. Currently recognized values: $numeric, $integer, $timestamp, $date.
ordered Boolean No Overrides automatic detection (via tags or analysis of dimension points) if set to true or false. Do not set this attribute if automatic ordering is desired.
{
    "label": "month",
    "othersLabel": "Others",
    "cardinal": 12
}

Measure Info Object

This object describes one of the measures of the chart. It is a part of the chart definition here.

Measures are the data computed for each dimension. They represent what will be visible in the chart.

Field Type Mandatory Description
label String Yes The Dimension’s name (can contain spaces).
technicalLabel Boolean No Set to true if the label is technical (eg: =SUM({sales}, Month)) rather than textual (eg: Sales) and thus shouldn’t be used in the generated chart description.
defaultValue String Yes Number of elements in the Dimension.
meaningOfUp MeaningOfUpEnum Yes Specifies if high values should be interpreted with a positive or negative meaning.
unit String No Defines the unit for currencies or quantities. It can be ‘%’ to indicates that the values are percentage. See the usage here.
{
    "label": "sales",
    "technicalLabel": false,
    "defaultValue": "0",
    "meaningOfUp": "GOOD",
    "unit": "$"
}

Fact Object

The Facts represent all the points of the chart: it is a matrix between the different dimensions, where values are measures.

Field Type Mandatory Description
dimensions [MeasureValueObject] Yes Values for each dimension.
measures [DimensionValueObject] Yes Values for each measure.
{
    "dimensions":[
        { "index": 0, "label": "01/01/2015", "position": 0 },
        { "index": 1, "label": "United Kingdom", "position": 0 }
    ],
    "measures":[
        { "index": 0, "value": "150" }
    ]
}

Dimension Value Object

For each point, specify the value of one of the dimensions (used in Fact declaration, here).

Field Type Mandatory Description
index Integer Yes Index of the dimension in the ‘Dimensions’ array (indexes start at 0).
label String Yes Used in text generation for identifying this point.
position Integer Yes The position is the ‘coordinate’ of the dimension point related to other points on this dimension. For instance January is the first month. Only relevant for ordered dimensions.
{
    "index": 0,
    "label": "01/01/2015",
    "position": 0
}

In the case of data describing Sankey Charts, the Dimension Value Object format is the following:

{
    "index": 0,
    "label": "start, middle, end",
    "position": 0
}

Measure Value Object

For each point, specify the value of one of the measures (used in Fact declaration, here).

Field Type Mandatory Description
index Integer Yes Index of the measure in the ‘Measures’ array (indexes start at 0).
value String Yes The value for this measure (only numeric values are accepted).
{
    "index": 0,
    "value": "150"
}

Selection Object

This object is used to describe the current selection (on other dimensions than the one of the data). Eg: the commented chart displays the sales by month, but only for the United Kingdom.

Note: It is not necessary to indicate selections for dimension(s) of the chart. Actually, they will be ignored.

Field Type Mandatory Description
field Integer Yes Name of the dimension/measure to which a selection is applied.
values [String] Yes Values selected in field dimension/measure. Currently, only the 5 first values are used by the knowledge base.
selectedElementCount Integer Yes The number of selected elements can differ from the number of elements of the values array.
{
    "field": "Region",
    "values": ["United Kingdom", "France"],
    "selectedElementCount": 15
}

Enums

Chart Type Enum

Currently, there are three main types of charts handled by the application. However, some more complicated charts (like points charts) can fit in one of those categories.

Value Description
LINE_CHART Use to describe line or points charts.
BAR_CHART Use to describe bar or cluster charts.
PIE_CHART Use to describe pie charts.
SANKEY_CHART Use to describe Sankey charts.

Multi Series Enum

Indicates if the measures are related to each other. For value vs reference, the value should be first and the reference second in the measure order.

Value Description
UNRELATED Measures are not related to each other.
VALUE_VS_REFERENCE The second measure is supposed to be relative to the first one.

Lang Enum

Output language for generated text. For now, English and French are available. Other languages are coming soon.

Value Description
en English
fr French

Projection Enum

Methods used for calculating the projection. For now the projected points follow a linear trend, additional methods are planned for future release.

Value Description
linear Linear regression.
led Double exponential smoothing. https://en.wikipedia.org/wiki/Exponential_smoothing#Double_exponential_smoothing.
external Allows you to give your pre-calculate projected points.

Meaning Of Up Enum

Semantic information about the measures values. Specifies if high values should be interpreted with a positive or negative meaning.

Value Description
GOOD Means that high values are positive information (eg: sales).
BAD Means that high values are negative information (eg: expenses).

Gender Enum

Information on the gender of a word used by the profiles.

Value Description
FEMININE Means that the word is feminine (eg: “courbe” (in French)).
MASCULINE Means that the word is masculine (eg: “homme” (in French)).

Output

When all went well, the server returns the HTTP status code 200:

HTTP Status Code Returns Description
200 HTML Success.

The ouput is returned in a HTML document. Here is an example of returned output:

<html xmlns:y="http://www.yseop.com/engine/3"
      xmlns:yt="http://www.yseop.com/text/2"
      xmlns:yp="http://www.yseop.com/profiling/1">
    <body>
        <div id="yseop-text">
            <div class="yseop-result">
                <div class="text-result">
                    This chart shows the Revenue for the following Product Sub Group Descs: Fresh Vegetables, Hot Dogs, Fresh Fruit, Frozen Vegetables, Sugar, Bologna, Coffee and 63 others.
                    <p></p><p></p>
                    What stands out in this situation is that a few Product Sub Group Descs account for
                    more than half of the total. There is obviously a dominant group of Product Sub Group Descs. This group is composed of six Product Sub Group Descs: Fresh Vegetables with
                    11.57 %, Hot Dogs with 9.51 %, Fresh Fruit with 8.60 %, Frozen Vegetables with 7.50
                    %, Sugar with 7.01 % and Bologna with 6.09 %.
                    <p></p><p></p>
                    Combined, the 64 other Product Sub Group Descs account for the rest of the list, accounting for 49.72 % of the total.
                    <p></p>
                    When taken together, the 70 Product Sub Group Descs amount to a total value of 67,119,290. The average is 958,847.
                    <p></p>
                </div>
                <span class="errors-and-warnings"></span>
            </div>
            <div class="technical-info">
                <div id="engineErrors"> Engine errors :<br></div>
                <div> Engine process time: <span id="processingTime">132.96</span>ms</div>
                <div> Timestamp: <span id="timestamp">2016-04-11T08:05:20:209</span></div>
                <div> Engine PID: <span id="enginePID">71D6</span></div>
                <div> KB Version: <span id="kbVersion">1.0.9</span></div>
            </div>
        </div>
    </body>
</html>

HTTP Status Error Codes

Here is a list of all the error messages you can receive if the text generation failed:

400: Bad Request

HTTP Status Code Returns Description
400 JSON Generally means the json format is not compliant to the schema. The body contains the error message.
[
    {
        "level": "error",
        "schema": {
            "loadingURI": "#",
            "pointer": "/properties/charts/items/properties/inputChart"
        },
        "instance": {
            "pointer": "/charts/0/inputChart"
        },
        "domain": "validation",
        "keyword": "type",
        "message": "instance type (string) does not match any allowed primitive type (allowed: [\"object\"])",
        "found": "string",
        "expected": [
            "object"
        ]
    }
]

401: Unauthorized

HTTP Status Code Returns Description
401 HTML Means your API key token is not correct or expired.
<html>
    <head>
        <title>Apache Tomcat/7.0.52 (Ubuntu) - Error report</title>
        <style> ...</style>
    </head>
    <body>
        <h1>Etat HTTP 401 - </h1>
        <HR size="1" noshade="noshade">
        <p>
            <b>type</b> Status report
        </p>
        <p>
            <b>message</b>
            <u></u>
        </p>
        <p>
            <b>description</b>
            <u>This request requires HTTP authentication.</u>
        </p>
        <HR size="1" noshade="noshade">
        <h3>Apache Tomcat/7.0.52 (Ubuntu)</h3>
    </body>
</html>

500: Server Error

HTTP Status Code Returns Description
500 XML Can mean the json is misformed, or an exception occured in the application.
<?xml version="1.0" encoding="ISO-8859-1"?>
<y:output xmlns:y="http://www.yseop.com/engine/3">
    <y:data-end>
        <y:logging>
            <y:log level="error">
                <y:message>
                  JsonParseException Unexpected close marker ']':
                  expected '}' (starting at ... line: 1, column: 2434])
                  at ... line: 1, column: 2473]
                </y:message>
                <y:source name="yseop-manager"></y:source>
                <y:owner name="yseop-manager"></y:owner>
            </y:log>
        </y:logging>
    </y:data-end>
</y:output>

503: Not Available

HTTP Status Code Returns Description
503 HTML The server is currently unable to respond, because an update is running. Can occur too if the API key is expired.

Complete Body Example

{
    "extensionVersion": "2",
    "charts":
    [{
        "inputChart":
        {
            "type": "LINE_CHART",
            "mainDimensionIndex": 0,
            "mainDimensionOrdered": true,
            "multiSeriesType": "UNRELATED",
            "disableInterpolation": true,
            "disableAggregation" : false,
            "currentSelection":
            [{
                "field": "Region",
                "values": ["United Kingdom", "France"],
                "selectedElementCount": 15
            }]
        },
        "outputText":
        {
            "levelOfDetail":7,
            "persona":"MANAGER",
            "lang":"en",
            "modelProjection":"linear",
            "sizeTrend":2,
            "sizeProjection":2
        },
        "dimensions":
        [{
            "label": "month",
            "othersLabel": "Others",
            "cardinal": 24
        }],
        "measures":
        [{
            "label": "number of laser swords on Earth",
            "technicalLabel": false,
            "defaultValue": "0",
            "meaningOfUp": "GOOD",
            "unit":""
        }],
        "facts":
        [{
            "dimensions":[{ "index":0, "label":"01/01/2015", "position":0 }],
            "measures":[{ "index":0, "value":"150" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/02/2015", "position":1 }],
            "measures":[{ "index":0, "value":"124.5"}]
        },
        {
            "dimensions":[{ "index":0, "label":"01/03/2015", "position":2 }],
            "measures":[{ "index":0, "value":"150.64499999999998" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/03/2015", "position":3 }],
            "measures":[{ "index":0, "value":"150.64499999999998" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/04/2015", "position":4 }],
            "measures":[{ "index":0, "value":"150.64499999999998" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/05/2015", "position":5 }],
            "measures":[{ "index":0, "value":"150.64499999999998" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/06/2015", "position":6 }],
            "measures":[{ "index":0, "value":"150.64499999999998" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/07/2015", "position":7 }],
            "measures":[{ "index":0, "value":"54" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/08/2015", "position":8 }],
            "measures":[{ "index":0, "value":"150.64499999999998" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/09/2015", "position":9 }],
            "measures":[{ "index":0, "value":"40" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/10/2015", "position":10 }],
            "measures":[{ "index":0, "value":"30" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/11/2015", "position":11 }],
            "measures":[{ "index":0, "value":"20" }]
        },
        {
            "dimensions":[{ "index":0, "label":"01/12/2015", "position":12 }],
            "measures":[{ "index":0, "value":"1" }]
        }]
    }]
}

Support

If you encounter any trouble using this API, please contact us: Savvy.

Resources

Please find some files you can use for testing the API:

  • the swagger file for this API
  • the input schema file (you can use this file to check your input)
  • an example of an input json file
  • an example of a postman json file. Please note that you have to update the Authorization header with your key. This postman collection gives you access to three kind of examples:
    • A simple example
    • An example using a profile id
    • An other one using a profile object
  • the description file of all values used by Savvy Profiles.

Release Note

Please find the Release Note here.

Algorithm considerations

Percentage usage

When the value "%" is used as unit in a measure definition, an automatic scale is applied to the data (0.1 will be displayed as 10%).

Input sorting check

The Savvy KB checks if the input is well sorted before starting the analysis. If it succeeds to enrich the dimensions labels and if the enriched objects are comparable (for example, dates are comparable), it uses that. Else, it uses the position specified in each DimensionFact. This sorting is enabled only if the dimension is ordered.

Description of date format

To be understood, a date must conform to the following pattern:

- "<calend>"
- "<calend>T<iso-8601-clock>"
- "<calend>T<iso-8601-clock>Z"
- "<calend>:<clock>"
- "Gmt <calend>:<clock>"

with <calend> conforming to one of the following patterns:
- yyyy/mm/dd (As a norm, you should privilege this format)
- dd/mm/yyyy
- dd/mmm/yyyy
- dd/mmm/yy
- dd month yyyy
- dd month yy
- dd/mm/aa
- yy/mm/dd
- dd/mm

with:
- <mm>: Integer between 1 and 12
- <mmm>: Three first letter of month name (case insensitive). For example apr for April, dec for December.
- <month>: Full name of the month (case insensitive)

and <clock> conforming to one of the following pattern:
- <hour>h<minute>'
- <hour>h<minute>
- <hour>h<minute>'<second>
- <hour>h<minute>'<second>

and <iso-8601-clock> conforming to one of the following pattern:
- <hour>:<minute>:<second>
- <hour>:<minute>

with:
- <hour>: Integer between 1 and 23
- <minute>: Integer between 1 and 59
- <second>: Integer between 1 and 59