Manage service parameters (Xparameter)
Xparameter externalizes service parameters and provides the ability to update parameters separately from the service itself. This separation creates an independent version history from the service and also allows users to execute Spark APIs against numerous parameter scenarios more efficiently.
Understand Xparameter terminology
Xparameter terminologyBefore we get into the specific mechanics, there are a couple terms to get familiar with.
Parameter: Numerical value(s) that describe a characteristic of a calculation model. They are adjustable variables/assumptions that determine the context in which the outputs are calculated against from the inputs (e.g. interest rates, inflation rate, tax base and rates, etc.).
Xparameter: A parameter range in a Spark service model that has been named Xparameter_<parameter>. This range is externalized from the service, creating an independent version history. Whenever the values of an Xparameter is updated, a new version of the Xparameter is created.
Parameter set: A JSON file containing all the Xparameters of the service with the versions defined. The parameter set's version ID, when defined in the Spark service API's request_meta informs the Spark engine which versions of the Xparameters should be used to run the calculations. This gives users the ability to run a Spark API of a single service version against different parameter scenarios. Whenever a new parameter set is configured, a new parameter set version is generated for it.
Compatibility group (Xparameter): A group of Xparameter versions in which the column numbers and headers are the same. When an Xparameter's column numbers or headers are altered in any way, a new compatibility group is created.
Compatibility group (parameter set): A group of parameter set versions in which the compatibility groups of every Xparameter are the same. When the collection of Xparameter compatibility groups in a parameter set version does not exist in any historical versions, then a new compatibility group is created. Every service version is assigned a parameter set compatibility group number based on which compatibility versions are embedded in the excel file at upload.
Default parameter set: The default parameter set is the most recent parameter set version uploaded to Spark within the service version's assigned compatibility group.
Xparameter hierarchy
Xparameter hierarchy
Within a service (across versions), there can be multiple compatibility groups.
Service versions and parameter set versions are grouped together by compatibility groups.
This hierarchy defines which service versions are compatible with which parameter set versions based on the compatibility groups.
Compatibility versions

