Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
DescriptionGet a list of past measures

URL

/api/timemachine

HTTP MethodGET
Response Formatsjson | csv

Security

Requires User role on the project

Examples

Use CaseExample Request
Get past measures (since Januray 1st, 2012) on metrics lines of code and code coverage on project Sonar (key = org.codehaus.sonar:sonar)

...

...

languagenone

GET

...

Response Format

Code Block
titleJSON
languagejavascript
[
  {
    "cols":[{"metric":"coverage"},{"metric":"ncloc"}],
    "cells":[{"d":"2012-01-02T17:35:46+0000","v":[69.7,57343]},{"d":"2012-01-16T18:16:55+0000","v":[69.5,58132]}]
  }
]

Parameters

Parameter

Description

Required

Default Value

Example Value

resource

id or key of the resource

Yes

None

org.codehaus.sonar:sonar

metrics

Comma-separated list of metric keys/ids

Yes

None

coverage,violations_density

fromDateTime

ISO-8601 datetime (inclusive)

No

None

2010-12-25T23:59:59+0100

toDateTime

ISO-8601 datetime (inclusive)

No

None

2010-12-25T23:59:59+0100

formatResponse formats: json or csvNoNonejson