{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":742,"path":"api-reference/server-api-reference/DataScopedAPI.md","title":"Data - Scoped, Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# Data - Scoped, Global\n\nThe Data API provides a data object that contains the results of transform performed by a sn\\_clotho.Client.transform\\(\\) method.\n\nDo not use a constructor to create an instance of this class, instead use the object returned by the sn\\_clotho.Client.transform\\(\\) method.\n\nYou can call this class in scoped and global server scripts. This class runs in the `sn_clotho` namespace identifier.\n\nThis class is part of the MetricBase application.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## Scoped Data - getEnd\\(\\)\n\nReturns the end time for data in the Data object.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|GlideDateTime|The end of the time period.|\n\n## Scoped Data - getLabel\\(\\)\n\nReturns the label assigned by the sn\\_clotho.ClothoTransform.label\\(\\) method.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|The label assigned to the data.|\n\n## Scoped Data - getMetricName\\(\\)\n\nReturns the name of the metric of the data series. Returns null when the data object is associated with multiple data series.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|Name of the metric field. Returns null when the data object is associated with multiple data series.|\n\n## Scoped Data - getPeriod\\(\\)\n\nReturns the time period in milliseconds.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|Number|The elapsed time in seconds.|\n\n## Scoped Data - getStart\\(\\)\n\nReturns the start time for data in the Data object.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|GlideDateTime|The time for the first data point.|\n\n## Scoped Data - getSubject\\(\\)\n\nReturns the subject of the data series. Returns null when the data object is associated with multiple data series.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|The subject field value of the subject GlideRecord. This is generally the sys\\_id of the subject GlideRecord.|\n\n## Scoped Data - getTableName\\(\\)\n\nReturns the name of the table assigned in the DataSelector class constructor. Returns null when the data object is associated with multiple data series.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|Table name. Returns null when the data object is associated with multiple data series.|\n\n## Scoped Data - getValues\\(\\)\n\nReturns an array of values.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|Array|An array of numbers.|\n\n## Scoped Data - size\\(\\)\n\nReturns the number of values in the Data object.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|Number|The number of values in the object.|\n\n"}}