Required permission: VariableCreateDeleteGroup

A VariableValueGroup references a customized list of variable values. You can read the values of these variables using a single request. You can also use the $deltatoken feature to get only updated values for the variables.

To use a variable group, you must first create the group. For example, POST http://my_server:3580/nivariable/VariableValueGroups

POST JSON data:

  HTTP Header - Content-Type : application/jsonHTTP Body -{
  
   "VariableValues"

  : [{ "__metadata" : {

   "uri"

  : "http://my_server:3580/nivariable/VariableValues('ni.var.psp://localhost/process1/variable1')"} }, { "__metadata" : {

   "uri"

  : "http://my_server:3580/nivariable/VariableValues('ni.var.psp://localhost/process2/variable2')"} }]}

POST XML data:

  HTTP Header - Content-Type : application/xmlHTTP Body -<?xml version="1.0" encoding="utf-8"?><entry xmlns:d="http://my_server:3580/nivariable/" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> <title type="text"></title> <updated>2010-02-27T21:36:47Z</updated> <author> <name /> </author> <category term="nivariable.VariableValueGroup" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/VariableValues" href="VariableValues('ni.var.psp://localhost/process1/variable1')"/> <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/VariableValues" href="VariableValues('ni.var.psp://localhost/process1/variable2')"/> <content type="application/xml"> <m:properties> <d:Timeout>15000</d:Timeout> </m:properties> </content></entry>
Note You do not need to include required properties when creating resources for VariableValueGroups. The ID property of a VariableValueGroup is normally a required property, and resources created in OData must include required properties. However, there is no way to determine which IDs are available to use. If your OData client requires a value for the Id property in order to send a request, you can assign a random value. The variable Web service replaces the user-supplied Id property value with a unique value.

If the VariableValueGroup is created, the server returns a 201 response and adds a Location header indicating the newly created resource's URI. The response body contains the ID of the newly created group.

If the VariableValueGroup is not created, the server returns one of the following responses:

  • 500 Internal Server Error - The error occurred on the server side.
  • 400 Bad Request - The requested POST data is invalid.

The response body uses the standard OData error object to indicate the reason of failure.