Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
themeEclipse
titleProject Stream- 11101
{
   "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
themeEclipse
titleProject Stream GET Return JSON
{
   "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
titleAPI URLs

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
themeEclipse
titleProject Stream PUT Return JSON
{
      "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
titleAPI URL

http://host:port/flexdeploy/rest/v1/project/{projectid}/stream/{streamid}

...