cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: New and already have the need for help

From: Herman, Dorothy <dorothy.j.herman_at_hp.com>
Date: Sun, 17 Jun 2012 17:44:05 +0000

Well this is really new to me so I am not exactly sure what to find to answer more about what it is I need. But I found the following information on the APIs for the application I am trying to integrate with
All the APIs listed below will support request and response objects in both XML and JSON format. To get the desired responses, please specify in your request header either "Accept=application/xml" or "Accept=application/json". By default, "Accept=application/xml" is used.
 All list REST APIs will be supporting only the following due to performance reason: scope=VIEW,BASE and detail=BASIC. For details on the default values check the REST url below.
Note:

  * * means the query param is required.
  * Case insensitive input should be supported for all the values of the path params and all the values of the query params
  * For PUT method, fully populated xml object is required for HTTP Body. In general, the input xml object contains only BASE level members. However, there might be exceptions. Developers should document the templates in the wiki page.
HTTP Command

URI

HTTP Body

Query Params

Description

Returns

PUT

/catalog/<id>/approval/<id>

If approved then :

*userIdentifier=

Update approval decision of the Approval Process, should be used for only approval via extrenal approval system

200 - OK

<ApprovalProcess>

(e.g. APPROVED/REJECTED + Comments)

401 - Unauthorized

    <approvalResult>

404 - Not found

         <name>APPROVED</name>

500 - Server exception

    </approvalResult>

</ApprovalProcess>

 If rejetected then :

<ApprovalProcess>

    <approvalResult>

         <name>REJECTED</name>

    </approvalResult>

    <approvalComment>comment</approvalComment>

</ApprovalProcess>

PUT

/catalog/<id>/approval/<id>/approver

If approved then :

*userIdentifier=

Update approval decision of an approver in an approval process

200 - OK

<Approver>

(e.g. APPROVED/REJECTED + Comments)

401 - Unauthorized

      <person>

404 - Not found

           <userName>approver0_at_somewhere.com</userName>

500 - Server exception

           <organization>

                   <name> Provider</name>

           </organization>

      </person>

      <approverResult>

           <name>APPROVED</name>

     </approverResult>

</Approver>

 If rejetected then :

<Approver>

      <person>

           <userName>approver0_at_somewhere.com</userName>

           <organization>

                   <name>Provider</name>

           </organization>

      </person>

      <approverResult>

           <name>REJECTED</name>

     </approverResult>

      <approvalComment>comment</approvalComment>

</Approver>

Neither my coworker or my experience has not been in html or json. So I was thinking that the body should pass in either the -d or -f. But I don't think I understand what the parameter would be. My coworker tired passing the values in put just like it is above but from what I read I thought it would need to be more like. -d "userName = approver0_at_somewhere.com& name= REJECTED&approvalComment=comment" I also tried to have it in a file just as it is in the 1st email but I keep getting the error "No data record of requested type"

curl.exe -x --data "@c:\curl-7.26.0-devel-mingw
32\bin\denied.txt" put https://server:8444/csa/rest/catalog/40289451379f45230
1379f61f68f0037/approval/4028945137e4b5cd0137f03f488712f8/approver?userIdentifie
r=4028945137a478810137b5819d8b1639
curl: (5) Could not resolve proxy: --data; No data record of requested type
curl: (5) Could not resolve proxy: --data; No data record of requested type
curl: (5) Could not resolve proxy: --data; No data record of requested type

C:\curl-7.26.0-devel-mingw32\bin>curl.exe -x -d "userName=Admin&na
me=org&name=REJECTED&approvalComment=See%20change%20request%20in%20SM
" put https://csa30:8444/csa/rest/catalog/40289451379f452301379f61f68f0037/appr
oval/4028945137e4b5cd0137f03f488712f8/approver?userIdentifier=4028945137a4788101
37b5819d8b1639
curl: (5) Could not resolve proxy: -d; No data record of requested type
curl: (5) Could not resolve proxy: -d; No data record of requested type
curl: (5) Could not resolve proxy: -d; No data record of requested type

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-17