Announcement

Collapse
No announcement yet.

Assigned teams with API

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Assigned teams with API


    Hi all, I am using API Client Implementation in PHP to update accounts from other software but I am getting this error

    Code:
    Uncaught exception 'Exception' with message 'Not valid data. Field: teams, validation type: required

    my code is

    Code:
    $response = $client->request('POST', 'Account', [ 'name' => 'Test', 'assignedUserId' => '603cc16ca3349fd59', 'teamsIds' => '5d138a5a072c161fc', ]);
    ids coincide with existing user and team


    on another entity where the team is not required it works by passing only assigneduserids



    thank you

  • #2
    I think "teamsIds" must be an array so it should be something like 'teamsIds' => ['5d138a5a072c161fc'].

    Cheers!

    Comment


    • #3


      I have already tried even so, I can't figure out what to pass, if the teams or teamsIds field, I assume it should work like the assignedUser field, where passing assignedUserId works but with teams, teamsIds, teamsId it doesn't work



      Do you know if there is a list or manual that indicates which fields to use with API for the various entities?

      Comment


      • AgentT
        AgentT commented
        Editing a comment
        Sorry I am not entirely familiar with the API Client Implementation of ESPO.

    • #4

      I get it, he wants double quotes ["5d138a5a072c161fc"]

      Comment

      Working...
      X