Use tab completion with SDK to auto-complete function names or show field options!
In [40]: group = springserve.demand_groups.new({"name": "API Docs group"}) In [41]: print group.id, group.name 1764 API Docs group |
POST /api/v0/demand_groups
Headers
Content-Type application/json Authorization "yourAuthToken" |
Body (example)
{ "name": "API Docs Group, } |
Required parameters: name
Response
Status code 200
{ "id": 353, "name": "API Docs group", "account_id": 1 } |
In [1]: partner = springserve.demand_partners.get(1764) In [2]: print partner.name "API Docs partner" |
GET /api/v0/demand_groups/<id>
Headers
Content-Type application/json Authorization "yourAuthToken" |
Response
Status code 200
{ "id": 1764, "name": "API Docs partner", "account_id": 1 } |
In [1]: partner = springserve.demand_groups.get(1764) In [2]: partner.name = "I want to change the name" In [3]: changed = partner.save() In [4]: changed.ok Out [4]: True In [5]: print changed.name "I want to change the name" |
PUT /api/v0/demand_groups/<id>
Headers
Content-Type application/json Authorization "yourAuthToken" |
Body (example)
{ "name" : "I want to change the name" } |
Response
Status code 200
{ "id": 353, "name": "I want to change the name", "account_id": 1 } |