Create Favorite

Details

API Details
Name

Create Favorite

Description
MethodPOST
URIv1/favorites
CloudCenter ReleaseIntroduced in CloudCenter 4.8.0.
Notes
  • General Notes:
  • API Notes:
    • You can only manage your own favorites.
    • This API only applies to VIRTUAL_MACHINE and JOB resources.
    • The created attribute is a read-only attribute and cannot be configured.
    • The resource must pre-exist and you must have access to that resource or the request results in a validation error
ESB Headeraction: create.favorites

Sample Request Call

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

Request Body

{  
   "resourceId":"6",
   "resourceType":"VIRTUAL_MACHINE",
   "userId":"2"
}

Response

{
   "id":"11",
   "resource":"http://<HOST>:<PORT>/v1/favorites/11",
   "resourceId":"6",
   "resourceType":"VIRTUAL_MACHINE",
   "userId":"2",
   "created":1483666539599
}

Request Attributes

resourceId
  • Description: Unique identifier for a CloudCenter Resource managed by ACLs. This ID is generated automatically by the CloudCenter platform when the resource is created.  
  • Type: String

resourceType
  • Description: The CloudCenter Resource type to identify as a favorite.

  • Type: Enumeration

    EnumerationCategory

    VIRTUAL_MACHINE

    Identifies this resource to be favorite VM as explained in  VM Management APIs.

    JOB

    Identifies this resource to be a favorite job as explained in v1 Job Management APIs.

userId
  • Description: Unique, system-generated identifier for a user
  • Type: String

 

Response Attributes

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

  • Type: String
resource
  • Description: Unique URL to access this resource.
  • Type: String

resourceId
  • Description: Unique identifier for a CloudCenter Resource managed by ACLs. This ID is generated automatically by the CloudCenter platform when the resource is created.  
  • Type: String

resourceType
  • Description: The CloudCenter Resource type to identify as a favorite.

  • Type: Enumeration

    EnumerationCategory

    VIRTUAL_MACHINE

    Identifies this resource to be favorite VM as explained in  VM Management APIs.

    JOB

    Identifies this resource to be a favorite job as explained in v1 Job Management APIs.

userId
  • Description: Unique, system-generated identifier for a user
  • Type: String

created
  • Description: The date that this resource or favorite was created (system generated). This is a read-only attribute and cannot be configured.
  • Type: Long
  • No labels