Error when requesting Date fields in REST API

Bug #1690317 reported by Guy
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mistral
Triaged
Medium
Unassigned

Bug Description

mistral --version: 3.0.0

When trying to perform a REST API GET call and specifying any date fields in the "fields" query param (i.e. created_at, updated_at) the request fails:

GET http://<ip>:8989/v2/executions/?fields=workflow_name,created_at

<error>
  <faultcode>Client</faultcode>
  <faultstring>
    Invalid input for field/attribute created_at. Value: '2017-02-22 12:33:49'. Wrong type. Expected '<type 'unicode'>', got '<type 'datetime.datetime'>'
  </faultstring>
  <debuginfo/>
</error>

When removing all date fields, the call works.

Dougal Matthews (d0ugal)
Changed in mistral:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Oleksiy Petrenko (enacero) wrote :

I think the problem is in request url:
GOT: GET http://<ip>:8989/v2/executions/?fields=workflow_name,created_at
EXPECTED: GET http://<ip>:8989/v2/executions?fields=workflow_name,created_at
So last / before ? is not needed

Revision history for this message
Oleksiy Petrenko (enacero) wrote :

Sorry, That's not the solution.
Can't reproduce this error in devstack

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.