Development/Seeding: Difference between revisions
(start fleshing out how to seed different forms) |
(→Other pages (Add Artist, Add Label, Add Standalone Recording, etc.): start documenting query params) |
||
Line 12: | Line 12: | ||
* [https://musicbrainz.org/recording/create Add Standalone Recording] |
* [https://musicbrainz.org/recording/create Add Standalone Recording] |
||
* [https://musicbrainz.org/work/create Add Work] |
* [https://musicbrainz.org/work/create Add Work] |
||
In almost all cases, a form input can be seeded by passing a parameter corresponding to input's <code>name</code> attribute. For example, the [[https:create|Add Artist]] page's "Name" field is defined in the page source as <code><input ... name="edit-artist.name" ...></code>, and a URL like https://musicbrainz.org/artist/create?edit-artist.name=My+Name will initialize the field to the text "My Name". |
Revision as of 11:24, 15 July 2023
Forms for creating new MusicBrainz entities can be “seeded” with values supplied via POST-ed multipart/form-data
body parameters (for the Add Release page) or URL query parameters (for most other pages). Third-party tools that use seeding to make it easier to import data into MusicBrainz are listed at External Resources.
Add Release
Development/Release Editor Seeding documents seeding new releases via POST requests.
Other pages (Add Artist, Add Label, Add Standalone Recording, etc.)
Non-release forms are seeded via URL query parameters sent via GET requests. The following pages support seeding:
In almost all cases, a form input can be seeded by passing a parameter corresponding to input's name
attribute. For example, the Add Artist page's "Name" field is defined in the page source as <input ... name="edit-artist.name" ...>
, and a URL like https://musicbrainz.org/artist/create?edit-artist.name=My+Name will initialize the field to the text "My Name".