Hi
I have noticed, that if you fetch the activity from a pull request with a field parameter enabling the "inline" contents, such as follows:
...you get a response with pull request comments having a "src_rev" and "dest_rev" field. I find these fields very helpful, but I can't find them in the open API specification. Also the pull request activity seems to have no type (scheme) associated with it.
Is this intended? Is it a deprecated or removed feature or will it remain in the API?
Regards
Hello @Daniel Schlatter ,
and welcome to the Community!
The reason you don't see a specific schema associated with the activity endpoint is that it can return multiple types of events within its array, such as comments, approvals, updates, and requests for changes. Each of these event types has its own specifications, which can be found in their respective endpoints in the Bitbucket API documentation, like the List comments on a Pull Request or the List Tasks in a Pull Request.
Regarding the use of the fields parameter to expand the results, this is because most objects that are embedded within other objects (such as how an inline property is an embedded object within a comment) appear in a "condensed" form, which omits many fields or does not load them by default.
Embedded related objects are generally limited in their fields to prevent these object graphs from becoming too deep and noisy, often excluding their own nested objects to strike a balance between performance and utility. This does not mean the field is being deprecated, just that for optimal performance it's omitted from the default response from the API.
In such cases, the fields parameter allows you to pull in additional fields, providing more detailed information when needed, just like you achieved when adding the field parameter of "fields=%2Bvalues.comment.inline.*".
I hope that helps! Let us know in case you have any questions.
Thank you, @Daniel Schlatter !
Patrik S
Hi Patrik
thank you for the detailed answer, yes that helps :)
Regards
Daniel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.