We have updated our Terms of Service, Code of Conduct, and Addendum.

How do I programmatically (via API) export then merge a Pack from one worker group to another?

Tony Reinke - Cribl
Tony Reinke - Cribl Posts: 134 admin

I want to use the API to export a Pack from one worker group and merge it to another. How do I do that?

Tagged:

Best Answer

  • Brendan Dalpe
    Brendan Dalpe Posts: 201 mod
    Answer ✓

    Weve incorporated this example into our docs with a more detailed explanation of steps required… Managing Packs via API:

    To export a pack via API and install it in a separate worker group:

    GET /api/v1/m/<workergroupname>/packs/<packname>/export?mode=merge

    Which returns an octet-stream attachment which you will need to download as a file. Then PUT the pack to the new worker group.

    PUT /api/v1/m/<newworkergroup>/packs?filename=packname.crbl&size=12345

    You will need to upload the contents of the pack as the payload to this request. This returns a JSON response:

    {"source":"packname.random.crbl"}

    Use this source to tell LogStream to install the pack.

    POST /api/v1/m/<newworkergroup>/packs 
    
    {"source":"packname.random.crbl"}
    

Answers

  • Brendan Dalpe
    Brendan Dalpe Posts: 201 mod
    Answer ✓

    Weve incorporated this example into our docs with a more detailed explanation of steps required… Managing Packs via API:

    To export a pack via API and install it in a separate worker group:

    GET /api/v1/m/<workergroupname>/packs/<packname>/export?mode=merge

    Which returns an octet-stream attachment which you will need to download as a file. Then PUT the pack to the new worker group.

    PUT /api/v1/m/<newworkergroup>/packs?filename=packname.crbl&size=12345

    You will need to upload the contents of the pack as the payload to this request. This returns a JSON response:

    {"source":"packname.random.crbl"}

    Use this source to tell LogStream to install the pack.

    POST /api/v1/m/<newworkergroup>/packs 
    
    {"source":"packname.random.crbl"}