Category : rest

I am trying to make a post request in php by building the xml with SimpleXML. This is what the example XML I have to build: <?xml version="1.0" standalone="yes"?> <Orders> <Master> <ID>1</ID> <OrderCode>1001</OrderCode> <OrderYear>2016</OrderYear> <CustomerCode>0002</CustomerCode> </Master> <Detail> <ID>1</ID> <MasterID>1</MasterID> <ProductCode>246VIC53</ProductCode> <RequestedQuantity>2</RequestedQuantity> </Detail> <Detail> <ID>2</ID> <MasterID>1</MasterID> <ProductCode>042COL75</ProductCode> <RequestedQuantity>1</RequestedQuantity> </Detail> </Orders> And this is how I am ..

Read more

Im new to API’s but have managed to create the following in Postman to GET my data: <?php require_once ‘HTTP/Request2.php’; $request = new HTTP_Request2(); $request->setUrl(‘https://myendpointurl.com/api/v1/subscription/60fe59194ffedb5c6’); $request->setMethod(HTTP_Request2::METHOD_GET); $request->setConfig(array( ‘follow_redirects’ => TRUE )); $request->setHeader(array( ‘Authorization’ => ‘Basic XXXXXXXXXXXXXXX’ )); try { $response = $request->send(); if ($response->getStatus() == 200) { echo $response->getBody(); } else { echo ‘Unexpected HTTP ..

Read more

I am trying to pull the defects which are added in the ALM Octane through by ALM Octane API. I am able to pull the defects with query as below. But I am not getting the detailed information from the response (GET API). I am using PHP Curl to pull all the defect information, but ..

Read more