Search for files by path

Coverity Documentation

Version
latest

Example POST request to retrieve information on source code files and associated streams by specifying a path.

cURL request

curl --location --request POST "http://my_connect_host:8080/api/v2/files/search" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--user my_username:my_password \
--data '{ "path": "TestClass.vb" }'

Response body

{
  "files": [
    {
      "name": "TestClass.vb",
      "path": "/testvb/TestClass.vb",
      "contentHash": "5983d9fba67310a25bb9bd6104f555f3",
      "streams": [
        {
          "name": "testvbstream",
          "primaryProjectName": "testvb"
        }
      ]
    }
  ],
  "offset": 0,
  "totalRows": 200
}