11-14-2023 01:48 PM
I am wanting to use the Emergency Responder API to automate ERL and IP subnet build outs. I have been able to successfully and consistently create ERLs with zero issue it is only when I send a call to the IP subnet side I have been having issues. Specifically, with
POST https://{CER-IP}/cerappservices/service/ipsubnetphone
Originally, we were on version 14SU1, I knew we needed to upgrade to 14SU3 to enable the ability to use the API to create subnets. We just did that and are working on the new version. Once upgraded I went from getting 405 errors to 500 errors. The API documentation indicates a 500 error is an internal server error. The response I am getting is attached along with a sample piece of code and log snippet. I am unsure why I am having this issue and have looked over the sparse documentation to make sure I am not missing anything. My headers are correct, authentication is correct, encoding is UTF-8, JSON is properly transformed, etc. This is back up by the fact that I can create ERLs just fine but subnets are failing with weird errors each time. I wonder if any else has successfully created a python script to create IP subnets and if they have any experience on this front? I tried my requests via PostMan and found the same issue there. I have restarted the publisher and still saw no change.
11-15-2023 07:27 AM
Not an expert here, but looking at the logs i there seems to be a null value being accessed at line 1006 of the CerAppServiceImpl addIPSubnet method. This could be a null method parameter or an uninitialized object? Try printing variable values right before the method call may help identify the specific null variable.
Hope this helps.
11-15-2023 07:57 AM
11-15-2023 08:11 AM
Try doing a "GET" on an known IP subnet. That should return the variable names to you with the appropriate name/case. It is a bit brute force, but it seem like it should work.
11-15-2023 12:27 PM
Seems to be working for me on CER 14:
POST /cerappservices/service/ipsubnetphone HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic QWRtaW5pc3RyYXRvcjpjaXNjb3BzZHQ=
User-Agent: PostmanRuntime/7.35.0
Postman-Token: 24371a89-9791-4ae7-8d3e-06effdfe1fcb
Host: 10.10.20.3
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 146
Cookie: JSESSIONID=312019974250C32867357CBE1A177729
{
"SUBNETID": "34.45.35.45",
"SUBNETMASK": "255.255.255.0",
"ERLNAME": "testErl",
"LOCATION": "Nashik",
"DONOTTRACK": false
}
HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000; includeSubdomains
Content-Security-Policy: default-src *; script-src * 'unsafe-inline' 'unsafe-eval';style-src * 'unsafe-inline'; img-src * data: 'unsafe-inline';
x-content-type-options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Date: Wed, 15 Nov 2023 20:25:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
{"status":"SUCCESS","message":"IpSubnet Data Added Successfully"}
If you can provide the raw HTTP request, that might help us spot something
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide