Skip to content

Commit

Permalink
API Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TracyRagan committed Jun 15, 2020
1 parent 9e80c68 commit 887c396
Show file tree
Hide file tree
Showing 30 changed files with 256 additions and 736 deletions.
Expand Up @@ -57,7 +57,7 @@ To use the ID, just place it where you would normally place the object's name. T
curl --data "all=Y" --cookie c:\temp\session.txt http://mac:8080/dmadminweb/API/servers
~~~

##Login
## Login

When issuing calls to the API, the client application must either first issue a "login" call, specifying the username and password or must specify the username and password in each individual call to the API.

Expand Down
36 changes: 9 additions & 27 deletions content/en/userguide/restapi/applications.md
Expand Up @@ -25,6 +25,8 @@ If the "all" parameters is not specified then only the _Applications_ associated
| all | query | y or n | No | string |

{{% include "userguide/reusable/Model Application Result.md" %}}
{{% include "userguide/reusable/Model Application.md" %}}
{{% include "userguide/reusable/Model Application Version.md" %}}

## Retrieve specific _Application_ or _Application Version_

Expand All @@ -45,11 +47,8 @@ This call returns a JSON object representing the specified _Application_. The re
| branch | query | If branch is set along with latest then the latest version on the specified branch name is returned. | Yes | string |
| identifier | path | Is the identifier of the _Application_. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e GLOBAL.Product) or its internal ID. | Yes | string |

**Responses**

| Return Code | Return Code Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [application_version_result](/userguide/restapi/models/#application_version_result) |
{{% include "userguide/reusable/Model Application Version Result.md" %}}
{{% include "userguide/reusable/Model Application Version.md" %}}

## Create New Application Version

Expand Down Expand Up @@ -80,7 +79,7 @@ Replace a _Component_ within an _Application_. This call replaces a specific _Co

| HTTP Verb | URL |
| ---- | ----------- |
| GET | /dmadminweb/API/new/replace/{app_id}/{old_comp_id}/{new_comp_id} |~~~
| GET | /dmadminweb/API/new/replace/{app_id}/{old_comp_id}/{new_comp_id} |

**Parameters**

Expand All @@ -91,12 +90,7 @@ Replace a _Component_ within an _Application_. This call replaces a specific _Co
| old_comp_id | path | Is the ID of the _Component_ (Comp_id) which is to be replaced. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e. GLOBAL.Products) or its internal ID. | Yes | integer |
| new_comp_id | path | Is the ID of the _Component_ which will replace old _Component_ ID (comp_id). Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e GLOBAL.Product) or its internal ID. | Yes | integer |

**Responses**

| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [success](/userguide/restapi/models/#success) |

{{% include "userguide/reusable/Model Success.md" %}}

## Approving an Application

Expand All @@ -120,11 +114,7 @@ This mechanism ensures that the invoking user has permission to approve the _App
| approve | query | Is optional. If specified and set to N for "no," then the _Application_ is rejected. If this parameter is not specified or is set to Y for "yes," then the _Application_ is approved. | No | string |
| notes | query | Any free-text notes that should be associated with the approval/rejection. | No | string |

**Responses**

| Return Code | Return Code Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [success](/userguide/restapi/models/#success) |
{{% include "userguide/reusable/Model Success.md" %}}


## Associate an _Application_ to an _Environment_
Expand All @@ -144,11 +134,7 @@ This call associates an existing _Application_ with an _Environment_. This assoc
| app_id | path | Is the identifier of the _Application_ to be assigned. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e GLOBAL.Product) or its internal ID. | Yes | integer |
| env_id | path | Is the identifier of the _Environment_ to which the _Endpoint_ should be assigned. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e GLOBAL.Product) or its internal ID. | Yes | string |

**Responses**

| Return Code | Return Code Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [success](/userguide/restapi/models/#success) |
{{% include "userguide/reusable/Model Success.md" %}}


## Disassociates an _Application_ from an _Environment_
Expand All @@ -170,8 +156,4 @@ Disassociating an _Application_ from an _Environment_ does not physically remove
| app_id | path | Is the identifier of the _Application_ to be assigned. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e GLOBAL.Product) or its internal ID. | Yes | integer |
| env_id | path | Is the identifier of the _Environment_ to which the server should be assigned. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e GLOBAL.Product) or its internal ID. | Yes | string |

**Responses**

| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [success](/userguide/restapi/models/#success) |
{{% include "userguide/reusable/Model Success.md" %}}
39 changes: 19 additions & 20 deletions content/en/userguide/restapi/components.md
@@ -1,14 +1,14 @@
---
title: "Component APIs"
linkTitle: "Component APIs"
weight: 20
weight: 14
description: >
APIs for _Components_.
---


##Retrieve a _Component_
Retrieve specific _Component_ or _Component_ version. This 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 _Application_s alongside the specified _Component_ and so on.
## Retrieve a _Component_
Retrieve specific _Component_ or _Component_ version. This call returns a JSON Object representing the specified _Component_. It is useful to determine the _Application_(s) which include the _Component_, whether the _Application_ is approved, which other _Components_ are used alongside the specified _Component_ and so on.

**REST Api Endpoint**

Expand All @@ -24,13 +24,18 @@ Retrieve specific _Component_ or _Component_ version. This call returns a JSON o
| branch | query | If branch is set along with latest then the latest version on the specified branch name is returned. | Yes | string |
| identifier | path | Is the identifier of the _Component_. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e. GLOBAL.Products) or its internal ID. | Yes | string |

