Releases can be retrieved through this API using a GET service. Include Page
Table of Contents | ||
---|---|---|
|
GET (By Id)
This GET service will return the JSON representation of a release given a release Id.
Info | ||
---|---|---|
| ||
Request
...
Response
Release JSON objects can having the following attributes:
...
releaseId
...
Releases can be retrieved through this API using a GET service.
Include Page | ||||
---|---|---|---|---|
|
Table of Contents | ||
---|---|---|
|
GET (By Id)
This GET service will return the JSON representation of a release given a release Id.
Info | ||
---|---|---|
| ||
Request
Parameter | Type | Required | Description |
---|---|---|---|
releaseId | URL | Yes | Path parameter for the release Id |
Response
Release JSON objects can having the following attributes:
Attribute | Type | Description |
---|---|---|
releaseId | Long | The id of the release |
releaseName | String | The name of the release |
releaseStatus | String | The current status of the release. Possibles statuses are NOTSTARTED, STARTED, SUSPENDED, COMPLETED, and ABORTED |
description | String | The description of the release |
pipelineId | Long | The id of the pipeline used by the release |
pipelineName | String | The name of the pipeline used by the release |
startDate | String | The date the release started |
endDate | String | The date the release ended |
scheduleBuildExpression | String | The CRON expression which is used to schedule builds |
projects | List<ReleaseProjects> | The list of projects associated with the release. See more about ReleaseProjects below. |
cmsDetails | ReleaseCMSDetailsPojo | The details for a Change Management System in release. See more about the ReleaseCMSDetailsPojo below. |
properties | List<PropertyValuePojo> | The list of properties associated with the configured pipeline. See more about the PropertyValuePojo below. |
Elements of ReleaseProjects have the following attributes:
Attribute | Type | Description | |
---|---|---|---|
priority | Integer | The priority of the project | |
projectId | Long | The id of the project | projectName|
packageName | String | The package name | offor the project |
applicationPath | String | The fully-qualified path of the application which the project is in | |
packageName | String | The package name for the project (partial deployment projects only) | |
requestAllFiles | Boolean | Whether or (partial deployment projects only) | |
requestAllFiles | Boolean | Whether or not the project includes all files (partial deployment projects only) | |
buildEnvironmentId | Long | The id of the build environment for the project | |
projectStreamId | Long | The id of the Stream which the project/package was built from | |
projectGroups | String | Groups the project is in, based on groups defined in associated pipeline |
Response Codes
Elements of PropertyValuePojo have the following attributes:
Attribute | Type | Description |
---|---|---|
200 | Release was found and returned | |
401 | Unauthorized (User may not be signed in or user may not have read access to release) | |
404 | Not found or release wasn't in given releaseId | |
500 | Unexpected internal server error |
Example
If a release in our database had an id of 14321 and a GET request was sent to http://host:port/flexdeploy/rest/v1/releases/14321
A Release JSON object will be returned with release information:
theme | Eclipse |
---|---|
title | Response JSON |
propertyName | String | Name of the property |
propertyValue | String | Value of the property |
Elements of ReleaseCMSDetailsPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
cmsInstanceId | Long | The instance id for the Change Management System |
overrideSettings | Boolean | Whether or not the settings for the Change Management System should be overridden in this release |
overriddenDefaultConfigurations | ReleaseCMSOverrideDefaultConfigPojo | Information about the default overridden configuration for the Change Management System. See more about the ReleaseCMSOverrideDefaultConfigPojo below. |
overriddenEnvironmentConfigurations | List<ReleaseCMSOverrideEnvConfigPojo> | Information about the overridden environment configurations for the Change Management System. See more about the ReleaseCMSOverrideEnvConfigPojo below. |
Elements of ReleaseCMSOverrideDefaultConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
requireChangeTicketForDeployment | Boolean | Allows override of whether a change ticket is required for deployment by default for the Change Management System |
Elements of ReleaseCMSOverrideEnvConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
environmentId | Long | Id of the environment to override settings |
requireChangeTicketForDeployment | Boolean | Whether a change ticket is required for deploying to this environment |
Response Codes
HTTP Code | Description |
---|---|
200 | Release was found and returned |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Release not found |
500 | Unexpected internal server error |
Example
If a release in our database had an id of 14321 and a GET request was sent to http://host:port/flexdeploy/rest/v1/releases/14321
A Release JSON object will be returned with the following release information:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "releaseId": 14321, "releaseName": "Test Release 1", "description": "", "pipelineId": 10004, "pipelineName": "Simple Pipeline", "startDate": "2019-02-13", "endDate": null, "scheduleBuildExpression": null, "releaseStatus": "STARTED", "projects": [ { "priority": 21, "projectId": 1000110000, "packageName": null"package1", "projectName": "REST Project 21", "requestAllFiles": false, "applicationPath": "FlexDeploy/REST", "buildEnvironmentId": 1005621212, "projectStreamId": 1598613900, "projectGroups": null }] } |
GET (Using Query Parameters)
This GET service will return the JSON representation of a list of releases given release query parameters.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/releases |
Request
,
{
"priority": 2,
"projectId": 10001,
"packageName": null,
"projectName": "REST Project 2",
"requestAllFiles": false,
"applicationPath": "FlexDeploy/REST",
"buildEnvironmentId": 10056,
"projectStreamId": 15986,
"projectGroups": null
}]
} |
GET (Using Query Parameters)
This GET service will return the JSON representation of a list of releases given release query parameters.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/releases |
Request
Parameter | Type | Required | Description | ||
---|---|---|---|---|---|
releaseName | String (Query) | No | Query based on the | statusname of the release. | PossibleName is case insensitive. The service will query for release names which contain the release name provided. |
releaseStatus | String (Query) | No | Query based on the status of the release. Possible statuses are NOT STARTED, STARTED, SUSPENDED, and COMPLETED. Status is case insensitive. |
Tip |
---|
If no query parameters are provided, all releases will be returned. |
Response
Release JSON objects can have the following attributes:
Attribute | Type | Description |
---|---|---|
releaseId | Long | The id of the release |
releaseName | String | The name of the release |
releaseStatus | String | The current status of the release. Possibles statuses are NOTSTARTED, STARTED, SUSPENDED, COMPLETED, and ABORTED |
description | String | The description of the release |
pipelineId | Long | The id of the pipeline used by the release |
pipelineName | String | The name of the pipeline used by the release |
startDate | String | The date the release started |
endDate | String | The date the release ended |
scheduleBuildExpression | String | The expression which is used to schedule builds |
projects | List<ReleaseProjects> | The list of projects associated with the release. See more about ReleaseProjects below. |
cmsDetails | ReleaseCMSDetailsPojo | The details for a Change Management System in release. See more about the ReleaseCMSDetailsPojo below. |
properties | List<PropertyValuePojo> | The list of properties associated with the configured pipeline. See more about the PropertyValuePojo below. |
Elements of ReleaseProjects have the following attributes:
Attribute | Type | Description |
---|---|---|
priority | Integer | The priority of the project |
projectId | Long | The id of the project |
projectNamepackageName | String | The package name of for the project |
applicationPath | String | The fully-qualified path of the application which the project is in |
packageName | String | The package name for the project (partial deployment projects only) |
requestAllFiles | Boolean | Whether or (partial deployment projects only) |
requestAllFiles | Boolean | Whether or not the project includes all files (partial deployment projects only) |
buildEnvironmentId | Long | The id of the build environment for the project |
projectStreamId | Long | The id of the Stream which the project/package was built from |
projectGroups | String | Groups the project is in, based on groups defined in associated pipeline |
Response Codes
Elements of PropertyValuePojo have the following attributes:
Attribute | Type | Description |
---|---|---|
200 | Releases found in query were successfully returned | |
400 | Bad request | |
401 | Unauthorized (User may not be signed in or user may not have read access to release) | |
500 | Unexpected internal server error |
Example
If we want to see all releases with a name containing 'Rest' with a status of STARTED, we would send this request:
Request: http://host:port/flexdeploy/rest/v1/releases?releaseStatus=STARTED&releaseName=Rest
A GET request would be triggered and return the following JSON releases object:
theme | Eclipse |
---|---|
title | GET JSON Response |
propertyName | String | Name of the property |
propertyValue | String | Value of the property |
Elements of ReleaseCMSDetailsPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
cmsInstanceId | Long | The instance id for the Change Management System |
overrideSettings | Boolean | Whether or not the settings for the Change Management System should be overridden in this release |
overriddenDefaultConfigurations | ReleaseCMSOverrideDefaultConfigPojo | Information about the default overridden configuration for the Change Management System. See more about the ReleaseCMSOverrideDefaultConfigPojo below. |
overriddenEnvironmentConfigurations | List<ReleaseCMSOverrideEnvConfigPojo> | Information about the overridden environment configurations for the Change Management System. See more about the ReleaseCMSOverrideEnvConfigPojo below. |
Elements of ReleaseCMSOverrideDefaultConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
requireChangeTicketForDeployment | Boolean | Allows override of whether a change ticket is required for deployment by default for the Change Management System |
Elements of ReleaseCMSOverrideEnvConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
environmentId | Long | Id of the environment to override settings |
requireChangeTicketForDeployment | Boolean | Whether a change ticket is required for deploying to this environment |
Response Codes
HTTP Code | Description |
---|---|
200 | Search successful and results returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
If we want to see all releases with a name containing 'Rest' with a status of STARTED, we would send this request:
Request: http://host:port/flexdeploy/rest/v1/releases?releaseStatus=STARTED&releaseName=Rest
A GET request would be triggered and return the following JSON release objects:
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "packageNamedescription": null, "endDate": null, "projectGroupsstartDate": null, "2019-02-05", "projectNameprojects": "RESTDeployProject1", [ "projectId": 13903, { "requestAllFilespriority": false1, "projectStreamIdpackageName": 13904null, "buildEnvironmentIdprojectGroups": 10956null, "applicationPathprojectName": "FlexDeploy/RESTTestsRESTDeployProject1", }, {"projectId": 13903, "priorityrequestAllFiles": 1false, "packageNameprojectStreamId": "Package2"13904, "projectGroupsbuildEnvironmentId": null10956, "projectNameapplicationPath": "RESTDeployPartialProject",FlexDeploy/RESTTests" }, "projectId": 13921, { "requestAllFilespriority": false1, "projectStreamIdpackageName": 13922"Package2", "buildEnvironmentIdprojectGroups": 10956null, "applicationPathprojectName": "FlexDeploy/RESTTests"RESTDeployPartialProject", }, {"projectId": 13921, "priorityrequestAllFiles": 1false, "packageNameprojectStreamId": "Package1"13922, "projectGroupsbuildEnvironmentId": null10956, "projectNameapplicationPath": "RESTDeployPartialProject",FlexDeploy/RESTTests" }, "projectId": 13921, { "requestAllFilespriority": false1, "projectStreamIdpackageName": 13922"Package1", "buildEnvironmentIdprojectGroups": 10956null, "applicationPathprojectName": "FlexDeploy/RESTTests"RESTDeployPartialProject", } "projectId": 13921, ], "pipelineIdrequestAllFiles": 10004false, "scheduleBuildExpression": null, "releaseStatusprojectStreamId": "STARTED"13922, "releaseId": 12101, "releaseNamebuildEnvironmentId": 10956, "REST Release 1", "pipelineName "applicationPath": "Test Pipeline""FlexDeploy/RESTTests" } ], {"pipelineId": 10004, "descriptionscheduleBuildExpression": null, "releaseStatus": "endDate"STARTED", "releaseId": null, "startDate": "2019-02-05", "projects": [ { "priority": 1, "packageName": null, "projectGroups": null, "projectName": "RESTDeployPartialProject", "projectId": 13921, "requestAllFiles": true, 12101, "releaseName": "REST Release 1", "pipelineName": "Test Pipeline" }, { "description": null, "endDate": null, "startDate": "2019-02-05", "projects": [ { "priority": 1, "packageName": null, "projectGroups": null, "projectName": "RESTDeployPartialProject", "projectId": 13921, "requestAllFiles": true, "projectStreamId": 13922, "buildEnvironmentId": 10956, "applicationPath": "FlexDeploy/RESTTests" }, { "priority": 1, "packageName": null, "projectGroups": null, "projectName": "RESTDeployProject1", "projectId": 13903, "requestAllFiles": false, "projectStreamId": 13904, "buildEnvironmentId": 10956, "applicationPath": "FlexDeploy/RESTTests" } ], "pipelineId": 10004, "scheduleBuildExpression": null, "releaseStatus": "STARTED", "releaseId": 12104, "releaseName": "REST Release 2", "pipelineName": "Test Pipeline" } ] |
POST (create release)
This POST service will create a new release with the same attributes as the given JSON object.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/releases |
Request
POST will receive a release input JSON object and return a release JSON object. Release input JSON objects for the request can have the following attributes:
Attribute | Type | Required | Description |
---|---|---|---|
releaseName | String | Yes | The name of the release |
releaseStatus | String | No | The current status of the release. Possibles statuses for the request are NOTSTARTED and STARTED. Default status is NOTSTARTED |
description | String | No | The description of the release |
pipelineId | Long | No | The id of the pipeline used by the release |
pipelineName | String | No | The name of the pipeline used by the release |
endDate | String | No | The date the release ended |
scheduleBuildExpression | String | No | The expression which is used to schedule builds |
projects | List<ReleaseProjects> | No | The list of projects associated with the release. See more about ReleaseProjects below. |
cmsDetails | ReleaseCMSDetailsPojo | No | The details for a Change Management System in release. See more about the ReleaseCMSDetailsPojo below. |
properties | List<PropertyValuePojo> | No | The list of properties associated with the configured pipeline. See more about the PropertyValuePojo below. |
Elements of ReleaseProjects have the following attributes:
Attribute | Type | Description |
---|---|---|
priority | Integer | The priority of the project |
projectId | Long | The id of the project |
packageName | String | The package name for the project (partial deployment projects only) |
requestAllFiles | Boolean | Whether or not the project includes all files (partial deployment projects only) |
buildEnvironmentId | Long | The id of the build environment for the project |
projectStreamId | Long | The id of the Stream which the project/package was built from |
projectGroups | String | Groups the project is in, based on groups defined in associated pipeline |
Elements of PropertyValuePojo have the following attributes:
Attribute | Type | Description |
---|---|---|
propertyName | String | Name of the property |
propertyValue | String | Value of the property |
Elements of ReleaseCMSDetailsPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
cmsInstanceId | Long | The instance id for the Change Management System |
overrideSettings | Boolean | Whether or not the settings for the Change Management System should be overridden in this release |
overriddenDefaultConfigurations | ReleaseCMSOverrideDefaultConfigPojo | Information about the default overridden configuration for the Change Management System. See more about the ReleaseCMSOverrideDefaultConfigPojo below. |
overriddenEnvironmentConfigurations | List<ReleaseCMSOverrideEnvConfigPojo> | Information about the overridden environment configurations for the Change Management System. See more about the ReleaseCMSOverrideEnvConfigPojo below. |
Elements of ReleaseCMSOverrideDefaultConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
requireChangeTicketForDeployment | Boolean | Allows override of whether a change ticket is required for deployment by default for the Change Management System |
Elements of ReleaseCMSOverrideEnvConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
environmentId | Long | Id of the environment to override settings |
requireChangeTicketForDeployment | Boolean | Whether a change ticket is required for deploying to this environment |
Response
Release JSON objects can have the following attributes:
Attribute | Type | Description |
---|---|---|
releaseId | Long | The id of the release |
releaseName | String | The name of the release |
releaseStatus | String | The current status of the release. Possibles statuses are NOTSTARTED, STARTED, SUSPENDED, COMPLETED, and ABORTED |
description | String | The description of the release |
pipelineId | Long | The id of the pipeline used by the release |
pipelineName | String | The name of the pipeline used by the release |
startDate | String | The date the release started |
endDate | String | The date the release ended |
scheduleBuildExpression | String | The expression which is used to schedule builds |
projects | List<ReleaseProjects> | The list of projects associated with the release. See more about ReleaseProjects below. |
cmsDetails | ReleaseCMSDetailsPojo | The details for a Change Management System in release. See more about the ReleaseCMSDetailsPojo below. |
properties | List<PropertyValuePojo> | The list of properties associated with the configured pipeline. See more about the PropertyValuePojo below. |
Elements of ReleaseProjects have the following attributes:
Attribute | Type | Description |
---|---|---|
priority | Integer | The priority of the project |
projectId | Long | The id of the project |
packageName | String | The package name for the project (partial deployment projects only) |
requestAllFiles | Boolean | Whether or not the project includes all files (partial deployment projects only) |
buildEnvironmentId | Long | The id of the build environment for the project |
projectStreamId | Long | The id of the Stream which the project/package was built from |
projectGroups | String | Groups the project is in, based on groups defined in associated pipeline |
Elements of PropertyValuePojo have the following attributes:
Attribute | Type | Description |
---|---|---|
propertyName | String | Name of the property |
propertyValue | String | Value of the property |
Elements of ReleaseCMSDetailsPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
cmsInstanceId | Long | The instance id for the Change Management System |
overrideSettings | Boolean | Whether or not the settings for the Change Management System should be overridden in this release |
overriddenDefaultConfigurations | ReleaseCMSOverrideDefaultConfigPojo | Information about the default overridden configuration for the Change Management System. See more about the ReleaseCMSOverrideDefaultConfigPojo below. |
overriddenEnvironmentConfigurations | List<ReleaseCMSOverrideEnvConfigPojo> | Information about the overridden environment configurations for the Change Management System. See more about the ReleaseCMSOverrideEnvConfigPojo below. |
Elements of ReleaseCMSOverrideDefaultConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
requireChangeTicketForDeployment | Boolean | Allows override of whether a change ticket is required for deployment by default for the Change Management System |
Elements of ReleaseCMSOverrideEnvConfigPojo have the following attributes:
Attribute | Type | Description |
---|---|---|
environmentId | Long | Id of the environment to override settings |
requireChangeTicketForDeployment | Boolean | Whether a change ticket is required for deploying to this environment |
Response Codes
HTTP Code | Description |
---|---|
201 | Release created |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
If the POST request sent to http://host:port/flexdeploy/rest/v1/releases receives the following JSON environment object,
Code Block | ||||
---|---|---|---|---|
| ||||
{
"releaseName":"Release Created From REST API",
"releaseStatus": "STARTED",
"pipelineId":12345,
"properties": [
{
"propertyName": "TESTPROPERTY",
"propertyValue": 3
}],
"projects":[
{
"projectId": 33442,
"packageName": "Package 1"
}],
"cmsDetails":
{
"cmsInstanceId": 01010
}
} |
The following release object will then be created in FlexDeploy:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projects": [ { "projectStreamIdbuildEnvironmentId": 13922, null, "buildEnvironmentIdprojectGroups": 10956null, "applicationPathpackageName": "FlexDeploy/RESTTests" }Package 1", { "projectId": 33442, "priorityprojectStreamId": 13502, "requestAllFiles": false, "packageNamepriority": null,1 }], "startDate": null, "projectGroupsendDate": null, "scheduleBuildExpression": null, "pipelineId": 12345, "projectNamereleaseStatus": "RESTDeployProject1STARTED", "projectId"cmsDetails": 13903, { "requestAllFilescmsInstanceId": false01010, "overriddenDefaultConfigurations": null, "projectStreamIdoverriddenEnvironmentConfigurations": 13904, null, "buildEnvironmentIdoverrideSettings": 10956,false }, "description": null, "applicationPathreleaseName": "FlexDeploy/RESTTests"Release Created From REST API", "releaseId": 13607, } "pipelineName": "Pipeline 1", ],"properties": [ "pipelineId": 10004, { "scheduleBuildExpression": null, "releaseStatuspropertyValue": "STARTED3", "releaseId": 12104, "releaseNamepropertyName": "TESTPROPERTY"REST Release 2", } "pipelineName": "Test Pipeline" } ] } |