Skip to content

Clarify role_ids and published_states in API docs#12236

Merged
pdurbin merged 4 commits intoIQSS:developfrom
Parthsuii:patch-4
Mar 30, 2026
Merged

Clarify role_ids and published_states in API docs#12236
pdurbin merged 4 commits intoIQSS:developfrom
Parthsuii:patch-4

Conversation

@Parthsuii
Copy link
Copy Markdown
Contributor

@Parthsuii Parthsuii commented Mar 20, 2026

What this PR does / why we need it:
Updates the MyData API documentation to clarify that role_ids and published_states parameters can be used multiple times in a single query (e.g., &role_ids=1&role_ids=6).

Which issue(s) this PR closes:

Special notes for your reviewer:
I updated the curl example and added "Multiple parameters can be used" to the relevant parameter descriptions to match the existing documentation style for fq.

Suggestions on how to test this:
View the updated MyData section in the API Guide to ensure the examples and parameter notes are clear and correctly formatted.

Does this PR introduce a user interface change?:
No.

Is there a release notes update needed for this change?:
Yes: Clarified documentation for filtering by multiple roles and states in MyData API.

Additional documentation:
N/A

Preview at https://dataverse-guide--12236.org.readthedocs.build/en/12236/api/native-api.html#mydata

Updated API documentation to clarify usage of role_ids and published_states parameters.
@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Mar 20, 2026
@scolapasta scolapasta moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Mar 24, 2026
@scolapasta scolapasta added the Size: 0.5 A percentage of a sprint. 0.35 hours label Mar 24, 2026
curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/mydata/retrieve?role_ids=$ROLE_IDS&dvobject_types=$DVOBJECT_TYPES&published_states=$PUBLISHED_STATES&per_page=$PER_PAGE"

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/mydata/retrieve?role_ids=6&role_ids=34&dvobject_types=Dataset&published_states=Published&published_states=Draft&published_states=In+Review&selected_page=1"
Parameters:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indent

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 0bb6296 I fixed the indent.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Parthsuii heads up that I also made some other changes while I was in there. Happy to discuss! 😅

@stevenwinship stevenwinship moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Mar 26, 2026
@cmbz cmbz added the FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) label Mar 27, 2026
@pdurbin pdurbin self-assigned this Mar 27, 2026
export ROLE_IDS=6
export ROLE_ID1=6
export ROLE_ID2=8
export DVOBJECT_TYPES=Dataset
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like dvobject_types can be repeated as well...

        @QueryParam("dvobject_types") List<DvObject.DType> dvobject_types,
        @QueryParam("published_states") List<String> published_states,
        @QueryParam("metadata_fields") List<String> metadataFields,
        @QueryParam("selected_page") Integer selectedPage, 
        @QueryParam("mydata_search_term") String searchTerm,             
        @QueryParam("role_ids") List<Long> roleIds, 

... so let's add that to the example.

``dvobject_types`` Type of object, several possible values among: ``DataFile`` , ``Dataset`` & ``Dataverse`` .

``published_states`` State of the object, several possible values among:``Published`` , ``Unpublished`` , ``Draft`` , ``Deaccessioned`` & ``In+Review`` .
``published_states`` State of the object. Multiple "published_states" parameters can be used. Several possible values among: ``Published`` , ``Unpublished`` , ``Draft`` , ``Deaccessioned`` & ``In+Review``
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might look better as a bulleted list like we've done with the list of role ids above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pdurbin sure let me check

Parthsuii and others added 2 commits March 28, 2026 20:38
Updated environment variable names and improved formatting for clarity in the curl example.
Copy link
Copy Markdown
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, merging. Thanks, @Parthsuii!

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Mar 30, 2026
@pdurbin pdurbin merged commit cd01fd5 into IQSS:develop Mar 30, 2026
7 of 8 checks passed
@github-project-automation github-project-automation bot moved this from Ready for QA ⏩ to Merged 🚀 in IQSS Dataverse Project Mar 30, 2026
@pdurbin pdurbin added this to the 6.11 milestone Mar 30, 2026
jp-tosca pushed a commit that referenced this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) Size: 0.5 A percentage of a sprint. 0.35 hours

Projects

Status: Merged 🚀

Development

Successfully merging this pull request may close these issues.

Add more information to the documentation about how api/mydata/retrieve is called

5 participants