# Input creation by API

**URL:** <https://community.graylog.org/t/input-creation-by-api/24216>\
**Category:** Graylog Central (peer support)\
**Tags:** basic-configuration, content-pack\
**Created:** [June 8, 2022, 3:30pm UTC](https://community.graylog.org/t/input-creation-by-api/24216 "2022-06-08T15:30:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gianluca-valentini](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gianluca-valentini/32/1592_2.png) [@gianluca-valentini](https://community.graylog.org/u/gianluca-valentini)\
**Post date:** [June 8, 2022, 3:30pm UTC](https://community.graylog.org/t/input-creation-by-api/24216/1 "2022-06-08T15:30:20Z")

</div>

Hi,  
using graylog 4.1.6, I’d like to create an input using ReST. So I look at Node/Swagger api console to understand how create the json to post for input creation

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/1/1a67b0a6867fb04b7d2652dc7e97726b2ad2cb8c.png)  
I don’t fine any documentation or example to build the configuration json object.  
The static field, for example I don’t know where can be set.

Can somebody give me an help with an example to understand how it works?  
Thanks  
Gianluca

---

<div class="post-metadata">

**Author:** ![gsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gsmith/32/1222_2.png) [@gsmith](https://community.graylog.org/u/gsmith)\
**Post date:** [June 8, 2022, 11:06pm UTC](https://community.graylog.org/t/input-creation-by-api/24216/2 "2022-06-08T23:06:06Z")

</div>

Hello @gianluca-valentini

> [@gianluca-valentini](#):
>
> The static field, for example I don’t know where can be set.

You need to create a static field, is this correct?  
If so, you can do this with a pipeline or Extractor or create a custom index template.

---

<div class="post-metadata">

**Author:** ![gianluca-valentini](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gianluca-valentini/32/1592_2.png) [@gianluca-valentini](https://community.graylog.org/u/gianluca-valentini)\
**Post date:** [June 9, 2022, 4:33am UTC](https://community.graylog.org/t/input-creation-by-api/24216/3 "2022-06-09T04:33:25Z")

</div>

Ho @gsmith  
Thanks for your suggestion.

Do you have any idea about how create input using rest model through the swagger graylog UI?

---

<div class="post-metadata">

**Author:** ![gsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gsmith/32/1222_2.png) [@gsmith](https://community.graylog.org/u/gsmith)\
**Post date:** [June 9, 2022, 4:38am UTC](https://community.graylog.org/t/input-creation-by-api/24216/4 "2022-06-09T04:38:14Z")

</div>

> [@gianluca-valentini](#):
>
> input using rest model through the swagger graylog UI?

Never had to yet, Sorry. Perhaps someone else here has.

---

<div class="post-metadata">

**Author:** ![patrickmann](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/patrickmann/32/9091_2.png) [@patrickmann](https://community.graylog.org/u/patrickmann)\
**Post date:** [June 9, 2022, 6:54am UTC](https://community.graylog.org/t/input-creation-by-api/24216/5 "2022-06-09T06:54:55Z")

</div>

A good way to understand a REST call is to issue it through the UI and observe the parameters in the browser dev tools. The GL frontend communicates exclusively via the API. Anything you can do via the UI you should also be able to do directly via API.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [June 23, 2022, 6:55am UTC](https://community.graylog.org/t/input-creation-by-api/24216/6 "2022-06-23T06:55:21Z")

</div>

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