附加文件或图像的Active Collab API问题

时间:2016-04-21 13:39:29

标签: php api activecollab

我正在Active Collab中创建用于创建任务的API,并且我已成功获得新任务,消息和截止日期的settry { API::call('projects/60/tasks/add', null, array( 'task[name]' => $_POST['name'], 'task[body]' => $_POST['message'], 'task[priority]' => $priority, 'task[due_on]' => $date, 'task[assignee_id]' => 21, ), array( 'a.png' /* This array is for attach image to this task but not working in my case and I found this from https://help-classic.activecollab.com/books/api/sdk.html */ )); echo 'Ticket Created Successfully.'; } catch(AppException $e) { print $e->getMessage() . '<br><br>'; var_dump($e->getServerResponse()); } 名称。

但是,当我插入图片或文件时,它没有创建任务。

以下是我的代码,请帮我解决。

  - name: Get registered services
      command: bash -c "chkconfig --list | awk '{print $1}'"
      register:  loaded_services_{{ansible_distribution_major_version}}
      when: (( ansible_os_family == "RedHat" ) and ( ansible_distribution_major_version == "6" ))
      changed_when: False
      tags: test

    - name: Get registered services
      command: bash -c "systemctl list-unit-files | grep enabled | cut -d. -f1"
      register: loaded_services_{{ansible_distribution_major_version}}
      when: (( ansible_os_family == "RedHat" ) and ( ansible_distribution_major_version == "7" ))
      changed_when: False
      tags: test

    - name: shutdown unnecessary services
      service: name={{ item }} enabled=no state=stopped
      with_items: "{{ disable_services | intersect(loaded_services_{{ansible_distribution_major_version}}.stdout_lines)}}"
      when: ansible_os_family == "RedHat" and  ansible_distribution_major_version == "6"
      tags:
        - harden
        - test
      ignore_errors: yes

1 个答案:

答案 0 :(得分:0)

请将a.png替换为文件系统上现有文件的绝对路径,例如/path/to/my/image.png