dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Extend the MetadataBlocks API endpoints for the Create Dataset Feature

Open GPortas opened this issue 1 year ago • 12 comments

What this PR does / why we need it:

New optional query parameters added to api/metadatablocks and api/dataverses/{id}/metadatablocks endpoints:

  • returnDatasetFieldTypes: Whether or not to return the dataset field types present in each metadata block. If not set, the default value is false.
  • onlyDisplayedOnCreate: Whether or not to return only the metadata blocks that are displayed on dataset creation. If returnDatasetFieldTypes is true, only the dataset field types shown on dataset creation will be returned within each metadata block. If not set, the default value is false.

Added new displayOnCreate field to the MetadataBlock and DatasetFieldType payloads.

Which issue(s) this PR closes:

  • Closes #10389

Special notes for your reviewer:

None

Suggestions on how to test this:

Call the modified endpoints using the new optional query params. You can test the endpoints by sending one of the new parameters, both, or none.

Metadatablocks:

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/metadatablocks?returnDatasetFieldTypes=true&onlyDisplayedOnCreate=true"

Dataverse Metadatablocks:

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/dataverses/$ID/metadatablocks?returnDatasetFieldTypes=true&onlyDisplayedOnCreate=true"

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No.

Is there a release notes update needed for this change?:

Yes, attached.

Additional documentation:

None

GPortas avatar Mar 25 '24 11:03 GPortas

Coverage Status

coverage: 20.737% (-0.001%) from 20.738% when pulling a2258cd9815e438606222779aa342288d9ebfd29 on 10389-metadata-field-display-on-create-api-ext into d14e18a4769e0b1dfe1b7d37afbb380d8db0f461 on develop.

coveralls avatar Mar 25 '24 11:03 coveralls

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 25 '24 11:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 27 '24 10:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 27 '24 13:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 27 '24 13:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 27 '24 15:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 28 '24 15:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 29 '24 08:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 29 '24 10:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 29 '24 10:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 29 '24 19:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Mar 29 '24 19:03 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Apr 05 '24 09:04 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Apr 05 '24 10:04 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Apr 10 '24 14:04 github-actions[bot]

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:10389-metadata-field-display-on-create-api-ext
ghcr.io/gdcc/configbaker:10389-metadata-field-display-on-create-api-ext

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] avatar Apr 10 '24 14:04 github-actions[bot]