Anchor | ||||
---|---|---|---|---|
|
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream |
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream/{streamid} |
...
Example
If we had a Project Stream in our database with an Id of 11101 belonging to a project with an Id of 10002 and the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "Stream Descriptin", "isActive": true, "streamName": "FirstStream", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "three", "attribute2": "two", "attribute1": "one", "streamId": 11101 } |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/project/10002/stream/11101
The GET request would return the following JSON Project Stream object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "Stream Descriptin", "isActive": true, "streamName": "FirstStream", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "three", "attribute2": "two", "attribute1": "one", "streamId": 11101 } |
...
GET (Using Query Parameters)
This GET service will return a list of Project Streams from the specified project in the form of JSON objects based on the query parameter streamname. Project Streams are only returned if they match all of the specified query parameters and belong to the corresponding Project. If no query parameters are given this request will return the entire list of Streams within the specified Project.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream? Append the following character sequences to the above URL to specify Query parameters.Use '&' between successive query parameters:streamName={streamName} Examples:To search by code only:http://host:port/flexdeploy/rest/v1/project/{projectid}/stream?streamName={name} |
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "description": "PUTted", "streamName": "PATCHStream1", "isActive": true, "streamId": 10003, "attribute2": "two", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "three", "attribute1": "PATCHoneStotle" }, { "description": "123", "streamName": "PostStream1", "isActive": true, "streamId": 10201, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" }, { "description": "123", "streamName": "Stream2", "isActive": true, "streamId": 10004, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" }, { "description": "123", "streamName": "Stream4", "isActive": true, "streamId": 10101, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" }, { "description": "123", "streamName": "Stream5", "isActive": true, "streamId": 10102, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" } ] |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream?streamName=Stream5
The GET request would return the following JSON Project Stream object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "123", "streamName": "Stream5", "isActive": true, "streamId": 10102, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" } |
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream |
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream/{streamid} |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "123", "streamName": "NewStream", "isActive": true, "streamId": 12723, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" } |
Parameters
Attributes | Type | Required | Description |
---|---|---|---|
description | String | No | This is a description of the Project Stream |
isActive | Boolean | No | This is a Boolean that tracks whether or not the Project Stream is active. If 'null' isActive defaults to 'true' |
attribute1 | String | No | This is the first attribute of the Project Stream |
attribute2 | String | No | This is the second attribute of the Project Stream |
attribute3 | String | No | This is the third attribute of the Project Stream |
versionSyntaxScript | String | No | This is the version syntax script of the Project Stream |
streamId | Long | No | This is the Id of the Project Stream, can pass, but will not change the id of the stream |
streamName | String | No | This is the unique name of the Project Stream |
projectId | URL | Yes | This is the Id of the project to find the stream |
streamid | URL | Yes | This is the Id of the stream which will be updated |
Response Codes
HTTP Code | Description |
---|---|
200 | Project Stream was found and updated |
400 | Bad request |
401 | Unauthorized |
404 | Project Stream not found |
500 | Unexpected internal server error |
...
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream/{streamid}
...
PATCH
This PATCH service will update an existing Project Stream with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the Project Stream.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream/{streamid} |
...
Parameters
Attributes | Type | Required | Description |
---|---|---|---|
description | String | No | This is a description of the Project Stream |
isActive | Boolean | No | This is a Boolean that tracks whether or not the Project Stream is active. If 'null' isActive defaults to 'true' |
attribute1 | String | No | This is the first attribute of the Project Stream |
attribute2 | String | No | This is the second attribute of the Project Stream |
attribute3 | String | No | This is the third attribute of the Project Stream |
versionSyntaxScript | String | No | This is the version syntax script of the Project Stream |
streamId | Long | No | This is the unique Id of the Project Stream |
streamName | String | No | This is the unique name of the Project Stream |
projectId | URL | Yes | This is the Id of the project to find the stream to update |
streamid | URL | Yes | This is the Id of the stream that is being updated |
Response Codes
HTTP Code | Description |
---|---|
200 | Project Stream was found and patched |
400 | Bad request |
401 | Unauthorized |
404 | Project Stream not found |
500 | Unexpected internal server error |
Example
If we had an Project Stream in our database with an Id of 12723 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "123", "streamName": "NewStream", "isActive": true, "streamId": 12723, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" } |
When we run a PATCH request at the following URL
http://host:port/flexdeploy/rest/v1/project/{projectid}/stream/12723
And the PATCH request receives the following JSON Project Stream object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "Patch Description", "streamName": "PatchStream" " } |
The PATCH request would then update the Project Stream with Id 12723 and return the following JSON Project Stream object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "Patch Description", "streamName": "PatchStream", "isActive": true, "streamId": 12723, "attribute2": "2", "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": "3", "attribute1": "1" } |
...