Answer the question
In order to leave comments, you need to log in
How to pass parameter to CURL with space or other specials characters?
There is a simple get request to the Bitrix API:
curl -H "Content-Type: application/json" -d '['$taskid',{"TAGS":"'$oldtag',камера_1_off"}]' https://????.bitrix24.ru/rest/66/??????/task.item.update
#!/bin/bash
taskid="$2"
#Парсит существующие теги
oldtag="$(curl -H "Content-Type: application/json" -d '[17267]' https://?????????.bitrix24.ru/rest/66/????????/task.item.getdata | jq -c '.result.TAGS' | sed s/\"//g | sed s/\\[//g | sed s/\]//g)"
#oldtag=тег, новый тег, еще тег
#записывает старый тег+новый
curl -H "Content-Type: application/json" -d '['$taskid',{"TAGS":"'$oldtag',камера_1_off"}]' https://????.bitrix24.ru/rest/66/??????/task.item.update
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question