modify resource: Invalid link ; id qualifier [] is not a valid integer

Version 1
    This document was generated from CDN thread

    Created by: PETER BUIJSSE on 26-04-2013 06:07:51 AM
    When i try to modify a resource I get the following error on team object  => Invalid link ; id qualifier [] is not a valid integer  => Not a valid link uri  => InvalidInput   It doesn't matter what i put in the refurl as content What am i missing?   - Peter The xml put to the server is attached as this windos does not like the xml

    Subject: RE: modify resource: Invalid link ; id qualifier [] is not a valid integer
    Replied by: PETER BUIJSSE on 26-04-2013 10:10:55 AM
    Also noticed that the url for resource is wrong in the developer guide.
    :8080/adminapi/resources/ should be :8080/adminapi/resource/ without the s at the end.

    Subject: Re: New Message from PETER BUIJSSE in Contact Center Express Configuration
    Replied by: Anurodh Jain on 27-04-2013 12:30:07 PM
    Hi Peter,

    This look like a typo in the API developer guide. We will have this rectified.

    Regards
    Anurodh



    From: Cisco Developer Community Forums <cdicuser@developer.cisco.com<mailto:cdicuser@developer.cisco.com>>
    Reply-To: "cdicuser@developer.cisco.com<mailto:cdicuser@developer.cisco.com>" <cdicuser@developer.cisco.com<mailto:cdicuser@developer.cisco.com>>
    Date: Friday, 26 April 2013 8:40 PM
    To: "cdicuser@developer.cisco.com<mailto:cdicuser@developer.cisco.com>" <cdicuser@developer.cisco.com<mailto:cdicuser@developer.cisco.com>>
    Subject: New Message from PETER BUIJSSE in Contact Center Express Configuration API (UCCXAPI) - UCCX Configuration API Questions: RE: modify resource: Invalid link ; id qualifier [] is not a valid integer

    PETER BUIJSSE has created a new message in the forum "UCCX Configuration API Questions": -------------------------------------------------------------- Also noticed that the url for resource is wrong in the developer guide.
    :8080/adminapi/resources/ should be :8080/adminapi/resource/ without the s at the end.
    --
    To respond to this post, please click the following link: http://developer.cisco.com/web/uccxapi/community/-/message_boards/view_message/14702165 or simply reply to this email.

    Subject: RE: New Message from PETER BUIJSSE in Contact Center Express Configuration
    Replied by: Praveen Sinha on 29-04-2013 04:05:07 AM
    I see that this query was deleted from the forum. Were you able to figure out the correct usage? I have just verified that as per document and the example contents the API works as intended given that you give integral id for the team in the refurl and the correct name in the name part of the team object.

    If you still have any issues please enclose the full xml content.

    Thanks and Regards,
    Praveen

    From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
    Sent: Friday, April 26, 2013 4:39 PM
    To: cdicuser@developer.cisco.com
    Subject: New Message from PETER BUIJSSE in Contact Center Express Configuration API (UCCXAPI) - UCCX Configuration API Questions: modify resource: Invalid link ; id qualifier [] is not a valid integer

    PETER BUIJSSE has created a new message in the forum "UCCX Configuration API Questions": -------------------------------------------------------------- When i try to modify a resource I get the following error on team object => Invalid link ; id qualifier [] is not a valid integer => Not a valid link uri => InvalidInput It doesn't matter what i put in the refurl as content What am i missing? - Peter The xml put to the server looks like this:

    sanne <self>http://:8080/adminapi/resource/sanne <fullName>fullname <firstName>firstname <lastName>lastname <extension>5002 <resourceGroup name=""> <refURL> <skillMap> <autoAvailable>false <type>1 <team name="Default"> <refURL>http://:8080/adminapi/team/1 <primarySupervisorOf> <secondarySupervisorOf>
    --
    To respond to this post, please click the following link: http://developer.cisco.com/web/uccxapi/community/-/message_boards/view_message/14692818 or simply reply to this email.

    Subject: RE: New Message from PETER BUIJSSE in Contact Center Express Configuration
    Replied by: PETER BUIJSSE on 30-04-2013 02:51:09 AM
    My other question was deleted from the forum, i work as it should. This question is keeping me busy, its just not update the resource. In the first post there is a attachment it's .txt file. that contains my xml. it put this to the server and get the error. The team and the team url are copy/past from the list resource response.   Any ideas what i'm missing ?   Kind regards, Peter  
    Praveen Sinha:
    I see that this query was deleted from the forum. Were you able to figure out the correct usage? I have just verified that as per document and the example contents the API works as intended given that you give integral id for the team in the refurl and the correct name in the name part of the team object. If you still have any issues please enclose the full xml content. Thanks and Regards, Praveen


    Subject: RE: New Message from PETER BUIJSSE in Contact Center Express Configuration
    Replied by: Praveen Sinha on 30-04-2013 06:54:04 AM
    Hi Peter,

    I don't see any problem with the service. What I think instead is that you must be having issues constructing the team refUR. To confirm if you url is valid or not just paste the url in your browser and if the url was correect you will get a success with the team details xml.


    If you are still not able to update the resource, please give me the result of a GET on the following urls-
    1. http://192.168.10.52:8080/adminapi/resource
    2. http://192.168.10.52:8080/adminapi/resource/sanne
    3. http://192.168.10.52:8080/adminapi/team
    4. http://192.168.10.52:8080/adminapi/team/1
    Thanks and Regards,
    Praveen
    PETER BUIJSSE:
    My other question was deleted from the forum, i work as it should. This question is keeping me busy, its just not update the resource. In the first post there is a attachment it's .txt file. that contains my xml. it put this to the server and get the error. The team and the team url are copy/past from the list resource response.   Any ideas what i'm missing ?   Kind regards, Peter  
    Praveen Sinha:

    I see that this query was deleted from the forum. Were you able to figure out the correct usage? I have just verified that as per document and the example contents the API works as intended given that you give integral id for the team in the refurl and the correct name in the name part of the team object. If you still have any issues please enclose the full xml content. Thanks and Regards, Praveen



    Subject: RE: New Message from PETER BUIJSSE in Contact Center Express Configuration
    Replied by: PETER BUIJSSE on 30-04-2013 10:22:42 AM
    Hi Praveen, I ran the refURl to the server and got a good response. In the attachment i have the results you requested. What happens is that when i construct the xml; i added the info step by step as it was not clear to me that the modify needs all he info in the sample (the cucm api doesn't need all the field just the updating ones) When i reached the team i got 2 errors, 1 missing the team, 2 missing one component the refURL. when i enterd them as in the XML i got the id error. Maybe it is because of another item in the XML but the response is not clear about where the error is for.  
    Kind regards,
     
    Peter
    Praveen Sinha:
    Hi Peter, I don't see any problem with the service. What I think instead is that you must be having issues constructing the team refUR. To confirm if you url is valid or not just paste the url in your browser and if the url was correect you will get a success with the team details xml. If you are still not able to update the resource, please give me the result of a GET on the following urls- 1. http://192.168.10.52:8080/adminapi/resource 2. http://192.168.10.52:8080/adminapi/resource/sanne 3. http://192.168.10.52:8080/adminapi/team 4. http://192.168.10.52:8080/adminapi/team/1 Thanks and Regards, Praveen


    Subject: RE: modify resource: Invalid link ; id qualifier [] is not a valid integer
    Replied by: PETER BUIJSSE on 01-05-2013 09:45:11 AM
    Praveen,
     
    Managed to figure it out. Seems that the resourcegroup was trowing the error.
    I did a get and used the response to do a put, that worked fien (as expected) and compared the 2 removed line bij line.
    Maybe its a good idea to make the error message more self explaining using the element that caused the error. Like with firstname, lastname.
    Next thing is that with the soap api of cucm i do not need to send the fields that i donot want top modify, now i have to do a get first to be sure the non modifieable fields are present as wel.
    Kind regards,
     
    Peter

    Subject: RE: modify resource: Invalid link ; id qualifier [] is not a valid integer
    Replied by: Praveen Sinha on 02-05-2013 01:32:36 AM
    Hi Peter,

    Glad to hear that it worked out for you.

    As far as the usage of rest api is cncerned we don't support partial updates. You need to stick to the constrints placed by the xsd document which is also documented in the pdf document. The update strategy is "complete update" and we don't support any partial updates with the idea to make it simpler for the consumer. The standard usage pattern is you always do a get and have the resource, then you would update the resource xml and do a PUT to affect a change.
    Thanks and Regards,
    Praveen