Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
DescriptionCheck authentication credentials

URL

/api/authentication/validate

HTTP MethodGET
Response Formatsjson | xml | txt

Security

Requires Global administrator roleAdminister System permission

Available sinceSonar Version 3.3

Examples

Use CaseExample Request

Check credentials of user admin (password should be admin)

curl http://localhost:9000/api/authentication/validate -v -u admin:admin

...

Code Block
titleJSON
languagejavascript
[
  {
    "id":73907420,
    "message":"Bad comparison of nonnegative value with -1 in org.sonar.channel.CodeReader.peekTo(EndMatcher,Appendable)",
    "line":117,
    "priority":"CRITICAL",
    "createdAt":"2012-06-02T23:32:49+0000",
    "rule":
      {
        "key":"findbugs:INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE",
        "name":"Correctness - Bad comparison of nonnegative value with negative constant"
      },
    "resource":
      {
        "key":"org.codehaus.sonar:sonar-channel:org.sonar.channel.CodeReader",
        "name":"CodeReader",
        "scope":"FIL",
        "qualifier":"CLA",
        "language":"java"
      }
	"review":
      { see /api/review web service }
  },
  ...
]

Parameters

None

validate":true}

Parameters

Parameter

Description

Required

Default Value

Example Value

format

Response format can be set through:

  • Parameter format: xml | json | txt
  • Or the 'Accept' property in the HTTP header:
    • Accept:text/xml
    • Accept:application/json
If nothing is set, json is used.

 

No

None

json