Graylog2 / Graylog2/graylog2-server

Validate which fields should be set in frontend and which should be calculated by backend (e.g. index_set creation)

Open
#12,784 1 comment 1 reaction 0 assignees View on GitHub
API change triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior
JSON Fields which could/should be calculated at backend site should be generated there, e.g. creation date field of index_sets.
## Current Behavior

Backend expects this information to be delivered from the frontend:

```{'Date': 'Wed, 01 Jun 2022 11:17:02 GMT', 'Server': 'Apache', 'Strict-Transport-Security': 'max-age=63072000;', 'X-Graylog-Node-ID': '%%', 'X-Runtime-Microseconds': '1965500', 'Content-Type': 'application/json', 'Content-Length': '285', 'Connection': 'close'} Status Code: 400 Body: b'{"type":"ApiError","message":"Cannot construct instance of `org.graylog2.rest.resources.system.indexer.responses.IndexSetSummary`, problem: Null creationDate\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 894]"}'```

## Possible Solution

In this example setCreation Date on backend.

## Steps to Reproduce (for bugs)

1. Try to create a Index Set via REST API
2. Do not set creationDate
3.
4.

## Context

Triggering the REST Endpoints via configuration management tools needs to add this field while creating IndexSets
## Your Environment

* Graylog Version: 4.3.0
* Java Version: JDK11
* Elasticsearch Version: 7.10.2
* MongoDB Version: 4.4
* Operating System: %
* Browser version: %

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.