API REST start a process using an instantiation

1
0
-1

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

Comments

Submitted by steven.lemoign_... on Tue, 12/03/2019 - 09:35

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)

Submitted by merikawasselin_... on Tue, 12/03/2019 - 11:54

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

1 answer

1
0
-1
This one is the BEST answer!

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

Submitted by merikawasselin_... on Tue, 12/03/2019 - 11:55

thank you Antoine for your response, it works

Notifications