<?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 Re: Help required with API Ingest Request in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Help-required-with-API-Ingest-Request/m-p/273017#M3673</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/71674"&gt;@Animesh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;To Ingest Logs Via API in Dynatrace is by using the following POST Request API Endpoint.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;https://{environmentid}.live.dynatrace.com/api/v2/logs/ingest&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scope for the above API to work is to get Access Token of Scope&amp;nbsp;&lt;STRONG&gt;logs.ingest&lt;/STRONG&gt;. You will get token, then in POSTMAN you can open &lt;STRONG&gt;Headers &lt;/STRONG&gt;and select Authorization and the value will be &lt;STRONG&gt;Api-Token &amp;lt;Your Token&amp;gt;.&amp;nbsp;&lt;/STRONG&gt;Make sure keep the request type as &lt;STRONG&gt;POST.&lt;BR /&gt;&lt;/STRONG&gt;If the API is working on Bearer Token then you have create one OAuth Client and get the Token from that via other API.&lt;BR /&gt;Then the Token will be &lt;STRONG&gt;Bearer &amp;lt;Your-Token&amp;gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;The format for ingesting logs is like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest",
    "log.source": "/var/log/syslog",
    "timestamp": "2022-01-17T22:12:31.0000",
    "severity": "error",
    "custom.attribute": "attribute value"
  },
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest",
    "log.source": "/var/log/syslog",
    "timestamp": "2022-01-17T22:12:35.0000"
  },
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest",
    "log.source": "/var/log/syslog"
  },
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest"
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Related To Filtering, I don't know which Application interface you are using, But what you can do, you can transform the Log Data and do some sort of filtering by writing some script which will contain that service name, then ingest the result data via API.&lt;BR /&gt;&lt;BR /&gt;For your reference, Visit this URL related to Ingestion API's&amp;nbsp;&lt;A title="Log Ingestion API" href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/log-monitoring-v2/post-ingest-logs" target="_self"&gt;Log Ingestion API&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 05:53:41 GMT</pubDate>
    <dc:creator>zaid-bashir</dc:creator>
    <dc:date>2025-03-20T05:53:41Z</dc:date>
    <item>
      <title>Help required with API Ingest Request</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Help-required-with-API-Ingest-Request/m-p/273016#M3672</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am unable to find an example or proper templete for my required API Ingest request. I want to ingest logs from a source and exclude records based on the metric servicename. Any log record containing the servicename="xyz" should be excluded from GRAIL storage. My Application interface from where i am ingesting the logs does not provide the capability to filter the logs based on servicename.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 07:43:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Help-required-with-API-Ingest-Request/m-p/273016#M3672</guid>
      <dc:creator>Animesh</dc:creator>
      <dc:date>2025-03-20T07:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help required with API Ingest Request</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Help-required-with-API-Ingest-Request/m-p/273017#M3673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/71674"&gt;@Animesh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;To Ingest Logs Via API in Dynatrace is by using the following POST Request API Endpoint.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;https://{environmentid}.live.dynatrace.com/api/v2/logs/ingest&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scope for the above API to work is to get Access Token of Scope&amp;nbsp;&lt;STRONG&gt;logs.ingest&lt;/STRONG&gt;. You will get token, then in POSTMAN you can open &lt;STRONG&gt;Headers &lt;/STRONG&gt;and select Authorization and the value will be &lt;STRONG&gt;Api-Token &amp;lt;Your Token&amp;gt;.&amp;nbsp;&lt;/STRONG&gt;Make sure keep the request type as &lt;STRONG&gt;POST.&lt;BR /&gt;&lt;/STRONG&gt;If the API is working on Bearer Token then you have create one OAuth Client and get the Token from that via other API.&lt;BR /&gt;Then the Token will be &lt;STRONG&gt;Bearer &amp;lt;Your-Token&amp;gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;The format for ingesting logs is like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest",
    "log.source": "/var/log/syslog",
    "timestamp": "2022-01-17T22:12:31.0000",
    "severity": "error",
    "custom.attribute": "attribute value"
  },
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest",
    "log.source": "/var/log/syslog",
    "timestamp": "2022-01-17T22:12:35.0000"
  },
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest",
    "log.source": "/var/log/syslog"
  },
  {
    "content": "Exception: Custom error log sent via Generic Log Ingest"
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Related To Filtering, I don't know which Application interface you are using, But what you can do, you can transform the Log Data and do some sort of filtering by writing some script which will contain that service name, then ingest the result data via API.&lt;BR /&gt;&lt;BR /&gt;For your reference, Visit this URL related to Ingestion API's&amp;nbsp;&lt;A title="Log Ingestion API" href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/log-monitoring-v2/post-ingest-logs" target="_self"&gt;Log Ingestion API&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 05:53:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Help-required-with-API-Ingest-Request/m-p/273017#M3673</guid>
      <dc:creator>zaid-bashir</dc:creator>
      <dc:date>2025-03-20T05:53:41Z</dc:date>
    </item>
  </channel>
</rss>

