title: Sonarqube REST API : What is the structure of "metrics" in "GET api/measures/component" WS
body: <p>In the response example from the web api documentation, I can see metric &quot;ncloc&quot; should be like this in the JSON web response :</p>
  <pre><code>  &quot;measures&quot;: [
    {
      &quot;metric&quot;: &quot;ncloc&quot;,
      &quot;value&quot;: &quot;114&quot;,
      &quot;periods&quot;: [
        {
          &quot;index&quot;: 1,
          &quot;value&quot;: &quot;3&quot;
        }
      ]
    },
  </code></pre>
  <p>But it's not, there is no &quot;periods&quot; for this metric in my response :</p>
  <pre><code>&quot;measures&quot;:[
  {
    &quot;metric&quot;: &quot;ncloc&quot;,
    &quot;value&quot;: &quot;2943&quot;
  },
  </code></pre>
  <p>There are &quot;periods&quot; for some other metrics though, and in this case, there is no metric value, only a value for each period (and there are never multiple periods, only one corresponding to the &quot;new code&quot; period).</p>
  <p>So here are my questions about this :
  How can I know which structure to expect for a metric ? what would be the metric where &quot;periods&quot; would have a list of periods and not just one corresponding to &quot;new code&quot; ?</p>