API REST start a process using an instantiation
hi, i try to Start a process using an instantiation contract in postman.
URL: ........./API/bpm/process/:processId/instantiation
Method: POST
in my contract: i have 2 data (name and age) from bdm,
When i send the request on postman i got this error
{
"code": 415,
"contactEmail": null,
"description": "The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method",
"homeRef": "/",
"reasonPhrase": "Unsupported Media Type",
"uri": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16"
}
What is the problem here, and how do i resolve this,
THANK IN ADVANCE
Based on https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415 I guess that the content type in Content-Type
header of your request is not set properly. It need to be application/json
.
Comments
Hello merikawasselin_,
I had this issue and i solved it.
How did you call your API ? With which tech ?
(Sorry for my english, i'm french)
Bonjour Steven. pour l'appel d'API j'ai utilisé Postman,
Dans la section headers:
key:content-type -> value:application/json
Dans la section body, j'ai utilisé "raw": voici comment je l'ai fai
{
"apiBusinessDataInput": {
"nom":"rabe",
"age":15
}
}
NB: apiBusinessDataInput -> c'est mon contrat
nom et age, c'est l'element du contrat
J'espere que cela t'aide