uyuni icon indicating copy to clipboard operation
uyuni copied to clipboard

dateTime.iso8601 over JSON API not accepted

Open SvenC56 opened this issue 1 year ago • 4 comments

Problem description

Hi all,

I'm trying to update an errata over the HTTP/JSON API (/rhn/manager/api/errata/setDetails) like this:

{
	"advisoryName": "USN-3515-1",
	"details": {
		"issue_date": "2018-01-04T00:00:00Z",
		"update_date": "2018-01-04T00:00:00Z",
		"cves": [
			"CVE-2017-17405"
		]
	}
}

which results in:

{
	"success": false,
	"message": "Wrong 'issue_date' format."
}

Any advice? I already tried different formats, as well as the format used internally in the db. Nothing gets accepted.

Edit: The API Doc states it requires: dateTime.iso8601 "issue_date"

Thank you!

Steps to reproduce

  1. Login via /auth/login Method
  2. Call /errata/setDetails with the provided payload

Uyuni version

Repository         : uyuni-server-stable
Name               : Uyuni-Server-release
Version            : 2024.01-230900.212.1.uyuni3
Arch               : x86_64
Anbieter           : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level      : Stufe 3
Installierte Größe : 1,4 KiB
Installiert        : Ja
Status             : veraltet (Version 2023.12-230900.210.2.uyuni3 installiert)
Quellpaket         : Uyuni-Server-release-2024.01-230900.212.1.uyuni3.src
Zusammenfassung    : Uyuni Server
Beschreibung       : 
    Uyuni lets you efficiently manage physical, virtual,
    and cloud-based Linux systems. It provides automated and cost-effective
    configuration and software management, asset management, and system
    provisioning.

Uyuni proxy version (if used)

N/A

Useful logs

N/A

Additional information

No response

SvenC56 avatar Feb 06 '24 10:02 SvenC56

Hey @SvenC56 thanks for the report. It seems like a valid issue, or at least I'm getting the same result as you do.

avshiliaev avatar Feb 20 '24 11:02 avshiliaev

i have the same issue, a date as Jun 18, 2024, 09:00:00 PM works for me

fockarty avatar Jun 14 '24 07:06 fockarty

i have the same issue, a date as Jun 18, 2024, 09:00:00 PM works for me

I cannot confirm this @fockarty. The error persists. image

SvenC56 avatar Jun 14 '24 11:06 SvenC56