Publish Project

Details

API Details
NamePublish Project
Description

Publishes a CloudCenter project that includes one or more deployment environments.

 

MethodPOST
URIv1/projects/projectId?publish=true
CloudCenter ReleaseIntroduced in CloudCenter 4.2.
NotesFor additional context on <PORT> usage in the following example(s), see Base URI Format.
ESB Headeraction: create.projects.projectId
actionparam: publish=true

Example 1

This example supports an active update and publishes the project at the same time. The payload structure should be the same in structure as for a normal POST request.

curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/projects"

Request Body

{
    "name": "Enterprise-CRM-17",
    "description": "CRM 2.0 Release",
    "targetEndDate": "2079-11-05",
    "planType": "BUDGET",
    "quota": {
        "value": 50000
    },
    "apps": [
        {
            "id": "566"
        }
    ]
}

Response

{
    "id": "15",
    "resource": "https://<HOST>:<PORT>/v1/projects/15",
    "name": "Enterprise-CRM-18",
    "projectOwnerId": 2,
    "description": "CRM 2.0 Release",
    "isDraft": true,
    "targetEndDate": "1476379896000",
    "planType": "BUDGET",
    "quota": {
        "value": 50000,
        "measurableUnit": "$"
    },
    "projectCost": {
        "originalBalance": 0,
        "remainingBalance": 0,
        "measurableUnit": "$"
    },
    "apps": [
        {
            "id": "566",
            "resource": "https://<HOST>:<PORT>/v1/apps/566",
            "appName": "JenkinSingleNIC"
        }
    ]
}

Example 2

This example publishes a project without any payload, but you must provide the request body as { }. If you don't have anything to update in the project payload, you can directly publish the project.

curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/projects/15?publish=true"

Request Body

{
}

Response

{
    "id": "15",
    "resource": "https://<HOST>:<PORT>/v1/projects/15",
    "name": "Enterprise-CRM-18",
    "projectOwnerId": 2,
    "description": "CRM 2.0 Release",
    "isDraft": false,
    "targetEndDate": "1476379896000",
    "planType": "BUDGET",
    "quota": {
        "value": 50000,
        "measurableUnit": "$",
        "type": "LIMITED"
    },
    "projectCost": {
        "originalBalance": 200,
        "remainingBalance": 200,
        "measurableUnit": "$"
    },
    "apps": [
        {
            "id": "566",
            "resource": "https://<HOST>:<PORT>/v1/apps/566",
            "appName": "JenkinSingleNIC"
        }
    ],
    "phases": [
        {
            "id": "12",
            "resource": "https://<HOST>:<PORT>/v1/projects/15/phases/12",
            "name": "CRM-Dev-Phase1"
        }
    ]
}

Example 3

This example publishes a project with some changes in the payload – the quota is updated (from 5000 to 8000) and the project is published with the updated quota changes.

 

curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/projects/15?publish=true"

Request Body

 {
    "name": "Enterprise-CRM-18",
    "description": "CRM 2.0 Release",
    "targetEndDate": "1476379896000",
    "planType": "BUDGET",
    "quota": {
        "value": 80000
    },
    "apps": [
        {
            "id": "566"
        }
    ]
}

Response

{
    "id": "15",
    "resource": "https://<HOST>:<PORT>/v1/projects/15",
    "name": "Enterprise-CRM-18",
    "projectOwnerId": 2,
    "description": "CRM 2.0 Release",
    "isDraft": false,
    "targetEndDate": "1476379896000",
    "planType": "BUDGET",
    "quota": {
        "value": 80000,
        "measurableUnit": "$",
        "type": "LIMITED"
    },
    "projectCost": {
        "originalBalance": 200,
        "remainingBalance": 200,
        "measurableUnit": "$"
    },
    "apps": [
        {
            "id": "566",
            "resource": "https://<HOST>:<PORT>/v1/apps/566",
            "appName": "JenkinSingleNIC"
        }
    ],
    "phases": [
        {
            "id": "12",
            "resource": "https://<HOST>:<PORT>/v1/projects/15/phases/12",
            "name": "CRM-Dev-Phase1"
        }
    ]
}

Request Attributes

name
  • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

  • Type: String

Required

description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String
 targetEndDate 
  • Description: The targeted end date for this project in  Unix time format.
  • Type: String
 
 planType 
  • Description: The type of plan for this project. See CloudCenter Subscription Types for additional context.
  • Type: Enumeration

    EnumerationDescription
    BUDGETPrepaid Budget Bundle
    VMVM Subscription
    UNDEFINEDPlan not defined

quota (click for additional details)

apps (click for additional details)  

Response Attributes

projects
  • Description: Identifies details about each
  • Type: Array of projects

    id
    • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

    • Type: String
    resource
    • Description: Unique URL to access this resource
    • Type: String
    perms (click for additional details)

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    projectOwnerId
    • Description: Unique, system-generated identifier for the project owner.

    • Type: String
    description
    • DescriptionA brief description for this CloudCenter Resource.

    • Type: String
     isDraft 
    • Description: The project draft status
    • Type: Boolean
      • true = This project is in the draft state
      • false = This project is now published
     targetEndDate 
    • Description: The targeted end date for this project in  Unix time format.
    • Type: String
    notifyUsers
    • Description: Identifies if notification is enabled for this project:
      • true = Notification is enabled
      • false = Default. Notification is disabled
    • Type: Boolean
     planType 
    • Description: The type of plan for this project. See CloudCenter Subscription Types for additional context.
    • Type: Enumeration

      EnumerationDescription
      BUDGETPrepaid Budget Bundle
      VMVM Subscription
      UNDEFINEDPlan not defined
    deleted
    • Description: Identifies if this resource is deleted in the CloudCenter platform.
    • Type: Boolean
      • true = The resource is deleted.
      • false = The resource is not deleted.

    quota
    • Description: The value and type for the project quota.
    • Type: An enclosure for project quota information

      value
      • Description: Indicates the set value for this property
      • Type: Float

      Indicates the total quota (balance) for the project
      measurableUnit
      • Type: String
      type
      • Description: The type of quota used for a project. Examples:

        Quota DefinitionExamples
        No definition
        "quota' : { "type" : "UNLIMITED" }
        Unlimited
        "quota' : { "type" : "UNLIMITED" }
        Limited
        • "quota" : {
              "value": 5000,
              "type": "LIMITED"}
        • "quota" : {
              "value": 5000,
              "type": "LIMITED"}
      • Type: Enumeration

        EnumerationDescription
        LIMITEDProvide a well defined value for quota
        UNLIMITEDDefault. No quota limit

       

    projectCost
    • Description: The cost of this project
    • Type: Sequence of objects

      originalBalance
      • Description: The opening account balance for this user, project, or phase
      • Type: Float
      remainingBalance
      • Description: Available balance in this user's plan, project, or phase
      • Type: Float
      measurableUnit
      • Type: String
    apps
    • Description: List of applications associated with this project
    • String: Array of application identifiers

      id
      • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

      • Type: String
      resource
      • Description: Unique URL to access this resource
      • Type: String
      perms (click for additional details)

      appName
      • Description: The name of the application in use.
      • Type: String

    phases (click for additional details)

    The phases attribute is not displayed for v1/projects. This attribute displays the idresource, and name when you specify a project (v1/projects/projectId).