Hi,
when calling the public demo (2.1.6-SNAPSHOT) as follows:

curl -X GET 
"https://syncope-vm.apache.org/syncope/rest/tasks/executions/recent?max=1"; -H 
"accept: application/json"

response is

[
  {
    "start": "2020-02-11T04:01:20.034+0000",
    "end": "2020-02-11T04:01:20.411+0000",
    "key": "3f227324-b763-4c2f-a273-24b7634c2f7e",
    "jobType": "TASK",
    "refKey": "e1e520f0-2cbd-4e11-9a89-ea58a0f957e7",
    "refDesc": "NOTIFICATION Task e1e520f0-2cbd-4e11-9a89-ea58a0f957e7 ",
    "status": "SENT",
    "message": "FROM: [email protected]\nTO: [email protected]\nSUBJECT: 
Notification for SYNCOPE-81\n\nNOTIFICATION-81\n\nNOTIFICATION-81\n"
  }
]

e.g. start timestamp has milliseconds, as expected.

Same happens with application/xml:

<?xml version="1.0" encoding="UTF-8"?>
<syncope21:execs xmlns:syncope21="http://syncope.apache.org/2.1";>
  <syncope21:exec xmlns:syncope21="http://syncope.apache.org/2.1";>
    <end>2020-02-11T04:01:20.411Z</end>
    <start>2020-02-11T04:01:20.034Z</start>
    <jobType>TASK</jobType>
    <key>3f227324-b763-4c2f-a273-24b7634c2f7e</key>
    <message>FROM: [email protected]
TO: [email protected]
SUBJECT: Notification for SYNCOPE-81

NOTIFICATION-81

NOTIFICATION-81
</message>
    <refDesc>NOTIFICATION Task e1e520f0-2cbd-4e11-9a89-ea58a0f957e7 </refDesc>
    <refKey>e1e520f0-2cbd-4e11-9a89-ea58a0f957e7</refKey>
    <status>SENT</status>
  </syncope21:exec>
</syncope21:execs>

and application/yaml:

---
- start: 1581393680034
  end: 1581393680411
  key: "3f227324-b763-4c2f-a273-24b7634c2f7e"
  jobType: "TASK"
  refKey: "e1e520f0-2cbd-4e11-9a89-ea58a0f957e7"
  refDesc: "NOTIFICATION Task e1e520f0-2cbd-4e11-9a89-ea58a0f957e7 "
  status: "SENT"
  message: "FROM: [email protected]\nTO: [email protected]\nSUBJECT: 
Notification\
    \ for SYNCOPE-81\n\nNOTIFICATION-81\n\nNOTIFICATION-81\n"

Regards.

On 10/02/20 19:07, [email protected] wrote:
> Hi,
>
> We are using the Syncope 2.1.5 API, and we send a GET request to the 
> tasks/executions/recent/?max=1 URI, and we get a response message that 
> includes the <start> and <end> elements, which have the start and ending 
> timestamps.  These ending part of these timestamps are supposed to be 
> formatted:
>
> H:M:S.fZ
>
> e.g.:
>
> ...T13:02:35.12345Z
>
> but we noticed in one case so far at least we got a response that had this 
> format
>
> ...T13:02:35Z
>
> In other words, the msecs part was completely missing!
>
> Is this (dropping the msecs part of the timestamp) intentional? 
>
> I am guessing (just a guess) that it is being dropped because possibly the 
> msecs part is like ".00000"? 
>
> Is that the correct?
>
> Or is this a bug in Syncope 2.1.5 REST API?
>
> Thanks,
> Jim

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to