Login or Register

RSS IconRecent posts in this topic

avatar Pro
charleswarner on Jun 25. 2008. 3:05 pm
For many of the API areas it says:

assignees (array) - Array of people assigned to the object. First element of array is list of assignees (as array). Second parameter is an ID of a person responsible for a task (ID must be in the first list).

I am not sure what this means exactly and I'm having trouble visualizing what is passed to the script. Can anyone provide like a textual example of how this input would be passed in a POST or GET format?
avatar Staff
Ilija Studen on Jun 25. 2008. 5:53 pm
If example request looks like this:

submitted=submitted
project = {
  name=Testing API
  leader_id=1
} 


You'll need to submit HTTP request with following POST variables;

- submitted (value submitted)
- project[name] (value Testing API)
- project[leader_id] (value 1)

Request looks like any normal POST request your browser makes when submitting form...

Easiest way to play with API is using API Test Tool.
activeCollab Team Member
avatar Pro
charleswarner on Jun 25. 2008. 6:14 pm
This is what I'm working with:

'submitted' => 'submitted'
'ticket[name]' => "Test Ticket"
'ticket[visibility]' => 1
'ticket[assignees]' => 19

The "19" is the User ID of the person I'm trying to assign to this ticket.
avatar Staff
Ilija Studen on Jun 25. 2008. 6:22 pm
It would go something like:

'submitted' => 'submitted'
'ticket[name]' => "Test Ticket"
'ticket[visibility]' => 1
'ticket[assignees][0][] => 1 (frist assignee)
'ticket[assignees][0][] => 3 (second assignee)
'ticket[assignees][0][] => 8 (third assignee)
'ticket[assignees][1] => 3 (responsible assignee)

Please note that you need to set responsible assignee if you have one or more assignees...
activeCollab Team Member
avatar Pro
charleswarner on Jun 25. 2008. 6:39 pm
Thank you that worked for me.
avatar
dardarlt on Aug 1. 2008. 4:12 pm
Ilija Studen:
It would go something like:

'submitted' => 'submitted'
'ticket[name]' => "Test Ticket"
'ticket[visibility]' => 1
'ticket[assignees][0][] => 1 (frist assignee)
'ticket[assignees][0][] => 3 (second assignee)
'ticket[assignees][0][] => 8 (third assignee)
'ticket[assignees][1] => 3 (responsible assignee)

Please note that you need to set responsible assignee if you have one or more assignees...


How does this will look in api test? I get no idea how this will look like... somethink like:

submittedsubmitted=submitted
project = {
name=Testing API
}
assignees = {
[]=15
}
assignees = {
[]=17
}
avatar Staff
Ilija Studen on Aug 1. 2008. 4:30 pm
API test tool cannot submit multidimensional arrays needed for assignees to be attached. You'll need to submit post request with values named in post #4.
activeCollab Team Member

RSS IconRecent posts in this topic