Skip to main content
GET
/
audits
/
{auditId}
/
assets
/
code-changes
Java
package hello.world;

import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.operations.ListCodeChangesRequest;
import com.vanta.vanta_auditor_api.models.operations.ListCodeChangesResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Vanta sdk = Vanta.builder()
                .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
            .build();

        ListCodeChangesRequest req = ListCodeChangesRequest.builder()
                .auditId("<id>")
                .build();

        ListCodeChangesResponse res = sdk.audits().listCodeChanges()
                .request(req)
                .call();

        if (res.paginatedResponseCodeChange().isPresent()) {
            System.out.println(res.paginatedResponseCodeChange().get());
        }
    }
}
{
  "results": {
    "pageInfo": {
      "hasNextPage": true,
      "hasPreviousPage": false,
      "startCursor": "code_change_12345",
      "endCursor": "code_change_12345"
    },
    "data": [
      {
        "id": "code_change_12345",
        "codeChange": "fix-auth-bug",
        "identifier": "101",
        "service": "github",
        "repository": "vanta/obsidian",
        "openedAt": "2025-01-25T14:30:00.000Z",
        "closedAt": "2025-03-25T14:30:00.000Z"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://developer.vanta.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

auditId
string
required

The audit ID

Query Parameters

pageSize
integer<int32>
default:10

Maximum number of results per page (1-100, default 10) Controls the maximum number of items returned in one response from the API.

Required range: 1 <= x <= 100
pageCursor
string

Pagination cursor from previous response A marker or pointer, telling the API where to start fetching items for the subsequent page in a paginated dataset. Note that the requested page will not include the item that corresponds to this cursor but will start from the one immediately after this cursor.

Search term for filtering by code change title or repository name

sourcesMatchesAny
enum<string>[]

Filter code changes by version control source (accepted values: github, gitlab, bitbucket, azuredevops)

Version control source service name for code changes.

Available options:
github,
gitlab,
bitbucket,
azuredevops
startDate
string<date-time>

Filter code changes closed on or after this date (ISO 8601)

endDate
string<date-time>

Filter code changes closed on or before this date (ISO 8601)

Response

200 - application/json

Paginated list of code changes with pagination metadata

results
object
required