Group blank in single-app JSON exports

When exporting a single-app JSON (not a folder export), the Group tag under “process_version_sets” is blank.

I’m trying to automatically create links to Tulip apps by analyzing the JSON file, and it works fine with folder-level JSON exports because the process version set has a group tag.

For example, an app has a direct link of:
https://beta-tech.tulip.co/groups/ABCDEF/processes/XXXXX/versions/XXXX/steps/XXXX

and I can get all of the ABCDEF, XXXXX info from a full folder JSON export to create the link. However, single-file JSON exports don’t contain ABCDEF anywhere.

Can this be added to the JSON export for single-app exports?

Thank you.

Although it can be dangerous, I am a big fan of digging into the JSON of apps and doing weird and interesting things with the object, so don’t take this as me trying to change your approach.

But I am curious what you are creating the link for. It sounds like you want to access the editor of any given application.

Did you know that you can access any app (process version set) by going to your-tulip-instance.tulip.co/pvs/YOURPVSID?

I use this all of the time. The only actual id you need is the one after “processes”.

/groups/oWaeR5X3rT7XqpmpR/processes/9YM56uWuFnuwNnGf6/versions/CXP4F7Jtu4pKz6Ttf/steps/qj5DEpg24xjiWX8S8

You can also get an exhaustive list of all of these IDs and the groups from the API

image

Did you know this? and if it doesn’t solve what your need is could you explain a little more what you are trying to do? I’m very curiuos

Thanks Mark,

I appreciate the additional link method. Unfortunately this doesn’t quite get me there. I’m looking to create a link to an exact step, not just to the process page.

Do you know of a link similar to /pvs/xxxx which links to a step instead of just the process version set?

https://beta-tech.tulip.co/**[STEPS?]**/qj5DEpg24xjiWX8S8

If not, is there another method to create a link to an exact step from a JSON record? I can do it in cases where the JSON contains more than one app with Python, but it seems like a bug that a single-app JSON wouldn’t have the groups field filled out.

The code that works when the group is filled out in the JSON, if it helps:

step_link = f"https://my-instance.tulip.co/groups/{pvs_group}/processes/{pvs_details.get('_id')}/versions/{parent_process}/steps/{parent_step_id}"

Where pvs_details is based on a process_version_set map I’m linking from a known process version set.

process_version_set_map = {
    pvs["tags"]["dev"]["process"]: {
        "name": pvs.get("name", "Unknown Version Set"),
        "_id": pvs.get("_id", "Unknown ID"),
        "group": pvs.get("group", "Unknown Group")
    }
    for pvs in data.get("process_version_sets", [])
    if pvs.get("tags", {}).get("dev", {}).get("process")
}

Thanks again,
Drew

Interesting. Well… I don’t know of any method like /pvs/xxxxxxx/step/yyyyy and I doubt it exists but someone from product could correct me.

It seems like you have the ability to export apps and extract the app.json. I’ve done this many times and if my memory serves me correctly… with the current import/export version (there’s a version 2 coming out sometime soon)… you can export app groups and get all of the information you want from there.

I’d nest all of my apps in one giant parent group and export the whole dang thing. It’ll take a minute, but once its done you can parse the json and extract all of the links you want, groups, steps and all. The issue you mentioned makes sense… when you export one app only it seems like its indifferent to its grouping.

By the way, someone at Tulip made an API that runs our Library functionality which allows for the automated export of applications. You could potentially automate this entire workflow but its definitely not something that customers use and its a special thing built for internal workflows. Have you joined the developer program? I can see this sort of activity happening there but I will warn you that its not a supported part of the product at the moment. I’m just trying to help you with whatever information I have in case it brings you closer to your goals.

Thank you. My use case requires the ability to generate a step-specific link from a single-app JSON, so doing a whole export isn’t going to do what I need. I have multiple python scripts, but one of them searches for duplicate step names in an app. It then provides a link to the duplicate steps so fixes can be made rapidly by our app-makers. When running the script on a single-app JSON, links cannot be generated. I have other use cases which require a step-specific link of a single-app JSON as well.

Hopefully somebody at Tulip can simply add the “group” tag into single exports unless there’s a functional reason why it isn’t in there. I can’t see any reason why it shouldn’t exist in the export. Do you?

As for automated export of apps, that would be a very useful functionality for sure. I’ll take a look at the developer program.

Thank you

Hi @akbeta ,

Is the user running the python scripts to get app editor links a different person from your app builders? Can you elaborate on the other use cases you mention where you need these links?

We currently do not include the group tag in a single app export because it unrelated to how our import/export functionality works. We are working on an updated version of the import/export functionality where the json object will be structured differently, and it looks like that will contain the group tag within a single app export.

Alternatively, we are looking into removing the group id within the app editor URLs which would hopefully be a different approach to solve your issue.

Cheers,
Sara

1 Like