unable to create hunting group

Post Reply
ssteiner
Member
Posts: 61
Joined: 05 Feb 2009 09:20

unable to create hunting group

Post by ssteiner »

I'm scratching my head trying to determine what's not right in this attempt to create a hunting group

Code: Select all

POST http://srvroxe02.nxodev.intra/api/rest/1.0/pbxs/143/instances/Group/1/Station_Group HTTP/1.1
user-agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Content-Type: application/json; charset=utf-8
Host: srvroxe02.nxodev.intra
Cookie: JSESSIONID=25C2D52A985500230B3A70EEFA2FDE8B.tomcat; AlcUserId=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzZGt1c2VyIiwiaWF0IjoxNTUxNzAwODk4fQ.dJvE9Uxx7gFVFM0a6IGYcFQCTGF81czI8Hok6SLQDfI
Content-Length: 465
Expect: 100-continue

{
	"attributes": [
		{
			"name": "Directory_Number",
			"value": [
				"5102"
			]
		},
		{
			"name": "Directory_Name",
			"value": [
				"test hg"
			]
		},
		{
			"name": "Cyclic_Search_Mode",
			"value": [
				"Parallel"
			]
		},
		{
			"name": "Release_After_Timed_Delay",
			"value": [
				"true"
			]
		},
		{
			"name": "Overflow_Directory_Number",
			"value": [
				"1004"
			]
		},
		{
			"name": "Entity_Number",
			"value": [
				"1"
			]
		},
		{
			"name": "Right_To_Pick_up_Private_Call",
			"value": [
				"true"
			]
		},
		{
			"name": "Voice_Mail.Mcdu_Mevo",
			"value": [
				"7910"
			]
		},
		{
			"name": "Voice_Mail.Mevo_Password",
			"value": [
				"0000"
			]
		}
	]
}
The answer I get back is not very helpful:

Code: Select all

HTTP/1.1 400 Bad Request
Date: Mon, 04 Mar 2019 12:02:36 GMT
Server: Apache/2.4.23
Content-Length: 209
Connection: close
Content-Type: application/json

{"httpStatus":"BAD_REQUEST","code":1006,"helpMessage":"Request parameters are not correct. Please fix the problem and resend the request.","type":"BAD_PARAMETER","innerMessage":"Parsing error","canRetry":true}
So I attempted to see if I could create a minimum valid object and tried to POST this:

Code: Select all

{"attributes":[{"name":"Directory_Number","value":["5102"]},{"name":"Directory_Name","value":["test hg"]}]}
And now I'm getting

{"httpStatus":"BAD_REQUEST","code":1003,"helpMessage":"No result corresponds to the requested parameter(s).","type":"NOT_FOUND","innerMessage":"Missing attribute value","canRetry":true}

According to the model, the only property that is mandatory is "Directory_Number" which I am providing.

This happens both on a .24 and .27 release of O2G.
yblanchard
Member
Posts: 26
Joined: 03 Dec 2018 06:32

Re: unable to create hunting group

Post by yblanchard »

We agree that there is an incoherence between MIB mandatory attributes and the request rejection an we have to analyze deeply where is the blocking point. In the meantime, if you want to bypass the problem, you need to put the "Attached_Stations" attribute in your request, with an empty value if you don't want to provide any set number at this step (you nee to provide an empty set value), like in the following example:

{"attributes":[
{"name":"Attached_Stations","value":[]},
{"name":"Directory_Name","value":["HG3"]},
{"name":"Directory_Number","value":["10003"]}
]}
ssteiner
Member
Posts: 61
Joined: 05 Feb 2009 09:20

Re: unable to create hunting group

Post by ssteiner »

I'm afraid the following attempt with an empty Attached_Stations attribute still fails

Code: Select all

{
	"attributes": [
		{
			"name": "Directory_Number",
			"value": [
				"5102"
			]
		},
		{
			"name": "Directory_Name",
			"value": [
				"test hg"
			]
		},
		{
			"name": "Attached_Stations",
			"value": []
		}
	]
}
on both .24 and .27 releases.

Same error as before:

{"httpStatus":"BAD_REQUEST","code":1003,"helpMessage":"No result corresponds to the requested parameter(s).","type":"NOT_FOUND","innerMessage":"Missing attribute value","canRetry":true}

Even if I do provide a number of an attached station, it still fails

Code: Select all

{
	"attributes": [
		{
			"name": "Directory_Number",
			"value": [
				"5102"
			]
		},
		{
			"name": "Directory_Name",
			"value": [
				"test hg"
			]
		},
		{
			"name": "Attached_Stations",
			"value": [
				"1001"
			]
		},
		{
			"name": "Cyclic_Search_Mode",
			"value": [
				"Parallel"
			]
		},
		{
			"name": "Overflow_Directory_Number",
			"value": [
				"1004"
			]
		},
		{
			"name": "Entity_Number",
			"value": [
				"1"
			]
		}
	]
}
Post Reply

Return to “O2G”