GetData request message
- Last UpdatedAug 29, 2023
- 4 minute read
This is an example of the full structure of a GetData request.
<GetDataRequestMessage xmlns="http://www.citect.com/Ampla/Data/2008/06">
<GetDataRequest>
<Credentials>
<Username>User</Username>
<Password>********</Password>
<Session />
</Credentials>
<View>
<Context>Plant</Context>
<Mode>Location</Mode>
<Module>Inventory</Module>
<Name>Inventory.InboundMaterialFlowView</Name>
<Fields />
<ModelFields />
</View>
<Filter>
<Location>Enterprise.Coal Site 1.Product Coal.CV1</Location>
<SamplePeriod />
<Criteria />
<LocationIdentifier>Location1</LocationIdentifier>
</Filter>
<OutputOptions>
<ResolveIdentifiers>false</ResolveIdentifiers>
<ExcludeModuleSpecificMetadata>false</ExcludeModuleSpecificMetadata>
<ExcludeSpecification>false</ExcludeSpecification>
</OutputOptions>
<Localization />
</GetDataRequest>
</GetDataRequestMessage>
Request parameters: Credentials section
The Credentials section contains the security details for authentication. You can provide the Username and Password values to use the Basic security method. If you do not provide explicit security values, Web services will attempt to use Integrated authentication. You must provide either Basic credentials, Integrated credentials, or a Session ID.
<Credentials>
<Username>User</Username>
<Password>********</Password>
<Session />
</Credentials>
|
Parameter |
Description |
|---|---|
|
Username |
The login name of the AVEVA™ Production Management user. This is a string value. Username and Password together are mutually exclusive with Session. |
|
Password |
The password that is associated with the AVEVA Production Management user. This is a string value. Username and Password together are mutually exclusive with Session. |
|
Session |
A GUID string value that identifies the session. This is a string value. Mutually exclusive with Username and Password. |
Request parameters: View section
The View section contains parameters with information about the context of the data.
<View>
<Context>Plant</Context>
<Mode>Location</Mode>
<Module>Inventory</Module>
<Name>Inventory.InboundMaterialFlowView</Name>
<Fields />
<ModelFields />
</View>
|
Parameter |
Description |
||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Context |
(Required) The navigation context. At this time, the only valid value for Context is Plant. |
||||||||
|
Mode |
(Required) The navigation mode. At this time, the only valid value for Mode is Location. |
||||||||
|
Module |
(Required) Module maps to one of the standard AVEVA Production Management modules and names the specified module in the request. This can be any module, such as Downtime, Production, Inventory. |
||||||||
|
Name |
The Name element defaults to <Module>.StandardView (and Metrics.AnalysisView for the Metrics module). This default behavior covers most standard queries. If an explicit value is provided, it overrides the default behavior. Module value is already provided by the Module element. <Module>.<View> For example, Downtime.StandardView or Inventory.BalanceByLot For Quality reporting points, be sure to specify the correct view name for that type of Quality.
|
||||||||
|
Fields |
The Fields element is an array of Field names. This enables you to control the columns returned by the query. The values do not have to be XML encoded. This value is optional. |
||||||||
|
ModelFields |
The ModelFields element is an array of model field names. Model Fields is an optional parameter that specifies which model item property to return and in what order. To use this functionality, you have to set the Associated Model property of the reporting point field to the associated model type of the linked model item. The full name of the linked model item is specified in the Historical Expression property of the reporting point field. The model fields are specified as a comma-delimited string with the dot between field associated with model item and name of the property of the model item: @ModelFields =’modelfield1.modelproperty1, modelfield2.modelproperty2’. Use model fields if you want to get value of the model item property (modelproperty1, modelproperty2) associated with the reporting point field (modelfield1, modelfield2). |
Request parameters: Filter section
The Filter section defines which data is returned within the described view. The approach here is to break out the most frequently used filters into first class citizens. Location and Sample Period are examples of this.
<Filter>
<Location>Enterprise.Coal Site 1.Product Coal.CV1</Location>
<SamplePeriod />
<Criteria />
<LocationIdentifier>Location1</LocationIdentifier>
</Filter>
|
Parameter |
Description |
|---|---|
|
Location |
(Required) Location maps to a AVEVA Production Management folder location when navigating "by location." |
|
SamplePeriod |
SamplePeriod is the datetime period component of a query folder. |
|
Deleted |
When this value is True, the deleted fields are included in results. Value can be True or False. Parameter is optional. |
|
Criteria |
The Criteria element is an array of custom filter values. Filters are specified with the use of the name/value principle. Parameter is optional. |
|
FilterEntries |
Contains the filter values for the returned data. For example: Name=Cause Value=BrokenPump filters the returned results to records with a Cause value of Broken Pump. Without filtering, the request returns all available data. |
|
LocationIdentifier |
The unique external identifier for AVEVA Production Management to recognize a reporting point or equipment from an external system. For example, an identifier from SAP for a reporting point. Must be a string value. Parameter is optional. |
|
Metadata |
When this value is True, the response includes Metadata. Value can be True or False. Parameter is optional. |
Request parameters: OutputOptions section
The OutputOptions section contains the set of output options.
<OutputOptions>
<ResolveIdentifiers>false</ResolveIdentifiers>
<ExcludeModuleSpecificMetadata>true</ExcludeModuleSpecificMetadata>
<ExcludeSpecification>true</ExcludeSpecification>
</OutputOptions>
|
Parameter |
Description |
|---|---|
|
ResolveIdentifiers |
The ResolveIdentifiers element enables the request to resolve Cause and Classification identifiers to return the text values that correspond. The value is True or False. |
|
ExcludeModuleSpecificMetadata |
When value is True, any module specific metadata is excluded from the response. This element is available only for the Inventory module. |
|
ExcludeSpecification |
When value is True, any specification metadata is excluded from the response. This element is available only for the Inventory module. |
Request parameters: Localization section
The Localization section contains parameters that are relevant to localizing the data for display.
<Localization>
<Language>fr-FR</Language>
< /Localization>
|
Parameter |
Description |
|---|---|
|
Language |
The Windows regional setting to determine the language display of data in the client. This can be any Windows regional setting value, for example, en-AU, en-GB, fr-FR. If no language is specified, the default en-US is used. |