Getting project by id
Hi,
I was wondering if it were possible to get a specific project by its id.
If you stored the id somewhere else in a local variable and wanted to use something like server.projects.get() where you pass in the ID, is that possible?
I've resolved my issue by doing something else, but this would be a nice enhancement if possible
Thanks for the feedback on this. I checked the REST API docs and it looks like project ID is not one of the ways you can filter. I'll mark this as server-side enhancement for the future.
I know this is old, but this has bugged me many times and I found that there's is actually a very simple way to get a project's data with its ID. So, posting for anyone encountering this in the future.
So the core issue is: for many content types, there is a convenient endpoint to get information about a specific item. E.g. for workbooks, there is "Get Workbook", where you provide the LUID of the workbook:
GET /api/<api-version>/sites/<site-id>/workbooks/<workbook-id>
The same exists for all kinds of content, including views and data sources, but not for projects. Why?! That is unclear. The suggested workaround (like above) is to fetch all projects until you find the right one, but this can be expensive on large environments.
Now here's what I found: it is perfectly possible to update a project without providing any new information, i.e. no name change, no description change, nothing. The "Update Project" endpoint does work like any other content's update endpoint, and... returns the updated/original information we would have expected from "Get Project", had it existed.
So... we can make this request:
PUT /api/<api-version>/sites/<site-id>/projects/<project-id>
With only this body:
"project": {
"id": <project-id>
}
And... tada! We get the original project information back, because we did not change anything:
{"project": {"owner": {"id": "b8e68e16-e185-45c6-83c3-2306dd1ddbbc"}, "id": "fd0f8563-e01f-4fee-8940-cb2de3a2e987", "name": "Project Name", "description": "Hell yeah!", "createdAt": "2025-10-20T12:35:03Z", "updatedAt": "2025-10-20T12:35:03Z", "contentPermissions": "ManagedByOwner"}}
And here's what's also great: I thought this would modify the updatedAt timestamp, but it doesn't! The project is effectively returned as-is without any impact (that I am aware of).
Hope this helps!