It might have been possible for an API endpoint to exist when Team Analytics where a thing. Now that they’ve been deprecated/discontinued, I’m not sure. Maybe poking between pages with DevTools logging for XHR requests might find that endpoint.
Each container already has PROJECT_REMIX_CHAIN as an environment variable which is a list of project ID’s that make up a project’s ancestry. It’s not the same thing but it’s similar. It’s also not shown in the .env file but it is accessiable from the terminal.
I don’t think you understand how storage of such information works, what you see in the app status is data collected from another program (containerd or docker I think), storage of remix count would be stored in a database, information is collected from the database and served in an API, the client (end-user, us) will fetch that information and display such information in the proper area.
I thought so too, but no count is being made when the Remix button is clicked. The only requests that are being made is the link to the new project. Once you’re in a new project, another request is made to the project that was remixed to fetch its contents. Maybe for analytics, they might be using a third-party plugin instead of the Glitch API?
Yeah, I guess it would be pretty hard to use API and third-party tools/software may be pretty inneficient. I still think it would be nice for some form of remix counter.
There might be more endpoints to the API which might have all these info. Only if they documented the API and officialy released it, now that the ToS contains information regarding the API. Also, some info might need authentication and some might requests like POST and PATCH.
@random when a project is remixed, two POST requests are made: https://api.glitch.com/projects/PROJECT_ID/edited https://api.glitch.com/v1/projects/by/domain/PROJECT_NAME
There is a env variable for project ids of remixes (if It is useful for at all for you) it is called PROJECT_REMIX_CHAIN which has something like this for example [b952187a-ea2e-4a1c-9055-f455c996a381,0a59806f-5c0d-468e-84bb-fa5b54ecf500,929980a8-32fc-4ae7-a66f-dddb3ae4912c] and is something currently being documentated over here https://github.com/youngchief-btw/Glitch-Docs
@youngchief, I don’t think that solves the issue because as @FlantasticDan said, it only shows the projects which make up the current project. And in all cases (except GitHub import projects, I’m not sure) it is one of the three projects or sometimes all three of them, named static-start, hello-express and hello-webpage. See Idea: Store number of remixes in .env and Idea: Store number of remixes in .env
I believe you could do something like this, but I haven’t tried it before. I’m just assuming this is how the remix chain works:
let remixes = process.env.PROJECT_REMIX_CHAIN
remixes = remixes.replace("[", "").replace("]", "")
let remixarray = remixes.split(",")
let number = remixarray.length