Project Stream API

Project Stream API

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.

GET

There are two implementations of GET. One will find a Project Stream with the given Id and return the JSON representation of the Project Stream. The other will find a list of Project Streams matching the query parameters supplied to it.

GET by ID

This GET service will find a Project Stream with the given Id and return the JSON representation of the object. 

API URL

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

Request

Parameter

Type

Required

Description

Parameter

Type

Required

Description

projectid

URL

Yes

This is a URL parameter for the Project Id which is searched to find and return a Stream

streamid

URL

Yes

This is a URL parameter for the Project Stream Id which will be returned from the corresponding Project

Response Codes

HTTP Code

Description

HTTP Code

Description

200

Project Stream was found and returned

400

Bad request

401

Authentication failure

403

Authorization failure (no access to resource)

404

Project or Stream not found

500

Unexpected internal server error

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

Project 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

Project 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.

API 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}

The query parameters are not case sensitive. Searching by name=NAME is the same as searching by name=name.

Request

Parameter

Type

Required

Description

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

Response Codes

HTTP Code

Description

HTTP Code

Description

200

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

The following macros are not currently supported in the footer:
  • style