How to distinguish between a project and a team URL

Hello,

We are trying to create a project integration, but we are unable to differentiate between a project URL and a team URL.

Both the URLs have the same pattern, and only if we call one API, we would know if its a project URL or a team URL.

Is there a way we could definitely resolve a project URL 100% of the time, or is there an endpoint that can give us the resource_type so we call the correct API, rather than having to fail one endpoint and then fallback to the next one.

Hi,

Do you need to query for the project or team name? Otherwise a failing endpoint gives you a 100% accurate result and you can know if this is a team or a project.

I am thinking hard but can’t find a way to query for both in a single call… @Phil_Seeman any idea?

yes, so we don’t know which API to call when either of the URL is given, and we would like to avoid two API calls.

You can use probability. If 90% of the time it will be a project gid, then call the project endpoint first :sweat_smile:

2 Likes

That was going to be my suggestion as well. There’s no one API endpoint that can return either the project or team information for a gid if you don’t know which object type it refers to.

1 Like

Thanks, @Phil.