The List Specific Component call returns a JSON object representing the specified Component. It is useful to determine the Application(s) which include the Component, whether the Application(s) are approved, which other Components are used in Applications alongside the specified Component and so on.


Query:

http://host/dmadminweb/API/Component/identifier?

[latest=y&][branch=<name>]


Where:

Host

Is the hostname and port of the DeployHub Server (e.g.: hostname:8080 or for SaaS console.deployhub.com).

Identifier

Is the identifier of the Component. Either its name, its qualified name (i.e.: with its parent domain(s) included in dot notation) or its internal ID.


If latest is set to ‘Y’ then the latest Version of the Component is returned.  To use this flag, the specified identifier must refer to a Component Base Version, otherwise the flag has no effect.


If branch is set along with latest, then the latest Version on the specified branch name is returned.


Example Result:


{

       "success": true,

       "result": {

               "branch": "",

               "domain": "FIS.Test",

               "id": 221,

               "lastbuild": 155,

               "name": "tcomp123",

               "owneruser": "fisadmin",

                               "requests": [

                                       {

                                       "apiurl": "https://...",

                                       "htmlurl": "https://...",

                                       "id": "TS-1",

                                       "status": "To Do",

                                       "title": "Here is a description of a change"

                       }

                       Repeats for each Component change request

               ],

               "summary": "",

               "Versions": [

                       {

                               "id": 222,

                               "name": "tcomp123;1",

                               "summary": ""

                       }

                       Repeats for each Version

               ],

               "Applications": [

                       {

                               "approvals": [

                                       {

                                               "domain": "Test",

                                               "note": "",

                                               "timestamp": 1455801949,

                                               "user": "tester1"

                                       }

                                       Repeats for each approval

                               ],

                               "rejections": [

                               ],

                               "branch": "",

                               "Components": [

                                       {

                                               "id": 54,

                                               "name": "FrameworkComponent",

                                               "summary": ""

                                       }

                                       Repeats for each Component

                               ],

                                               "domain": "GLOBAL.FIS",

                               "id": 161,

                               "name": "FISApp",

                               "owneruser": "admin",

                                               "requests": [

                                                       {

                                                               "apiurl": "https://....",

                                                               "htmlurl": "https://....",

                                                               "id": "140",

                                                               "status": "closed",

                                                               "title": "Creation Rights Missing"

                                                       }

                                       Repeats for each Application change request

                               ],

                               "summary": "Base Application for FIS",

                               "Versions": [

                               ]

                       }

                       Repeats for each Application

               ]

       }

}


success:

Is true or false depending on the success or failure of the query. If success is false, then result is not returned and a text field named “error” is returned instead.

result:

Is a JSON object representing the Component being retrieved.

branch:

Is the name of the branch on which this Component is located (if a Component Version). If no branch is specified, this string is zero length.

requests:

Is a JSON array of JSON Objects representing the Change Requests associated with the Component.

domain:

The fully-qualified domain name of the Domain in which the Component is located.

id:

Is the Component’s internal object ID.

lastbuild:

Is the last build number associated with this Component (0 if never built or no associated build job).

name:

Is the name of the Component.

owneruser:

If the “owner” of the Component is a User, then this is the name of the User.

ownergroup:

If the “owner” of the Component is a user Group, then this is the name of that Group.

summary:

Is the summary text associated with the Component.

predecessor:

Returned when the specified Component is a Component Version. A JSON Object representing the predecessor of this Component (if the Component is a Version).


Within the predecessor object:


id:

Is the internal Component ID.

name:

The name of the predecessor Component.

summary:

Is the summary text associated with the predecessor Component.

Versions:

Returned when the specified Component is a BASE Component. A JSON Array containing JSON Objects representing the Versions of this Component.


Within each Version object:


id:

Is the internal Component ID.

name:

Is the name of the Component Version.

summary:

Is the summary text associated with the Component Version.

Applications:

Is a JSON array containing a list of JSON Objects representing the Applications that include this Component.


For Each Application:


approvals:

Is a JSON array containing a list of JSON Objects representing the approvals that have been performed on this Application.

rejections:

Is a JSON array containing a list of JSON Objects representing the rejections that have been performed on this Application.

branch:

Is the name of the branch on which this Application is located (if an Application Version. If no branch is specified, this string is zero length.

components:

Is a JSON array containing a list of JSON Objects representing the Components that make up the Application.

requests:

Is a JSON array containing a list of JSON Objects representing the change requests associated with the Application.

domain:

The fully-qualified domain name of the domain in which the Application is located.

id:

Is the internal ID of the Application.

name:

Is the name of the Application.

owneruser:

If the “owner” of the Application is a User, then this is the name of the User.

ownergroup:

If the “owner” of the Application is a user Group, then this is the name of that Group.

summary:

Is the summary text associated with the Application.

predecessor:

Only returned for Application Versions. A JSON Object representing the predecessor of this Application (if the Application is a Version).

Versions:

Only returned  for BASE Applications. A JSON Array of JSON Objects representing the Versions of this Application.


Within each approval object:


domain:

Is the name of the approval Domain.

note:

Is any note entered when the approval was executed.

timestamp:

Is the time the approval was executed (epoch time).

user:

Is the name of the User executing the approval.


Within each rejection object:


domain:

Is the name of the approval Domain.

note:

Is any note entered when the approval was executed.

timestamp:

Is the time the approval was executed (epoch time).

user:

Is the name of the User executing the approval.


Within each request object:


id:

Is the ID of the change request as known by the external change tracking system.

title:

Is the description of the Change Request.

status:

Is the status of the Change Request.

api_url:

Is the URL of the API call to the external change tracking system that is required to return more data about the specified Change Request.

html_url:

Is the URL of the page in the external change tracking system which details more information about the Change Request.


Within each Component object:


id:

Is the Component’s internal ID.

name:

Is the name of the Component.

summary:

Is the summary text associated with the Component.


Within the predecessor object:


id:

Is the internal Application ID.

name:

Is the name of the predecessor Application.

summary:

Is the summary text associated with the predecessor Application.


Within each Version object:


id:

Is the internal Application ID.

name:

Is the name of the Application Version.

summary:

Is the summary text associated with the Application Version.