cancel
Showing results for 
Search instead for 
Did you mean: 

Bad Request 400 after query with date

spille
Champ in-the-making
Champ in-the-making
Hi,

Whenever I query for an historic process instance using one of the rest api I get the following error:

Request :
http://localhost:8888/activiti-rest/service/history/historic-process-instances?startedAfter=2014-05-...  OR
http://localhost:8888/activiti-rest/service/history/historic-process-instances?finishedAfter=2014-05... OR

Respons:
{
errorMessage: "The given value for query-parameter 'finishedAfter' is not a valid date: 2014-05-21T14:47:03.982 0000",
statusCode: 400
}

However, I use a correct ISO time stamp.

Anyone else has this problem?

Thanks in advance,

cheers

Spille
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
Are you sure thios is a valid iso 8601 date? The +0000 seems odd to me?

nico_van_hooido
Champ in-the-making
Champ in-the-making
Hi

I have the same issue when i do a post to rest-api /form/form-data

the request body
{"taskId":"832370",
"properties":[
        {"id":"Peildatum",
          "value":"2013-12-31T23:00:00Z",
          "type":"Date"}]
}

after execution of the request the response is:
{"errorMessage":"invalid date value 2013-12-31T23:00:00Z","statusCode":400}

I also tried different formats, the response is always statusCode 400

kind reqards
nico

trademak
Star Contributor
Star Contributor
In our unit tests we use the following format:

2009-12-31T23:00:00Z

So that should work. If you get a 400 message make sure you have a header like Content-Type: application/json

Best regards,

spille
Champ in-the-making
Champ in-the-making