Skip to content

GET /api/v2/importer/{name} is not consistent on the period definition response #1969

@carlosthe19916

Description

@carlosthe19916

Context:
There is an ongoing effort to implement CREATE/EDIT operations through the UI

If I create an Importer setting the period in certain Unit. E.g. weeks. But when I fetch the same importer using GET /api/v2/importer/{name} the period field contains unpredictable units like 1year 1month 24days 7h 26m 24s.

This is a problem for the UI because there isn't a predictable way of parsing strings like 1year 1month 24days 7h 26m 24s and then allow the user to edit that.

To reproduce:

  • Create an inporter of any kind and define the period=60weeks
  • Fetch the same importer using GET /api/v2/importer/{name} and the definition of period will be similar to 1year 1month 24days 7h 26m 24s

How should it work?
The response of GET /api/v2/importer/{name} should define period using only one unit of measurement E.g. Instead of 1year 6 months it can return 18months.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions