Get a job network trace
const url = 'https://api.craci.dev/v1preview1/network-trace?provider=github&repo=octo-org%2Focto-repo&job_id=12345678901';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.craci.dev/v1preview1/network-trace?provider=github&repo=octo-org%2Focto-repo&job_id=12345678901' \ --header 'Authorization: Bearer <token>'Get the job metadata and its observed network accesses by GitHub job identity.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”CI provider. The only supported provider is GitHub (github).
Example
githubGitHub repository in OWNER/REPOSITORY form.
Example
octo-org/octo-repoGitHub job ID.
Example
12345678901Responses
Section titled “Responses”Job metadata and observed network accesses
object
GitHub job that produced the observations.
object
Git branch associated with the workflow run.
Git commit checked out by the job.
GitHub job identifier encoded as a decimal string to preserve 64-bit precision.
Display name of the GitHub Actions job.
CI provider that ran the job. Currently always GitHub (github).
GitHub repository in OWNER/REPOSITORY form.
One-based attempt number for the workflow run.
GitHub run identifier encoded as a decimal string to preserve 64-bit precision.
Final status reported for the job.
Name or path of the GitHub Actions workflow.
Network accesses in their original observation order.
object
HTTP request and response details.
object
Response body size encoded as a decimal string to preserve 64-bit precision.
Reason the request was denied, when applicable.
Remote IP address used for the request.
Network policy rule that matched the request, when any.
HTTP request method.
Original URL requested by the job.
Whether network policy denied the request.
HTTP response status code.
Time at which the network access was observed, in RFC 3339 format.
Stable ordering of this observation within the job trace.
object
DNS query and response details.
object
IP address of the DNS resolver.
DNS record name and type requested by the job.
Response returned by the DNS resolver.
Time at which the network access was observed, in RFC 3339 format.
Stable ordering of this observation within the job trace.
object
Time at which the network access was observed, in RFC 3339 format.
Stable ordering of this observation within the job trace.
TCP connection details.
object
Whether network policy allowed the connection.
Bytes received from the remote endpoint, encoded as a decimal string.
Bytes sent to the remote endpoint, encoded as a decimal string.
Reason the connection was denied, when applicable.
Connection duration as a human-readable interval, when available.
Connection error, when the connection failed.
Network policy rule that matched the connection, when any.
Remote TCP port.
Remote IP address of the connection.
Hostnames that resolved to the remote IP address.
Application protocols offered during the TLS handshake.
Server name sent during the TLS handshake, when present.
object
Time at which the network access was observed, in RFC 3339 format.
Stable ordering of this observation within the job trace.
SSH Git command and transfer details.
object
Whether network policy allowed the command.
Bytes received upstream, encoded as a decimal string.
Bytes sent upstream, encoded as a decimal string.
Reason the command was denied, when applicable.
Whether CRACI forced a shallow fetch.
Command duration as a human-readable interval, when available.
Exit status reported by the SSH command, when available.
SSH server hostname.
Network policy rule that matched the command, when any.
Original Git remote URL used by the job.
SSH server port.
Repository path sent to the Git server.
Requested Git service, such as git-upload-pack.
SSH username.
Version of the network trace document schema.
Example
{ "observations": [ { "protocol": "http" } ]}Malformed selectors
object
Human-readable explanation specific to this occurrence.
HTTP status code returned with the problem.
Short, human-readable summary of the problem.
URI identifying the problem type. about:blank uses the HTTP status meaning.
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}Missing, invalid, expired, or revoked token
object
Human-readable explanation specific to this occurrence.
HTTP status code returned with the problem.
Short, human-readable summary of the problem.
URI identifying the problem type. about:blank uses the HTTP status meaning.
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}Unknown tuple
object
Human-readable explanation specific to this occurrence.
HTTP status code returned with the problem.
Short, human-readable summary of the problem.
URI identifying the problem type. about:blank uses the HTTP status meaning.
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}Job is not terminal
object
Human-readable explanation specific to this occurrence.
HTTP status code returned with the problem.
Short, human-readable summary of the problem.
URI identifying the problem type. about:blank uses the HTTP status meaning.
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}Internal dependency unavailable
object
Human-readable explanation specific to this occurrence.
HTTP status code returned with the problem.
Short, human-readable summary of the problem.
URI identifying the problem type. about:blank uses the HTTP status meaning.
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}