Add Pipelines
POST
{{url}}/api/portal/external/worker/{workerId}/add-pipeline
Path Parameters
- workerIdstringrequired
Body Parameters
- bodyPipelineConfig[]required
- pipelineIdstring
Responses
200
curl
curl --request POST \
--url {{url}}/api/portal/external/worker/{workerId}/add-pipeline \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '[
{}
]'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify([
{}
]);
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/api/portal/external/worker/{workerId}/add-pipeline", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("{{url}}/api/portal/external/worker/{workerId}/add-pipeline")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump([
{}
])
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/api/portal/external/worker/{workerId}/add-pipeline"
payload = json.dumps([
{}
])
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
This API is used to assign and match the pipelines that have been added to the system to kubernetes workers.