Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

PostData Resource

  • Last UpdatedApr 21, 2020
  • 3 minute read

Description

Describes the data and layout that make up a set of private or shared content.

URL

http://localhost:32569/Historian/v2/Contents?overwrite=true

Method

POST

Required Parameters

  • Name
    The name of the content. If content with same name already exist, the API will fail and you'll see "duplicate content exists" as an HTTP status message.

    If you use "overwrite=true", the existing content with same name will be overwritten.

  • CreatedUserFirstName
    The first name of user associated with this content. This name displays as a tooltip or in the Content Management page. This name is not validated, so be sure to check spelling, etc. Example:

    "CreatedUserFirstName": "Wally"

  • CreatedUserLastName
    The last name of user associated with this content. This name displays as a tooltip or in the Content Management page. This name is not validated, so be sure to check spelling, etc. Example:

    "CreatedUserLastName": "Wonderware"

  • UserID
    The email ID of the user who created this personalized content. This user ID does not get validated, so be sure check for spelling, etc. yourself. Example:

    UserID:"wally.wonderware@gmail.com"

  • ChartType
    Specifies the chart type you want to use for this content.

    Examples:

    "ChartType":"Line Chart"

    "ChartType":"Status Board"

    "ChartType":"Cumulative Line"

    "ChartType":"Summary Chart"

    Note: If chart type provided is not one of the value listed,error 401 results.
    For complete code examples that create different types of charts, see the Examples section.

    If the layout is "All Tags" and is the active layout, these chart types are supported:

    • Column Chart

    • Composite Chart

    • Detail Grid

    • Map Chart

    • Status Board (default)

    • XY Plot

    If the layout is created for analog tags, these chart types are supported:

    • Column Chart

    • Cumulative Line

    • Cumulative Sum

    • Detail Grid

    • Diagnostic Grid

    • Line Chart

    • Map Chart

    • Status Board (default)

    • Summary Chart

    • Summary Grid

    • XY Plot

    Note: "Cumulative Sum" is the ChartType value used for a rolling sum chart.

    If the layout is created for non-analog tags, these chart types are supported:\

    • Diagnostic Grid

    • Gantt Chart

    • Map Chart

    • Status Board (default)

    • Summary

    • Summary Grid

    • Time-in-State Chart

  • LayoutInfo
    Information about the layout. At minimum, LayoutInfo must include at minimum TagDetails with some tags value.

Optional Parameters

  • TimePreset
    The relative or absolute time duration for the selected chart. Supported values are:

    Relative time:

    • 1 = Last 30 days

    • 2 = Last 7 days

    • 3 = Last 3 days

    • 4 = Yesterday

    • 5 = Today (default)

    • 6 = Last hour

    • 8 = This week

    • 9 = Last week

    • 10 = This month

    • 11 = Last month

      Absolute time:

      User can also provide absolute time in UTC format. Start time and end time should be separated by a comma, and start time should be the first. Example:

      "TimePreset": "2018-01-19T22:23:43.836Z,2018-01-21T22:23:43.836Z"

      Example of custom duration relative to current time:

      "TimePreset": "OffsetInMilliSecs:67288974"

  • Keywords

  • An array of keywords for this content. Example: "Keywords":["SecretFormula"]

  • ShareMode
    Makes the content public or private. The following values are supported:

    • 73 = Private content

    • 74 = Shared content (default)

      Example:

      "ShareMode":"74"

  • Scope
    The scope for the content to be created. Default value is "/". Examples:

    "Scope":"/"

    "Scope":"/Montreal/"

Sample Query

{

"upsert": {

"Name": "Column chart ContentWithScript",

"UserID": "wally.wonderware@gmail.com",

"CreatedUserFirstName": "Wally",

"CreatedUserLastName": "Wonderware",

"ChartType": "Column Chart",

"LayoutInfo": {

"TagDetails": [

{

"TagName": "Weather.Seattle.Cloudiness",

"IsSelected": "true"

},

{

"TagName": "Weather.Seattle.Wind Direction",

"IsSelected": "true"

},

{

"TagName": "Weather.Seattle.Wind Speed",

"IsSelected": "true"

}

],

"TimePreset":"5",

"TimeAggregate":"2"

},

"Keywords":[]

}

}

Notes

  • The details returned by this API includes an ID that is used internally to identify the specific content in the UI.

  • If you display the content you post, and then change sharemode, timepreset, and/or timeaggregate values, you must refresh the displayed content page to see updates. You can refresh the entire page, or search for the content again via the search box.

Related Links
TitleResults for “How to create a CRG?”Also Available in