Planfix API project.add / Create a project: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 56: Line 56:
</request>
</request>
</source>
</source>
If you don't pass a creator or set id=0, the user of the current session will be used as the creator. Counterparty is not a required parameter. Regular users (not contacts) are able to call this function.
{| class="wikitable" style="margin-top: 1em; width:100% "
!width="150"|Name !!width="200"| Type !!width="50%"| Value !! Notes
|-
|sid || string(32) ||session key || created as a result of passing authentication [[Planfix API: Authentication
|Authentication]]
|-
|title || string || Project name ||
|-
|description ||string  ||Description of the project set by the user ||
|-
|owner || || ||This field is not required. In this case, the creator will be the user who is making the request (determined by sid)
|-
|owner.id || int || dentifier of the user who will be the project creator.|| value 0 (zero) allowed. In this case, the creator will be the user who is making the request (determined by sid)
|-
|client || || ||not required
|-
|client.id || int || counterparty identifier || value 0 (zero) allowed.
|-
|status ||enum || status of the project being created || for a list of valid values for this field, see the project statuses section [[ПланФикс API:Статусы проектов|статусы проектов]]
|-
|hidden ||bool || hidden ||
|-
|hasEndDate ||bool ||whether or not there is an end date ||
|-
|endDate ||DateTime || ||only used if hasEndDate parameter is true
|-
|group || || ||project group identifier
|-
|group.id || int || not required ||
|-
|parent|| || ||parent project identifier
|-
|parent.id || int || project auditors ||
|-
|auditors || || project managers ||not required
|-
|auditors.id || int || project manager identifier ||
|-
|managers || || project default assignees ||not required
|-
|managers.id || int || default project assignee identifier ||
|-
|workers || || project custom field values ||
|-
|workers.id || int || project custom field identifier ||
|-
|customData|| ||project custom field value||
|-
|customData.customValue.id|| ||идентификатор пользовательского поля проекта||
|-
|customData.customValue.value|| ||project custom field value|| (for task set, employee list, and directory entry set field types, separate identifiers with commas in square brackets)
|-
|}

Revision as of 09:18, 1 July 2022

Requests to create projects look as follows:

<?xml version="1.0" encoding="UTF-8"?>
<request method="project.add">
  <account></account>
  <sid></sid>
  <project>
    <title></title>
    <description></description>
    <owner>
      <id></id>
    </owner>
    <client>
      <id></id>
    </client>
    <status></status>
    <hidden></hidden>
    <hasEndDate></hasEndDate>
    <endDate></endDate>
    <group>
      <id></id>
    </group>
    <parent>
      <id></id>
    </parent>
    <auditors>
      <id></id>
      <id></id>
      <!-- ... -->
    </auditors>
    <managers>
      <id></id>
      <id></id>
      <!-- ... -->
    </managers>
    <workers>
      <id></id>
      <id></id>
      <!-- ... -->
    </workers>
    <customData>
      <customValue>
        <id></id>
        <value></value>
      </customValue>
      <!-- ... -->
    </customData>
  </project>
  <signature></signature>
</request>

If you don't pass a creator or set id=0, the user of the current session will be used as the creator. Counterparty is not a required parameter. Regular users (not contacts) are able to call this function.

Name Type Value Notes
sid string(32) session key created as a result of passing authentication [[Planfix API: Authentication Authentication]]
title string Project name
description string Description of the project set by the user
owner This field is not required. In this case, the creator will be the user who is making the request (determined by sid)
owner.id int dentifier of the user who will be the project creator. value 0 (zero) allowed. In this case, the creator will be the user who is making the request (determined by sid)
client not required
client.id int counterparty identifier value 0 (zero) allowed.
status enum status of the project being created for a list of valid values for this field, see the project statuses section статусы проектов
hidden bool hidden
hasEndDate bool whether or not there is an end date
endDate DateTime only used if hasEndDate parameter is true
group project group identifier
group.id int not required
parent parent project identifier
parent.id int project auditors
auditors project managers not required
auditors.id int project manager identifier
managers project default assignees not required
managers.id int default project assignee identifier
workers project custom field values
workers.id int project custom field identifier
customData project custom field value
customData.customValue.id идентификатор пользовательского поля проекта
customData.customValue.value project custom field value (for task set, employee list, and directory entry set field types, separate identifiers with commas in square brackets)