Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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 org.codehaus.sonar:sonar

GET http://nemo.sonarsource.org/api/timemachine?resource=org.codehaus.sonar:sonar&metrics=coverage,ncloc&fromDateTime=2012-01-01T00:00:00+0100

Response Format

JSON

Parameters

Parameter

Description

Required

Default Value

Example Value

resource

id or key of the resource (ie: component)

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

format

Response format can be set through:

  • Parameter format: csv | json
  • Or the 'Accept' property in the HTTP header:
    • Accept:application/json
If nothing is set, json is used.
NoNonejson
  • No labels