Description
Hi,
I follow your recommandations but it doesn(t work for me.
Here is my output when I call the example.php after fill in the api-config.php with good informations :
php example.php
- About to connect() to 10.10.6.1 port 80 (#0)
- Trying 10.10.6.1…
- Connected to 10.10.6.1 (10.10.6.1) port 80 (#0)
POST /api/myapp/user/ HTTP/1.1
User-Agent: phpipam-api php class
Host: 10.10.6.1
Accept: /
Authorization: Basic QWRtaW46YWRtaW5jbmFm
Content-Length: -1
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
- Empty reply from server
- Connection #0 to host 10.10.6.1 left intact
{“code”:400,”success”:false,”message”:”Curl error: Empty reply from server”}
I don’t understand why in my output the Content-Type is not json/application !
Have you an idea ?
I’m in master version of Ipam.
I installed the api-clients in the same server than Ipam.
I can call API with curl :
curl -X GET -H ‘token:H7Da9AAL6.dQMVHFpCKl$9QK’ ‘http://10.10.6.1/api/myapi/sections/’
{“code”:200,”success”:true,”data”:[{“id”:”5″,”name”:”Commun (N2)”,”description”:”Test \u00e0 chaque site”,”masterSection”:”0″,”permissions”:”{\”2\”:\”3\”,\”3\”:\”1\”}”,”strictMode”:”1″,”subnetOrdering”:”default”,”order”:”1″,”editDate”:”2016-09-26 13:53:41″,”showVLAN”:”1″,”showVRF”:”1″,”DNS”:null,”links”:[{“rel”:”self”,”href”:”/api/myapi/sections/5/”}]},{“id”:”3″,”name”:”Test section”,”description”:”Network Master”,”masterSection”:”0″,”permissions”:”{\”2\”:\”3\”,\”3\”:\”1\”}”,”strictMode”:”1″,”subnetOrdering”:”default”,”order”:”2″,”editDate”:”2016-09-13
…..
….
Sorry if I missed something.