Hello, I would like to know if there is any possibility to display on content/ symbol list page specified metadata like: creation date, created by, update date, updated by or custom fields?
I think there is no API currently to fetch author of the specific content…
Hello Mateusz,
In our Content API, we do have some data like that.
Here and example of the API URL:
https://cdn.builder.io/api/v3/content/my-model-name?apiKey=YOUR_API_KEY
I have tested with curl and jq commands:
curl -s https://cdn.builder.io/api/v3/content/page?apiKey=YOUR_API_KEY | jq '.[]' |less
Some of the details you were asking are in the following command:
curl -s "https://cdn.builder.io/api/v3/content/page?apiKey=9c6ec17c63e24f45a45bb05759af1624" | jq '.results[] | {id, name, createdDate, modelId, kind, createdBy, lastUpdated, lastUpdatedBy, firstPublished, meta}'
I hope the information above is helpful.
Thank you,
Dear Fernando,
Thank you for your response. I noticed that in this API, fields such as “createdBy” and “lastUpdatedBy” seem to display user IDs rather than actual names.
Is there a way to retrieve the author’s name instead?
Looking forward to your reply.
Best regards,
Mateusz
Hello Mateusz,
In that case, you will need to use the Admin API.
As you can see in the documentation above, in this case, instead of using the Public API key, you will need a Private API key.
Here is an example of how to use it:
curl -s “https://cdn.builder.io/api/v2/admin/”
-H “Authorization: Bearer bpk-xxxxxxxx”
-H “Content-Type: application/json”
-d ‘{“query”: “{ users { id, name, email, role, lastActive } }”}’
I hope the information above is helpful.
Let us know if you have any questions.
Thank you,
Fernando Duran
Builder Support | Builder.io
Stay up-to-date & subscribe to our Status Page:
1 Like
Amazing! This is exactly what I was looking for, thanks!