**Responses**
{{% include "userguide/reusable/Model Component Result.md" %}}
{{% include "userguide/reusable/Model Component.md" %}}
{{% include "userguide/reusable/Model Component Predecessor.md" %}}
{{% include "userguide/reusable/Model Component Version Result.md" %}}
{{% include "userguide/reusable/Model Component Version Full.md" %}}
{{% include "userguide/reusable/Model Application Version Full.md" %}}
{{% include "userguide/reusable/Model Application Version.md" %}}
{{% include "userguide/reusable/Model Request.md" %}}
{{% include "userguide/reusable/Model Approve or Reject.md" %}}

| Return Code | Return Code Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [_Component__version_result](/userguide/restapi/models/#_Component__version_result) |

##Create New _Component Version_
## Create New _Component Version_

This call creates a new _Component Version_. The new _Component_ inherits all the attributes of the predecessor _Component_ including its _Domain_.

Expand All @@ -46,11 +51,8 @@ This call creates a new _Component Version_. The new _Component_ inherits all th
| ---- | ---------- | ----------- | -------- | ---- |
| comp_id | path | Is the ID of the _Component_ which will be the parent of the new _Component Version_. Either its name, its qualified name with its parent _Domains_ included in dot notation (i.e. GLOBAL.Product) or its internal ID. The newly created _Component Version_ will inherit all the attributes from this _Component_. | Yes | integer |

**Responses**

| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [success](userguide/restapi/models/#success) |
{{% include "userguide/reusable/Model Component Result.md" %}}
{{% include "userguide/reusable/Model Success.md" %}}


## Associate a Build with a _Component_
Expand All @@ -69,17 +71,14 @@ In order for this to work through the permission model, the associated "Create _

| Name | Located in | Value | Required | Schema |
| ---- | ---------- | ----------- | -------- | ---- |
| comp_id | path | Is the ID of a BASE _Component_. The latest version of this _Component_ will be found and associated to the build with that _Component Version_. If "branch" is specified then the latest version on the branch is located. The _Component_ can be specified using either its name, its qualified name with its parent _Domains_ included in dot notation (i.e. GLOBAL.Products) or its internal ID. | Yes | integer |
| comp_id | path | Is the ID of a _Component Base Version_. The latest version of this _Component_ will be found and associated to the build with that _Component Version_. If "branch" is specified then the latest version on the branch is located. The _Component_ can be specified using either its name, its qualified name with its parent _Domains_ included in dot notation (i.e. GLOBAL.Products) or its internal ID. | Yes | integer |
| build_id | path | Is the numeric build ID to associate with the latest version of _Component_ ID (comp_id). | Yes | integer |
| taskname | query | Is the identifier of a "Create New _Application_ Task" to execute in order to create the new _Application Version_. Either its name, its qualified name with its domain and any parent _Domains_ included in dot notation (i.e. GLOBAL.Product) or its internal ID. | Yes | string |
| taskname | query | Is the identifier of a "Create New _Application_ Task" to execute in order to create the new _Application Version_. Either its name, its qualified name with its _Domain_ and any parent _Domains_ included in dot notation (i.e. GLOBAL.Product) or its internal ID. | Yes | string |
| commit | query | Is the commit ID which triggered the build. | No | string |
| issue | query | Is a change request id to associate with this build. If you add an issue then the specified _Component_ must have an associated Change Request _Data Source_ associated with it. This is because the API will query the change tracking tool in order to retrieve the description of the change and the current status. If the _Component_ does not have such a Change Request _Data Source_ an error is returned. You can specify one or more issue parameters if you need to associate multiple change requests with this build or use the issues parameter to specify multiple change requests. | No | string |
| issues | query | Is a comma-separated list of change request ids. This is equivalent to specifying multiple issue parameters. | No | string |
| file | query | Is a filename to record against the build. This is typically a file that was changed that resulted in a build being performed. You can specify one or more file parameters if you need to associate multiple files with this build or use the files parameter to specify multiple files. | No | string |
| files | query | Is a comma-separated list of files. This is equivalent to specifying multiple file parameters. | No | string |

**Responses**

| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Success or failure. Check success field for status. | [success](/userguide/restapi/models/#success) |
{{% include "userguide/reusable/Model Component Result.md" %}}
{{% include "userguide/reusable/Model Success.md" %}}

0 comments on commit 887c396

Please sign in to comment.