# Pipelines via a Java API

**URL:** <https://discuss.elastic.co/t/pipelines-via-a-java-api/100401>\
**Category:** Elasticsearch\
**Created:** [September 13, 2017, 6:49pm UTC](https://discuss.elastic.co/t/pipelines-via-a-java-api/100401 "2017-09-13T18:49:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tameem](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@Tameem](https://discuss.elastic.co/u/Tameem)\
**Post date:** [September 13, 2017, 6:49pm UTC](https://discuss.elastic.co/t/pipelines-via-a-java-api/100401/1 "2017-09-13T18:49:57Z")

</div>

Hi!

I'm trying to create a timestamp to attach to any documents that are indexed. I know this is possible in Query DSL via the below set of commands. I cannot find out how to do so through the Java API. Have any of you done this before?

Thanks!

> DELETE anindex

> PUT \_ingest/pipeline/timestamp {  
> "description" : "describe pipeline",  
> "processors" : [  
> {  
> "set" : {  
> "field": "timestamp",  
> "value": "{{\_ingest.timestamp}}"  
> }  
> }  
> ]  
> }

> PUT anindex  
> {  
> "mappings": {  
> "jeff": {  
> }  
> }  
> }

> PUT anindex/jeff/id10?pipeline=timestamp  
> {  
> "hi": "jeff"  
> }

---

<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:** [October 11, 2017, 6:50pm UTC](https://discuss.elastic.co/t/pipelines-via-a-java-api/100401/2 "2017-10-11T18:50:25Z")

</div>

Closed on October 11, 2017, 6:50pm UTC

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