Each service version can be tied to a parameter set compatibility group. With this implementation, it is clear which parameter set versions are compatible with which service versions. The service version's parameter set compatiblity group is listed in Version details.
Compatibility versioning for Xparameters
XparametersCompatibility group is dependent on the number of columns and the column header values. If the number of columns change or if any of the headers are renamed, this will cause a change in compatibility group.
Compatibility version is dependent on the existing versions of the
Xparameterwithin a particular compatibility group. If there are currently3versions of anXparameterwithin the compatibility group1, then the nextXparameterversion within group 1 would have the compatibility version4.
Compatibility versioning for parameter sets
Compatibility group of a parameter set version is dependent on the collection of compatibility group numbers of the
Xparameterversions contained within it. If the collection of the Xparameter group numbers within a parameter set version does not match that of any historical versions, this will create a new parameter set compatibility group.Compatibility version is dependent on the existing versions of the parameter sets within a particular compatibility group. If there are currently 3 versions of a parameter set within the compatibility group 1, then the next parameter set version within group 1 would have the compatibility version 4.
Map parameters
Syntax: Xparameter_<parameter>
Select the entire range of your parameter INCLUDING the headers (even if you're working with a single cell parameter, you must include a header).
Either go to the Name Box or open up the Name Manager in Excel
Name the selected range
Xparameter_<parameter>. In the example below the parameter set was defined asSingleColumn.Congratulations! You've created an
Xparameter! Once your Excel model is uploaded onto Spark, theXparameterranges that you have defined will automatically be extracted from the service.

Edit parameters
There are two methods to editing and creating new versions of Xparameters:
Method 1: Editing the Xparameter values directly from your Excel model
Xparameter values directly from your Excel modelThis method is recommended when:
You want to make changes to not only the values but also the dimensions of the
Xparameter. For instance, if you want to add an additional column to anXparameter, you should do so from the service Excel model.You want to edit multiple
Xparameters' values simultaneously.You want to automatically create a parameter set with the updated values of the
Xparameters in your Excel model.
Open up your Spark service's Excel model.
Edit the
Xparameters as you'd like. If you change the dimensions of theXparameter, make sure to update the named range to reflect the dimension changes.Save the file.
Upload the file onto Spark, creating a new version of the service.
When you upload a file onto Spark with updated values or changes in dimensions in the
Xparameterrange, Spark will detect the change and create new versions of theXparameters that have been edited.If any edits to
Xparameters are detected at upload (edited values OR dimension changes), a new parameter set will automatically be configured with the most recent versions of allXparameters.Reverting the values back to be the same as an older version of the
Xparameterwill still create a new version of theXparameter(meaning 2 or more versions of anXparametercan have identical content).
Method 2: Use backend APIs to edit Xparameters
XparametersThis method is recommended when:
You want to edit the values of just a single
Xparameter.You want to edit the values of Xparameters programmatically in code.
The referenced APIs can be found below in the section Backend APIs.
Use API B) to download the latest
Xparameterversion file.Edit the
Xparametervalues (if you want to change the dimensions of theXparameter, please use method 1 of updating anXparameterwritten above).Save the
Xparameterfile.Use API D) to upload the
Xparameterfile back onto Spark.You can now use this version ID to create a new parameter set.
Configure parameter sets
There are two methods to configuring new parameter sets:
Method 1: Configure parameter sets directly from your Excel model
This method is recommended when you're editing Xparameters with the intention of configuring a new parameter set.
Edit any
Xparameters in the Excel model by either creating new versions of theXparameteror returning to previous versions ofXparameter.Once you're happy with the values in ALL of the
Xparameters in the Excel model, upload it back onto Spark.New versions of
Xparameters will be created if the values/dimensions of theXparameters are different from those in the most recent version of the service. Please note that even if the edited values in anXparameter's cell range are identical to an older version of theXparameter, a new version of theXparameterwill still be created.A new parameter set will be configured with the versions of the
Xparameters found in the Excel model file as long as it's not identical to the MOST RECENT version of the parameter set. If there is an older parameter set version that exists already with the same versions of theXparameters, a new version of the parameter set will still be configured.
Method 2: Use backend APIs to configure parameter sets
This method is recommended when you want to create a parameter set programmatically in code.
The referenced APIs can be found below in the section Backend APIs.
Use API A) to get the version ID of the latest paramere set.
Use API C) to download the latest parameter set file.
Copy and paste the version IDs of the edited
Xparameters into the parameter set file.Save the parameter set file.
Use API D) to upload the parameter set file back onto Spark.
Use API G) if you want to see the
Xparametervalues that are contained in a parameter set.
Define a parameter set version in the payload
If a parameter set version is not defined in the API call request_meta, the most recent version of the parameter set will be used.
Set up your Spark API request payload. This can be find oun the API Tester.
In the
request_meta, add a new fieldparameterset_version_id. Depending on where this is added, you may need to add comma separators.Get the version ID of the parameter set version you'd like to use. Details can be found in Backend APIs API F).
Add the parameter set version ID to the value of the
parameterset_version_idfield.
Sample request
Backend APIs
A) Get info on the entire list of Xparameter and the parameter set files
This API will return information on all the Xparameter and parameter set files associated with a specific service. Use this API to find the latest version ID and file names of the Xparameters and/or parameter set.
Method GET
URI https://excel.{environment}.coherent.global/api/filemanager/GetFolderDocs?folderPath=/apps/parameters/{folder}.{service}
Authorization
The required Authorization follows the Execute API (v3) Authorization although x-synthetic-key may not be supported.
Sample response
B) Download an Xparameter file
This API will return the entire contents of an Xparameter version defined by the user. This content can then be downloaded as a JSON file to be edited and reuploaded. Use this API to download an Xparameter file.
Method GET
URI https://excel.{environment}.coherent.global/api/filemanager/DownloadDocumentByVersion/{xparameter_version_id}/{filename}.json
Authorization
The required Authorization follows the Execute API (v3) Authorization although x-synthetic-key may not be supported.
Sample response
C) Download a parameter set file
This API will return the entire contents of a parameter set version defined by the user. This content can then be downloaded as a text file to be edited and re-uploaded. Use this API to download a parameter set file.
Method GET
URI: https://excel.{environment}.coherent.global/api/filemanager/DownloadDocumentByVersion/{parameterset_version_id}/parameterset.json
Authorization
The required Authorization follows the Execute API (v3) Authorization although x-synthetic-key may not be supported.
Sample response
D) Upload an Xparameter or a parameter set file
This API allows you to upload Xparameter and parameter set files onto Spark. Once you've edited an Xparameter or created a parameter set, use this API to upload the files.
WARNING: Please make sure your filename and type is identical to the original. If the file name and type are not identical, Spark will not know which Xparameter or parameter set to create a new version for.
Method POST
URI https://excel.{environment}.coherent.global/api/filemanager/SaveDocument?folderPath=/apps/parameters/{folder}.{service}
Authorization
The required Authorization follows the Execute API (v3) Authorization although x-synthetic-key may not be supported.
Request headers
Note that the Content-Type should be multipart/form-data
Sample request
This is what the request body should look like on Postman.

Sample response
E) Get the entire list of Xparameter versions
Description: This API will return the version IDs of every Xparameter version. Use this API if you want to use an older version of an Xparameter to create a parameter set.
Method GET
URI https://excel.{environment}.coherent.global/{tenant}/api/v3/parameter/folders/{folder}/services/{service}/{xparametername}
Authorization
The required Authorization follows the Execute API (v3) Authorization although x-synthetic-key may not be supported.
Sample response
F) Get the entire list of parameter set versions
This API will return the version IDs of every parameter set created for a service. Use this API if you want to use an older version of a parameter set in an API call and you can't remember the version ID.
Method GET
URI https://excel.{environment}.coherent.global/{tenant}/api/v3/parameter/folders/{folder}/services/{service}
Authorization
The required Authorization follows the Execute API (v3) Authorization although x-synthetic-key may not be supported.
Sample response
G) Get the Xparameter values within a parameter set version
This API will return the Xparameter values within a parmeter set version. Use this API if you have a parameter set version ID but you're not sure what Xparameter values it contains.
Method GET
URI https://excel.{environment}.coherent.global/{tenant}/api/v3/parameter/versions/{parameter_set_version_id}
Authorization
The required Authorization follows the Execute API (v3) Authorization although x-synthetic-key may not be supported.
Sample response
Sample Spark service with Xparameters
XparametersBelow an example of a Spark service with Xparameters. You can upload this file to Spark to understand how Xparameter works.
Last updated
