Content
View differences
Updated by Jonas Heinrich (Finn) about 12 years ago
- send the following request to OP using a user with appropriate permissions to project 183:
<!-- end list -->
POST https://www.openproject.org/api/v2/projects/183/planning_elements.json HTTP/1.1
User-Agent: HttpChannel
Authorization: Basic dGlja2V0cHJvdmlkZXItbmV0OmtqaHNhZDk4ZWhhc2tk
Content-Type: application/json
Host: www.openproject.org
Content-Length: 303
Expect: 100-continue
{"planning_element":{"id":0,"subject":"Sample 472512de-3f3b-454c-aef1-ab14c817d209","description":null,"author_id":null,"project_id":183,"parent_id":null,"status_id":1,"type_id":1,"priority_id":4,"created_at":null,"updated_at":null,"assigned_to_id":null,"custom_fields":null,"note":null},"IsValid":true}
**Expected**: HTTP 302 — like in previous versions
**Actual**: HTTP 422:–1:
```
HTTP/1.1 422 Unprocessable Entity
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 12 May 2014 07:35:52 GMT
Server: Apache
Set-Cookie: _open_project_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWFhZjI5OWNkNzcyZjdhMGMyYzUxM2VmMGIxYjkzM2RmBjsAVA%3D%3D--97957798b837655deb7f7966a6d2eb0bfaab3e67; path=/; HttpOnly
Set-Cookie: autologin=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT
Status: 422 Unprocessable Entity
Vary: Accept-Encoding
X-Rack-Cache: invalidate, pass
X-Request-Id: d8d2bbf0b8f1d0d3a2387408e1555c95
X-UA-Compatible: IE=Edge,chrome=1
Content-Length: 1
Connection: keep-alive
```
The behavior seems to have changed with the last deployment to op.org
<!-- end list -->
POST https://www.openproject.org/api/v2/projects/183/planning_elements.json HTTP/1.1
User-Agent: HttpChannel
Authorization: Basic dGlja2V0cHJvdmlkZXItbmV0OmtqaHNhZDk4ZWhhc2tk
Content-Type: application/json
Host: www.openproject.org
Content-Length: 303
Expect: 100-continue
{"planning_element":{"id":0,"subject":"Sample 472512de-3f3b-454c-aef1-ab14c817d209","description":null,"author_id":null,"project_id":183,"parent_id":null,"status_id":1,"type_id":1,"priority_id":4,"created_at":null,"updated_at":null,"assigned_to_id":null,"custom_fields":null,"note":null},"IsValid":true}
**Expected**: HTTP 302 — like in previous versions
**Actual**: HTTP 422:–1:
```
HTTP/1.1 422 Unprocessable Entity
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 12 May 2014 07:35:52 GMT
Server: Apache
Set-Cookie: _open_project_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWFhZjI5OWNkNzcyZjdhMGMyYzUxM2VmMGIxYjkzM2RmBjsAVA%3D%3D--97957798b837655deb7f7966a6d2eb0bfaab3e67; path=/; HttpOnly
Set-Cookie: autologin=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT
Status: 422 Unprocessable Entity
Vary: Accept-Encoding
X-Rack-Cache: invalidate, pass
X-Request-Id: d8d2bbf0b8f1d0d3a2387408e1555c95
X-UA-Compatible: IE=Edge,chrome=1
Content-Length: 1
Connection: keep-alive
```
The behavior seems to have changed with the last deployment to op.org