File Catalog Api Get File Catalog Entry
Returns the entry with the hypervisors that have the file. Accessible to every authenticated role.
File catalog entry id
101
200 OK successful response envelope. The entry with the hypervisors that have the file
{
"fileId": 101,
"fileName": "backup-agent.sh",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"fileKind": "SCRIPT",
"globalState": "UNAPPROVED",
"hypervisorCount": 2,
"fileSize": 2048,
"instances": [
{
"endpointId": "2",
"hostname": "esx02.example.com",
"path": "/opt/backup/backup-agent.sh"
},
{
"endpointId": "4",
"hostname": "esx04.example.com",
"path": "/opt/backup/backup-agent.sh"
}
]
}
Identifier of the catalog entry; there is one entry per distinct SHA-256, created when an agent first reports the hash
Last path segment of the path under which an agent first reported the hash, cut to 255 characters. Later reports of the same hash under another name do not change it
64 lowercase hex characters
Kind of file as classified by the agent.
ELF: The agent classified the file by its ELF header (0x7f followed by ELF)SCRIPT: The agent classified the file by a leading #! lineEXECUTABLE_OTHER: The agent qualified the file only by its executable permission
Absent until the agent reports a publisher or signer
Global file catalog state. It follows the action of the mapped rule: no rule or AUDIT is UNAPPROVED, ALLOW is APPROVED, BLOCK is BANNED.
UNAPPROVED: The entry has no rule or its rule's action is AUDIT; the state of a new entryAPPROVED: The entry's rule has the action ALLOWBANNED: The entry's rule has the action BLOCK
Number of distinct hypervisors that currently have the file
The catalog rule of an entry.
File size in bytes as first reported by an agent. Omitted when the agent reported none
At most 1,000 instances, ordered by hostname then path
400 Bad Request: INVALID_ARGUMENT when the fileId path variable is not a number
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
404 Not Found: FILE_NOT_FOUND
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
curl -H 'Authorization: <value>' https://{api_host}/api/v1/file-catalog/{fileId}