Code Stream API

Code Stream API

Code Stream is a continuous integration and continuous delivery (CICD) tool that you use to build Pipelines that model the software release process in your DevOps lifecycle. By creating Pipelines, you build the code infrastructure that delivers your software rapidly and continuously.

This page describes the RESTful APIs for Code Stream. The APIs facilitate CRUD operations on the various resources and entities used throughout Code Stream (Pipelines, Endpoints, Variables, etc.) and allow operations on them (executing a Pipeline, validating an Endpoint connection, etc.).

The APIs that list collections of resources also support OData like implementation. Below query params can be used across Code Stream entities.

Example:

  1. $orderby - returns a result with the rows being sorted by the values of provided attribute.

    /codestream/api/endpoints?$orderby=name%20desc

  2. $top, $skip - $top returns the requested number of resources. Used with $skip, the client can skip a given number of resources.

    /codestream/api/endpoints?$expand=true&$top=10&$skip=2

  3. page and $size - page used in conjunction with $size helps in pagination of resources.

    /codestream/api/endpoints?$expand=true&page=0&$size=5

  4. $filter - $filter returns a subset of resources that satisfy the given predicate expression.

    /codestream/api/endpoints?$filter=startswith(name, 'ABC')
    /codestream/api/endpoints?$filter=toupper(name) eq 'ABCD-JENKINS'
    /codestream/api/endpoints?$filter=substringof(%27bc%27,tolower(name))
    /codestream/api/endpoints?$filter=name eq 'ABCD' and project eq 'demo'