Project Streams can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of Project Streams.
...
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} |
...
Request
Parameter | Type | Required | Description |
---|---|---|---|
projectId | URL | Yes | This is a URL path parameter for the Project Id which specifies the project which will be queried for Streams. |
streamName | Query - String | No | Contains ignore case search for stream name |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Project Stream found Search successful and results returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Project not found |
500 | Unexpected internal server error |
Example
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "UpdateDescription", "streamName": "UpdatedStream", "isActive": true, "streamId": 12321, "attribute2": null, "versionSyntaxScript": "\"1.0.\" + SequenceNumber", "attribute3": null, "attribute1": "1" } |
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} |
...