Difference between revisions of "Unify Monthly Data"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Created page with "=Overview= The Registry has the ability to unify monthly data so that the formats: yyyy-mm and yyyy-Mmm are considered the same on a data input. By default the Registry will...")
 
(Web Service)
Line 3: Line 3:
  
 
==Web Service==
 
==Web Service==
 +
There are two Web Services - one for setting the way the Registry works and the other for
 +
 +
=== Setting the Monthly Format ===
 +
Issue a '''POST''' request to the URL:  <registry location>/ws/secure/settings/setDataFrequencyFormat
 +
 +
This is a secure Web Service, so Authentication Credentials must be provided.
 +
 +
This takes a JSON Object which has a single field "MonthlyDataFormat".  Valid values for this are: "", "INCLUDE_M_CHARACTER", "EXCLUDE_M_CHARACTER"
 +
 +
An example of Valid JSON:
 +
<pre>
 +
{
 +
  "MonthlyDataFormat": "INCLUDE_M_CHARACTER"
 +
}
 +
</pre>
 +
 +
=== Getting the Registry's Format ===
 +
Issue a '''GET''' request to the URL:  <registry location>/ws/secure/settings/getDataFrequencyFormat
 +
 +
This is a secure Web Service, so Authentication Credentials must be provided.
 +
 +
A JSON Object will be returned which will state how the Registry has been configured. An example:
 +
<pre>
 +
{
 +
  "MonthlyDataFormat": "INCLUDE_M_CHARACTER"
 +
}
 +
</pre>
 +
 +
==Examples==
 +
POST requests cannot be made from a Web Browser (whereas GET requests can).  A tool such as POSTMAN

Revision as of 01:23, 30 October 2020

Overview

The Registry has the ability to unify monthly data so that the formats: yyyy-mm and yyyy-Mmm are considered the same on a data input. By default the Registry will treat the dates 2000-01 and 2000-M01 as different observation times. If you wish these to be represented as the same format (either with or without the "M" character this can be enabled in the Registry

Web Service

There are two Web Services - one for setting the way the Registry works and the other for

Setting the Monthly Format

Issue a POST request to the URL: <registry location>/ws/secure/settings/setDataFrequencyFormat

This is a secure Web Service, so Authentication Credentials must be provided.

This takes a JSON Object which has a single field "MonthlyDataFormat". Valid values for this are: "", "INCLUDE_M_CHARACTER", "EXCLUDE_M_CHARACTER"

An example of Valid JSON:

{
  "MonthlyDataFormat": "INCLUDE_M_CHARACTER"
}

Getting the Registry's Format

Issue a GET request to the URL: <registry location>/ws/secure/settings/getDataFrequencyFormat

This is a secure Web Service, so Authentication Credentials must be provided.

A JSON Object will be returned which will state how the Registry has been configured. An example:

{
  "MonthlyDataFormat": "INCLUDE_M_CHARACTER"
}

Examples

POST requests cannot be made from a Web Browser (whereas GET requests can). A tool such as POSTMAN