<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Threat Prevention API query not detecting uploaded pdf file in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Threat-Prevention-API-query-not-detecting-uploaded-pdf-file/m-p/198598#M54450</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have been trying to query for pdf files that have been uploaded to the threat emulation/threat prevention API. Success messages are given when uploading the file all times, but when I try to use the query endpoint (&lt;A href="https://192.168.68.111:18194/tecloud/api/v1/file/query" target="_blank"&gt;https://192.168.68.111:18194/tecloud/api/v1/file/query&lt;/A&gt;) the file ends up as being "NOT_FOUND". When I upload the file and query right away for it it seems to be pending as it should in the queue while in the emulation process but right after a few moments it shows as NOT_FOUND. Why can't I find the file which I uploaded?&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"response" : [&lt;BR /&gt;{&lt;BR /&gt;"features" : [ "te" ],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1003,&lt;BR /&gt;"label" : "PENDING",&lt;BR /&gt;"message" : "File is pending"&lt;BR /&gt;},&lt;BR /&gt;"te" : {&lt;BR /&gt;"images" : [&lt;BR /&gt;{&lt;BR /&gt;"id" : "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"report" : {&lt;BR /&gt;"verdict" : "unknown"&lt;BR /&gt;},&lt;BR /&gt;"revision" : 1,&lt;BR /&gt;"status" : "pending"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1003,&lt;BR /&gt;"label" : "PENDING",&lt;BR /&gt;"message" : "File is pending"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;obs: I have been using a local appliance/vm for testing, so there has been no use of the cloud version of threat prevention nor the intent to do so.&lt;/P&gt;&lt;P&gt;Here is my file upload request and response:&lt;/P&gt;&lt;P&gt;REQUEST....&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;curl --insecure -X POST --location '&lt;A href="https://192.168.68.111:18194/tecloud/api/v1/file/upload" target="_blank"&gt;https://192.168.68.111:18194/tecloud/api/v1/file/upload&lt;/A&gt;' \&lt;BR /&gt;--header 'Content-Type: multipart/form-data' \&lt;BR /&gt;-F 'request={&lt;BR /&gt;"request":[&lt;BR /&gt;{&lt;BR /&gt;"features": ["te"],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;&lt;BR /&gt;"file_name":"test.pdf",&lt;BR /&gt;"te":{&lt;BR /&gt;"return_errors": true,&lt;BR /&gt;"version_info": true,&lt;BR /&gt;"images": [&lt;BR /&gt;{&lt;BR /&gt;"id": "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"revision":1&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}' \&lt;BR /&gt;-F 'file=@/home/blueguara/Downloads/test.pdf' \&lt;BR /&gt;-k&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;RESPONSE ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"response" : [&lt;BR /&gt;{&lt;BR /&gt;"features" : [ "te" ],&lt;BR /&gt;"file_name" : "test.pdf",&lt;BR /&gt;"file_type" : "pdf",&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092c89fa5a027882e04f807204a",&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1002,&lt;BR /&gt;"label" : "UPLOAD_SUCCESS",&lt;BR /&gt;"message" : "The file was uploaded successfully"&lt;BR /&gt;},&lt;BR /&gt;"te" : {&lt;BR /&gt;"images" : [&lt;BR /&gt;{&lt;BR /&gt;"id" : "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"report" : {&lt;BR /&gt;"verdict" : "unknown"&lt;BR /&gt;},&lt;BR /&gt;"revision" : 1,&lt;BR /&gt;"status" : "not_found"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1002,&lt;BR /&gt;"label" : "UPLOAD_SUCCESS",&lt;BR /&gt;"message" : "The file was uploaded successfully"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the request and response after looking for this same file in the query endpoint.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;REQUEST ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl --location '&lt;A href="https://192.168.68.111:18194/tecloud/api/v1/file/query" target="_blank"&gt;https://192.168.68.111:18194/tecloud/api/v1/file/query&lt;/A&gt;' \&lt;BR /&gt;--header 'Authorization: 9HFAI55GyFSILSEUSVHM8NhfV6zyCbPI' \&lt;BR /&gt;--header 'Content-Type: application/json' \&lt;BR /&gt;--data '{&lt;BR /&gt;"request":[&lt;BR /&gt;{&lt;BR /&gt;"features": [ "te" ],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;"te": {&lt;BR /&gt;"reports": [ "pdf" ],&lt;BR /&gt;"images": [&lt;BR /&gt;{&lt;BR /&gt;"id": "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"revision":1&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}' -k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RESPONSE...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"response" : [&lt;BR /&gt;{&lt;BR /&gt;"features" : [ "te" ],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1004,&lt;BR /&gt;"label" : "NOT_FOUND",&lt;BR /&gt;"message" : "Couldn't find the requested file, please upload it"&lt;BR /&gt;},&lt;BR /&gt;"te" : {&lt;BR /&gt;"images" : [&lt;BR /&gt;{&lt;BR /&gt;"id" : "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"report" : {&lt;BR /&gt;"verdict" : "unknown"&lt;BR /&gt;},&lt;BR /&gt;"revision" : 1,&lt;BR /&gt;"status" : "not_found"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1004,&lt;BR /&gt;"label" : "NOT_FOUND",&lt;BR /&gt;"message" : "Couldn't find the requested file, please upload it"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2023 01:25:03 GMT</pubDate>
    <dc:creator>mateus_cruz</dc:creator>
    <dc:date>2023-11-22T01:25:03Z</dc:date>
    <item>
      <title>Threat Prevention API query not detecting uploaded pdf file</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Threat-Prevention-API-query-not-detecting-uploaded-pdf-file/m-p/198598#M54450</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have been trying to query for pdf files that have been uploaded to the threat emulation/threat prevention API. Success messages are given when uploading the file all times, but when I try to use the query endpoint (&lt;A href="https://192.168.68.111:18194/tecloud/api/v1/file/query" target="_blank"&gt;https://192.168.68.111:18194/tecloud/api/v1/file/query&lt;/A&gt;) the file ends up as being "NOT_FOUND". When I upload the file and query right away for it it seems to be pending as it should in the queue while in the emulation process but right after a few moments it shows as NOT_FOUND. Why can't I find the file which I uploaded?&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"response" : [&lt;BR /&gt;{&lt;BR /&gt;"features" : [ "te" ],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1003,&lt;BR /&gt;"label" : "PENDING",&lt;BR /&gt;"message" : "File is pending"&lt;BR /&gt;},&lt;BR /&gt;"te" : {&lt;BR /&gt;"images" : [&lt;BR /&gt;{&lt;BR /&gt;"id" : "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"report" : {&lt;BR /&gt;"verdict" : "unknown"&lt;BR /&gt;},&lt;BR /&gt;"revision" : 1,&lt;BR /&gt;"status" : "pending"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1003,&lt;BR /&gt;"label" : "PENDING",&lt;BR /&gt;"message" : "File is pending"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;obs: I have been using a local appliance/vm for testing, so there has been no use of the cloud version of threat prevention nor the intent to do so.&lt;/P&gt;&lt;P&gt;Here is my file upload request and response:&lt;/P&gt;&lt;P&gt;REQUEST....&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;curl --insecure -X POST --location '&lt;A href="https://192.168.68.111:18194/tecloud/api/v1/file/upload" target="_blank"&gt;https://192.168.68.111:18194/tecloud/api/v1/file/upload&lt;/A&gt;' \&lt;BR /&gt;--header 'Content-Type: multipart/form-data' \&lt;BR /&gt;-F 'request={&lt;BR /&gt;"request":[&lt;BR /&gt;{&lt;BR /&gt;"features": ["te"],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;&lt;BR /&gt;"file_name":"test.pdf",&lt;BR /&gt;"te":{&lt;BR /&gt;"return_errors": true,&lt;BR /&gt;"version_info": true,&lt;BR /&gt;"images": [&lt;BR /&gt;{&lt;BR /&gt;"id": "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"revision":1&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}' \&lt;BR /&gt;-F 'file=@/home/blueguara/Downloads/test.pdf' \&lt;BR /&gt;-k&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;RESPONSE ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"response" : [&lt;BR /&gt;{&lt;BR /&gt;"features" : [ "te" ],&lt;BR /&gt;"file_name" : "test.pdf",&lt;BR /&gt;"file_type" : "pdf",&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092c89fa5a027882e04f807204a",&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1002,&lt;BR /&gt;"label" : "UPLOAD_SUCCESS",&lt;BR /&gt;"message" : "The file was uploaded successfully"&lt;BR /&gt;},&lt;BR /&gt;"te" : {&lt;BR /&gt;"images" : [&lt;BR /&gt;{&lt;BR /&gt;"id" : "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"report" : {&lt;BR /&gt;"verdict" : "unknown"&lt;BR /&gt;},&lt;BR /&gt;"revision" : 1,&lt;BR /&gt;"status" : "not_found"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1002,&lt;BR /&gt;"label" : "UPLOAD_SUCCESS",&lt;BR /&gt;"message" : "The file was uploaded successfully"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the request and response after looking for this same file in the query endpoint.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;REQUEST ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl --location '&lt;A href="https://192.168.68.111:18194/tecloud/api/v1/file/query" target="_blank"&gt;https://192.168.68.111:18194/tecloud/api/v1/file/query&lt;/A&gt;' \&lt;BR /&gt;--header 'Authorization: 9HFAI55GyFSILSEUSVHM8NhfV6zyCbPI' \&lt;BR /&gt;--header 'Content-Type: application/json' \&lt;BR /&gt;--data '{&lt;BR /&gt;"request":[&lt;BR /&gt;{&lt;BR /&gt;"features": [ "te" ],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;"te": {&lt;BR /&gt;"reports": [ "pdf" ],&lt;BR /&gt;"images": [&lt;BR /&gt;{&lt;BR /&gt;"id": "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"revision":1&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}' -k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RESPONSE...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"response" : [&lt;BR /&gt;{&lt;BR /&gt;"features" : [ "te" ],&lt;BR /&gt;"md5" : "8e03693af6178f0a3a99ccf0242f15ac",&lt;BR /&gt;"sha1" : "ffb15a651523794c466ba791dc07e1bdfc858fb1",&lt;BR /&gt;"sha256" : "207f9a03b36c48c14f41d7a65067fcc5ba42c092",&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1004,&lt;BR /&gt;"label" : "NOT_FOUND",&lt;BR /&gt;"message" : "Couldn't find the requested file, please upload it"&lt;BR /&gt;},&lt;BR /&gt;"te" : {&lt;BR /&gt;"images" : [&lt;BR /&gt;{&lt;BR /&gt;"id" : "e50e99f3-5963-4573-af9e-e3f4750b55e2",&lt;BR /&gt;"report" : {&lt;BR /&gt;"verdict" : "unknown"&lt;BR /&gt;},&lt;BR /&gt;"revision" : 1,&lt;BR /&gt;"status" : "not_found"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"status" : {&lt;BR /&gt;"code" : 1004,&lt;BR /&gt;"label" : "NOT_FOUND",&lt;BR /&gt;"message" : "Couldn't find the requested file, please upload it"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 01:25:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Threat-Prevention-API-query-not-detecting-uploaded-pdf-file/m-p/198598#M54450</guid>
      <dc:creator>mateus_cruz</dc:creator>
      <dc:date>2023-11-22T01:25:03Z</dc:date>
    </item>
  </channel>
</rss>

