Development/Seeding/Artist Editor

From MusicBrainz Wiki
Jump to navigationJump to search

This page documents a list of URL query parameters you include in a GET request to the artist editor to “seed” it. All values are optional unless otherwise stated.

To create a new artist: http://musicbrainz.org/artist/create

To set a checkbox input, pass the value 1.

Artist data

  • Type (edit-artist.type_id) corresponds to the artist_type table's id column.
  • Gender (edit-artist.gender_id) corresponds to the gender table's id column.
  • Area (edit-artist.area.name) contains text used to fill the field for searching.
  • IPI codes (edit-artist.ipi_codes.0, .1, etc.) can be set using multiple parameters.
  • ISNI codes (edit-artist.isni_codes.0, .1, etc.) can be set using multiple parameters.
  • Began (edit-artist.period.begin_date.year, .month, .day) accepts integer values for each parameter.
  • Ended (edit-artist.period.end_date.year, .month, .day) is similar to Began.
  • Relationships are seeded using multiple parameters prefixed with rels.0. rather than the usual edit-artist. prefix. Multiple relationships can be seeded using prefixes like rels.1..
    • rels.0.target contains the target entity's MBID or name (for searching).
    • rels.0.type contains a value from the link_type table's id column.
    • rels.0.source_credit and rels.0.target_credit contain alternate “credited as” strings for the source and target entities.
    • rels.0.begin_date and rels.0.end_date accept dates as YYYY-MM-DD, YYYY-MM, or YYYY.
    • rels.0.ended is 1 if the relationship has ended.
    • rels.0.backward is 1 if the relationship's direction should be reversed.
    • Relationship attributes are seeded using parameters prefixed with rels.0.attributes.0.:
      • rels.0.attributes.0.type contains a value from the link_attribute_type table's id column.
      • rels.0.attributes.0.credited_as contains a string for the “credited as” field, e.g. describing how an instrument was credited.
      • rels.0.attributes.0.text_value holds additional text associated with some attribute types, e.g. the actual number when setting the “number” attribute on a recording-series part-of relationship.
  • External Links (edit-artist.url.0.text, .0.link_type_id, etc.) are seeded using paired URL strings and values from the link_type table's id column.