# HTTPJson Input Request Transforms

**URL:** <https://discuss.elastic.co/t/httpjson-input-request-transforms/281481>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 15, 2021, 2:47pm UTC](https://discuss.elastic.co/t/httpjson-input-request-transforms/281481 "2021-08-15T14:47:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oliver2/32/76684_2.png) [@Oliver2](https://discuss.elastic.co/u/Oliver2)\
**Post date:** [August 15, 2021, 2:47pm UTC](https://discuss.elastic.co/t/httpjson-input-request-transforms/281481/1 "2021-08-15T14:47:45Z")

</div>

Im trying to create a custom input for:

> **[Automation%20Support%20for%20CVE%20Retrieval.pdf](https://csrc.nist.gov/CSRC/media/Projects/National-Vulnerability-Database/documents/web%20service%20documentation/Automation%20Support%20for%20CVE%20Retrieval.pdf)**
>
> 338.86 KB

I can get it to produce events fine with the following config:

```auto
- type: httpjson
  config_version: 2
  interval: 1h
  request.url: https://services.nvd.nist.gov/rest/json/cves/1.0
  request.transforms:
  - set:
      target: url.params.resultsPerPage
      value: '2000'
  response.split:
   target: body.result.CVE_Items

```

how ever i want to set the "modStartDate" parameter to be the last hour, from my understanding this should be able to be done however i cant workout the golang templating i need, when i try and set the modStartDate with [[formatDate (now) "yyyy-MM-dd ''T'HH:mm:ss:sss z"]] i get a 404 response however if i set the date with a fixed value of '2019-01-01 T00:00:00:000 UTC05:00' it works fine. I've tried just setting the year with the formatDate option and its still not work.

```auto
 - set:
      target: url.params.modStartDate
      value: '[[formatDate (now) "yyyy"]]-07-14T00:00:00:000 UTC-00:00'

```

Am i making a silly mistake is anyone able to help on what the issue might be? id rather use Filebeat than a python script for this. 😃

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 12, 2021, 4:47pm UTC](https://discuss.elastic.co/t/httpjson-input-request-transforms/281481/2 "2021-09-12T16:47:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
