Create Project from Template

POST /tm/api/v1/projects/create/from-template

Operation id: createProjectFromTemplate

Description

Create projects using a template.

Security

  • ApiKeyAuth (apiKey)
    • API key passed in the apikey request header.

Responses

200 — Success

Content type: application/json

400 — Error

Content type: application/json

Request body

Required: Yes

multipart/form-data

Schema

PropertyTypeRequiredDescription
templateIdstringYesTemplate Id
projectTitlestringNoProject name
projTypestringNoProject type Id
startDatestring (date)YesProject start date
endDatestring (date)YesProject end date
unitIdstringYesComma separated list of units for distribution
userIdstringYesCreator user id
assignDeptstringYesAssign to Dept
assignTostringYesAssign to Profile
execLevelstringNoProject execution level
additionalInfostringNoAdditional info
projNotesstringNoProject notes
prioritystringNoProject priority
{
  "type": "object",
  "required": [
    "templateId",
    "startDate",
    "endDate",
    "unitId",
    "userId",
    "assignDept",
    "assignTo"
  ],
  "properties": {
    "templateId": {
      "type": "string",
      "description": "Template Id"
    },
    "projectTitle": {
      "type": "string",
      "description": "Project name"
    },
    "projType": {
      "type": "string",
      "description": "Project type Id"
    },
    "startDate": {
      "type": "string",
      "format": "date",
      "description": "Project start date",
      "example": "Date in System Date Format"
    },
    "endDate": {
      "type": "string",
      "format": "date",
      "description": "Project end date",
      "example": "Date in System Date Format"
    },
    "unitId": {
      "type": "string",
      "description": "Comma separated list of units for distribution"
    },
    "userId": {
      "type": "string",
      "description": "Creator user id"
    },
    "assignDept": {
      "type": "string",
      "description": "Assign to Dept"
    },
    "assignTo": {
      "type": "string",
      "description": "Assign to Profile"
    },
    "execLevel": {
      "type": "string",
      "description": "Project execution level"
    },
    "additionalInfo": {
      "type": "string",
      "description": "Additional info"
    },
    "projNotes": {
      "type": "string",
      "description": "Project notes"
    },
    "priority": {
      "type": "string",
      "description": "Project priority"
    }
  }
}

Response models

200 — Success

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringNo
dataobjectNo
messagestringNo
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "example": "SUCCESS"
    },
    "data": {
      "type": "object",
      "properties": {
        "projectId": {
          "type": "string",
          "example": "12345"
        },
        "assignedTo": {
          "type": "string",
          "example": "SM"
        },
        "projectTitle": {
          "type": "string",
          "example": "Floor security: Use of safety equipment"
        }
      }
    },
    "message": {
      "type": "string",
      "example": "4011215 - Project successfully submitted to queue."
    }
  }
}

Example:

{
  "status": "SUCCESS",
  "data": {
    "projectId": "12345",
    "assignedTo": "SM",
    "projectTitle": "Floor security: Use of safety equipment"
  },
  "message": "4011215 - Project successfully submitted to queue."
}

400 — Error

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringNo
errorarrayNo
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "example": "ERROR"
    },
    "error": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}

Example:

{
  "status": "ERROR",
  "error": [
    {
      "code": "835",
      "message": "Invalid Input Parameters"
    }
  ]
}