Development/Seeding: Difference between revisions
m (okay, now my opinion of the editor has switched from "confusing" to "broken") |
m (→Add Artist: s/release/artist/) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Forms for creating new MusicBrainz entities can be “seeded” with values supplied via POST-ed <code>multipart/form-data</code> body parameters (for the [ |
Forms for creating new MusicBrainz entities can be “seeded” with values supplied via POST-ed <code>multipart/form-data</code> body parameters (for the [[mb:release/add|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 Artist == |
|||
You can seed a new artist with a GET request. See [[/Artist_Editor|the artist editor seeding documentation]] for details. |
|||
== Add Release == |
|||
You can seed a new release with a POST request. See [[/Release Editor|the release editor seeding documentation]] for details. |
|||
== Other pages (Add Label, Add Standalone Recording, etc.) == |
|||
Most non-release forms can be seeded via URL query parameters sent via GET requests. |
|||
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 [[mb:artist/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”. |
|||
To set a checkbox input, pass the value <code>1</code>. |
|||
The following pages support seeding: |
|||
=== [[mb:event/create|Add Event]] === |
|||
=== [[mb:label/create|Add Label]] === |
|||
=== [[mb:recording/create|Add Standalone Recording]] === |
|||
=== [[mb:work/create|Add Work]] === |
Latest revision as of 15:41, 22 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 Artist
You can seed a new artist with a GET request. See the artist editor seeding documentation for details.
Add Release
You can seed a new release with a POST request. See the release editor seeding documentation for details.
Other pages (Add Label, Add Standalone Recording, etc.)
Most non-release forms can be seeded via URL query parameters sent via GET requests.
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”.
To set a checkbox input, pass the value 1
.
The following pages support seeding: