Edit repeat group via API

I am using the api to edit some values with

URL = 'https://[kpi-url]/api/v2/assets/{asset_uid}/data/bulk/'
TOKEN = 'value_token_xxxxx'
PARAMS = {
    'format': 'json',
    'content-type': 'application/json'
}
HEADERS = {
    'Authorization': f'Token {TOKEN}'
}

{
"payload": 
{
    "submission_ids": [ xxxxxxx], 
    "data": {
        "group_1/name_1":"Value 1",
        "group_1/name_2":"Value_2"
        }
}
}

it’s works fine for this type of questions, but it’s possible when the questions are a “repeat group”.
I try using an array but doesn’t works, something like

"data": {
        "group_question":[
                      {
                       "group_question/name_1":"Value 1",
                       "group_question/name_2":"Value_2"
                      },
                      {
                       "group_question/name_1":"Value 3",
                       "group_question/name_2":"Value_4"
                      }
                      ]        
        }

Thanks

Hi @hoffmat, unfortunately editing repeat groups through the API is not yet supported :+1:

1 Like

@Josh
I noticed the following in the v2 API documentation:

I’ve tried it and I could edit the first repeat group, but not the subsequent ones.
I mean from the example given I can edit Value 1 and Value_2 but not Value 3 or Value_4.

"data": {
        "group_question":[
                      {
                       "group_question/name_1":"Value 1",
                       "group_question/name_2":"Value_2"
                      },
                      {
                       "group_question/name_1":"Value 3",
                       "group_question/name_2":"Value_4"
                      }
                      ]        
        }

How can I edit those values?

Hi @ks_1, as I noted in my previous response, bulk edits for repeat groups is not currently supported :+1:

1 Like