Core Case API problem with Postman when trying to create a case instance
Hello
I try to create an instance of a case but we receive an error {"errors":[{"code":4059,"message":"Error while creating case instance"}]}
POST https://eu-1.api.opentext.com/case/api/v1/case-definitions/96313279-a1ca-43a4-8144-a47c5af043f5/cases
The problem seems to be linked to the file testCase.json in the console there's :
Any idea ?
Thanks
Florent
Comments
-
Hi @Florent Melchers, can you confirm you indeed have a Core Case subscription, and if so, can you confirm that you have tried the different examples as described here? I.e.: did you go over the different calls and confirmed that at least some of it works, or is nothing working?
0 -
Hi Gino
Yes we have a valid core case subscription. We can do other calls like "Get Users" or "Get Cases Definition", it works. We used the examples from the documentation “Core Case Api Overview”, it was useful. In the meantime, the problem seems to be identified, it's not solved yet. It's linked to the fact that we should send a file in the body form-data. I will leave some more information when it's solved.
Florent
0 -
Do you found something to fix this ? I will be interested if you have a solution because I'm facing the same issue on the Postman call.
I also tried to make the call with a NodeJs script (some data have been replaced by chevrons <>):axios.post( '<data-center-base-url>/case/api/v1/case-definitions/<id>/cases', form, { headers: { 'Content-Type': 'multipart/form-data', Authorization: `Bearer ${access_token}` } } ).then((res) => { console.log(res) }).catch((err) => { for (const value of err.config.data.values()) { value.text().then((data) => console.log(data)) } console.log(err.response.data) console.log(err.config.headers) console.log(err.response.status) console.log(err.response.headers) })
Where the response is:
Error response data: {
errors: [ { code: 4059, message: 'Error while creating case instance' } ]
}
Request headers: AxiosHeaders {
Accept: 'application/json, text/plain, /',
'Content-Type': 'multipart/form-data; boundary=axios-1.3.4-boundary-jE6PpKKwQVDSo_wEi7fob0fFi',
Authorization: 'Bearer <access_token>'
'User-Agent': 'axios/1.3.4',
'Content-Length': '651',
'Accept-Encoding': 'gzip, compress, deflate, br'
}
Error response status: 500
Error response headers: AxiosHeaders {
date: 'Wed, 29 Mar 2023 14:09:55 GMT',
'content-type': 'application/json',
'transfer-encoding': 'chunked',
connection: 'close',
'cache-control': 'no-cache, no-store, max-age=0, must-revalidate',
expires: '0',
pragma: 'no-cache',
'set-cookie': [
'BIGipServerdevxprod.ot2.opentext.com_80=3706034954.20480.0000; path=/; Httponly; Secure',
'BIGipServerdevxprod.ot2.opentext.com_80=3706034954.20480.0000; path=/; Httponly; Secure',
'BIGipServerdevxprod.ot2.opentext.com_80=3722812170.20480.0000; path=/; Httponly; Secure'
],
'strict-transport-security': 'max-age=31536000 ; includeSubDomains, max-age=297402057; includeSubDomains, max-age=297402057; includeSubDomains, max-age=297402057; includeSubDomains',
vary: 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers',
'x-content-type-options': 'nosniff',
'x-frame-options': 'DENY',
'x-response-time': '1969',
'x-vcap-request-id': '9d3c0564-2e31-413f-5b43-d6d054180e7f',
'x-xss-protection': '1; mode=block',
'access-control-expose-headers': 'Content-Disposition, Content-Length',
'access-control-allow-origin': '*',
'access-control-allow-headers': 'origin, x-requested-with, accept, authorization, content-type, x-view-request-id',
'access-control-max-age': '3628800',
'access-control-allow-methods': 'HEAD, GET, DELETE, PUT, POST, PATCH, OPTIONS',
'access-control-allow-credentials': 'false'
}
Sended FormData 'caseInstance' key value: {"caseType":{"id":"<case_type_id>"},"caseConfigId":"<id>","caseProperties":{"defaultAttributes":{"caseTitle":"Ouverture de compte John DOE 3","summary":"Ouverture de compte John DOE 3","clientName":"John DOEEE","caseAssignee":{"id":"<id>","email":"matthieu.vigier@aerow.fr","name":"Matthieu Vigier","label":"Matthieu Vigier","isAdmin":true}},"customAttributes":{"data":{"ca_nom":"DOEEE","ca_prenom":"John"},"caseConfigId":"<id>"}}}I also made an other call on Postman, where I called the file 'caseinstance.json' as described in the doc and I got the following error, which look different of the one you got:
"errors": [ { "code": 3406, "message": "Case exception" } ]
So if you don't found any solution, any suggestion will be appreciated
0 -
Hi @VigierM
The problem is not solved but it's under analysis.
And on your side, the other calls work ? List case for example ?
I keep you informed.
Florent
0 -
Yes I'm able to do every GET calls. I didn't tested all the POST one for the moment as I only needed to test the case creation.
Actually I'm stuck on your error message or the one I had above. And as it is only some error status code 500, I don't really have information to debug this.
Thank you for your time, I'll stay tuned
0 -
All,
There is an open issue in creating Case Instance when the case is configured against Core Content as Content Management repo, the fix for this will be available very soon like by end of April.
As a work around you can change the Content Repository to OCP Cloud storage within Content Management section of the case type, this should allow you to create case attach documents and other operations too…
-Sriram.A
1 -
The workaround is working fine !
Thanks
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 150 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories