2012-08-02 2 views
0

Valence를 사용하여 그룹을 만들려고합니다. 모든 것이 올바르게 보이지만 (orgunit 및 group 범주가 있음) "찾을 수 없음"을 나타내는 WebException이 표시됩니다. 내 테스트 프로그램의 출력은 다음과 같습니다. 누구나 uri 및 JSON 블록에 대한 문서가 정확하고 "그룹 만들기"기능이 실제로 작동하는지 확인할 수 있습니까?Desire2Learn Valence에서 그룹 만들기

D:\d2lmgmt>Valence.exe function=create_orgunit_groupcategory_group requestor=hidden orgunitid=16800 groupcategoryid=2845 
Uri: "/d2l/api/lp/1.0/16800/groupcategories/2845/groups/", method: "POST" 
POST input: "{"Name":"grouptest name","Code":"grouptestcode","Description":{"Text":"grouptest text","Html":"grouptest html"}}" 
WebException: Not found 

답변

0

당신이 보내는 입력이 slightly different structure이다 "RichTextInput"보다는 "서식있는 텍스트"라고 나타납니다.

요청 :

POST https://valence.desire2learn.com/d2l/api/lp/1.0/7733/groupcategories/1879/groups/?x_b=TwULqrltMXvTE8utuLCN5O&x_a=L2Hd9WvDTcyiyu5n2AEgpg&x_d=NPSqMuaKFhpcE2TWRbvh-wK4I25tGdFPzUzqpolELKk&x_c=IQwjo0WycWje8IrhJuxqMC7U5BWOVVwwMFAZWp3a1ag&x_t=1343942454 HTTP/1.1 
Accept-Encoding: gzip,deflate 
Accept: application/json 
Content-Type: application/json 

{ 
    "Name": "Group 1", 
    "Code": "Group 1 code", 
    "Description": { 
     "Content": "Group 1 description", 
     "Type": "Text" 
    } 
} 

응답 :

HTTP/1.1 200 OK 
Cache-Control: no-cache, no-store 
Pragma: no-cache 
Content-Length: 109 
Content-Type: application/json; charset=UTF-8 
Expires: -1 
Server: Microsoft-IIS/6.0 
X-Powered-By: ASP.NET 
X-AspNet-Version: 2.0.50727 
Date: Thu, 02 Aug 2012 21:20:44 GMT 

{"GroupId":7744,"Name":"Group 1","Description":{"Text":"Group 1 description","Html":""},"Enrollments":[4062]}