TASK & PIPELINE: API

On this documentation, you will find all the routes available on the Deploy API.

If you use the Deploy API from outside the cluster, use the following endpoint in front of the route : https://domain_name/apps/deploy-api

If you use it from inside the cluster, use this endpoint in front of the route : http://deploy-api.default.svc.cluster.local

Task

GET /v1/task/deploy/:repository/:directory

Simply deploy a task

:repository : git repository :directory : resource directory in the git repository

Vars configured by the API :

namespace = :repository name = the name in the manifest.json branch = master

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header.

You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/task/deployas/:repository/:directory/:name

Deploy a task with a name

:repository : git repository :directory : resource directory in the git repository :name : name with which the task will be deployed

Vars configured by the API :

namespace = :repository branch = master

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/task/deployinas/:repository/:directory/:namespace/:name

Deploy a task with a name in a specific namespace

:repository : git repository :directory : resource directory in the git repository :namespace : namespace in which the task will be deployed | default : :repository :name : name with which the task will be deployed

Vars configured by the API :

branch = master

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


POST /v1/task/elaborate/deployinas/:repository/:directory/:namespace/:name

Deploy a task with a name in a specific namespace and multiple parameters

:repository : git repository :directory : resource directory in the git repository :namespace : namespace in which the task will be deployed | default : :repository :name : name with which the task will be deployed

Form-data in the body :

:branch : the branch of the git used for the task | default : "master" :schedule : the cron expression to schedule your task (create a cronjob) | default : ""

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


POST /v2/task/elaborate/deploy/:repository/:directory

Deploy a task multiple parameters passed in the body

:repository : git repository :directory : resource directory in the git repository

Form-data in the body :

:namespace : namespace in which the task will be deployed | default : :repository :name : name with which the task will be deployed :branch : the branch of the git used for the task | default : "master" :schedule : the cron expression to schedule your task (create a cronjob) | default : ""

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


POST /v2/task/load/configuration/from-git/:repository/:directory

Load a manifest.json from the git

:repository : git repository :directory : resource directory in the git repository

Form-data in the body :

:branch : the branch of the git used for the task | default : "master"


GET /v2/task/get/configuration-loading-state/:work_id

Retrieve the status of the manifest.json loading from the git

:work_id : the work_id of the manifest.json loading


POST /v2/task/deploy/with-configuration

Deploy a task with configuration passed in the body

Form-data in the body :

:namespace : namespace in which the task will be deployed :configuration : manifest.json :repository : git repository | default : "" (required to use a destination image in the manifest) :directory : resource directory in the git repository | default : "" (required to use a destination image in the manifest)

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/task/state/:id

Retrieve the status of a task

:id : the id of the task


POST /v2/task/get/template

Get the template of a task

:template_path : Template file name stored in GS


Pipelines

GET /v1/pipeline/runas/:repository/:directory/:name

Run a pipeline with a name

:repository : git repository :directory : resource directory in the git repository :name : name with which the pipeline will be run

Vars configured by the API :

namespace = :repository branch = master

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/pipeline/runinas/:repository/:directory/:namespace/:name

Run a pipeline with a name in a specific namespace

:repository : git repository :directory : resource directory in the git repository :namespace = namespace in which pipeline tasks will be deployed | default : repository :name : name with which the pipeline will be run

Vars configured by the API :

branch = master

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


POST /v1/pipeline/elaborate/runinas/:repository/:directory/:namespace/:name

Run a pipeline with a name in a specific namespace and multiple parameters

:repository : git repository :directory : resource directory in the git repository :namespace : namespace in which pipeline tasks will be deployed | default : repository :name : name with which the pipeline will be run | default : "master"

Form-data in the body :

:branch : the branch of the git used for the pipeline

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


POST /v2/pipeline/elaborate/run/:repository/:directory/:name

Run a pipeline with a name and multiple parameters passed in the body

:repository : git repository :directory : resource directory in the git repository :name : name with which the pipeline will be run

Form-data in the body :

:namespace : namespace in which pipeline tasks will be deployed | default : repository :branch : the branch of the git used for the pipeline | default : "master"

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


POST /v2/pipeline/load/configuration/from-git/:repository/:directory

Load a pipeline configuration from the git

:repository : git repository :directory : resource directory in the git repository

Form-data in the body :

:branch : the branch of the git used for the pipeline | default : "master"


GET /v2/pipeline/get/configuration-loading-state/:work_id

Retrieve the status of the pipeline.json loading from the git

:work_id : the work_id of the pipeline.json loading


POST /v2/pipeline/run/with-configuration

Run a pipeline with configuration passed in the body

Form-data in the body :

:namespace : namespace in which pipeline tasks will be deployed :configuration : pipeline.json

[Protected route] To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/pipeline/state/:namespace/:id

Retrieve the status of a pipeline

:namespace : the namespace in which the pipeline was deployed :id : the id of the pipeline


GET /v1/pipeline/kill/:id

Sending an order to a pipeline to kill itself

:id : the id of the pipeline

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


POST /v2/pipeline/get/template

Get the template of a pipeline

:template_path : Template file name stored in GS


List

GET /v1/list/namespaces

Retrieve the list of namespace that originates from the namespace deploy


GET /v1/list/tasks

Get the list of jobs, cronJobs, deployments and services for all namespace


GET /v1/list/tasks/:namespace

Get the list of jobs, cronJobs, deployments and services of a namespace

:namespace : the namespace concerned


GET /v1/list/pods

Get the list of pods for all namespace


GET /v1/list/pods/:namespace

Get the list of pods of a namespace

:namespace : the namespace concerned


GET /v1/list/pipelines

Get the list of pipelines for all namespace


GET /v1/list/pipelines/:namespace

Get the list of pipelines of a namespace

:namespace : the namespace concerned


GET /v2/task/list/templates

Get the list of template_filenames of task templates


GET /v2/pipeline/list/templates

Get the list of template_filenames of pipeline templates


Delete

GET /v1/delete/job/:namespace/:job

Delete a job in a namespace

:namespace : the namespace concerned :job : the job’s name

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/delete/cronjob/:namespace/:cronjob

Delete a cronJob in a namespace

:namespace : the namespace concerned :cronjob : the cronJob’s name

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/delete/deployment/:namespace/:deployment

Delete a deployment in a namespace

:namespace : the namespace concerned :deployment : the name of the deployment

This route also removes the deployment from the database

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"


GET /v1/delete/service/:namespace/:service

Delete a service and its deployment in a namespace

:namespace : the namespace concerned :service : the name of the service

This route also removes the service from the database

[Protected route]

To use this route, you must pass your identity through your authtoken cookie or an Identity header. You have two options :

  • Pass your JWT token in a cookie named authtoken. This JWT token is generated automatically when you log in to the platform and is stored in cookies under the name authtoken.

  • Pass an "Identity" header in the request. Example : "Identity":"example@gmail.com"