Import a portable entity
const url = 'https://example.com/api/v1/pcd/import';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"databaseId":1,"layer":"user","entityType":"delay_profile","migration":{"format":"json","version":1,"source":"example"},"data":{"name":"example","rename":true,"standardEpisodeFormat":"example","dailyEpisodeFormat":"example","animeEpisodeFormat":"example","seriesFolderFormat":"example","seasonFolderFormat":"example","replaceIllegalCharacters":true,"colonReplacementFormat":"example","customColonReplacementFormat":"example","multiEpisodeStyle":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/pcd/import \ --header 'Content-Type: application/json' \ --data '{ "databaseId": 1, "layer": "user", "entityType": "delay_profile", "migration": { "format": "json", "version": 1, "source": "example" }, "data": { "name": "example", "rename": true, "standardEpisodeFormat": "example", "dailyEpisodeFormat": "example", "animeEpisodeFormat": "example", "seriesFolderFormat": "example", "seasonFolderFormat": "example", "replaceIllegalCharacters": true, "colonReplacementFormat": "example", "customColonReplacementFormat": "example", "multiEpisodeStyle": "example" } }'Deserializes a portable entity into PCD operations, creating the entity in the target database and layer.
The request body matches the export response format (entityType + data),
plus databaseId and layer to specify the target.
Optional migration metadata (format, version, source) can be provided
for hybrid JSON/YAML ingestion flows.
Name uniqueness is validated — importing an entity with a name that already exists will return a 400 error.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The PCD database ID to import into
The operation layer to write to
Portable PCD entity identifiers used by import/export endpoints.
Lidarr media-management entities are first-class portable contract members:
lidarr_naminglidarr_media_settingslidarr_quality_definitions
Runtime validation is deterministic and fail-fast for Lidarr payloads:
payloads are rejected when required fields are missing, when unsupported
fields are present, or when cross-family fields are mixed into the payload
(for example Radarr naming fields with lidarr_naming).
Clients must emit lidarr_* entity types for Lidarr entities.
Optional migration metadata for hybrid imports. If provided, this field must
include all keys from PortableMigrationMetadata.
object
Migration payload format marker (json for JSON payloads, yaml for YAML
in future hybrid ingestion flows).
Migration schema contract version for hybrid payloads.
Migration source marker (example: pcd-export, pcd-file, pcd-importer).
object
object
object
Condition data (shape varies by condition type)
object
object
object
Ordered quality item (quality or group)
object
object
Arr target for this score mapping. lidarr is a first-class value
so quality profile custom-format scores can be scoped to a specific Arr
app family. all applies the score to every supported family.
Non-regression contract: existing radarr, sonarr, and all
enum semantics are unchanged; lidarr is an explicit additional arr
target value and does not introduce fallback alias behavior.
object
Portable naming payload for Sonarr entities.
object
Portable naming payload for lidarr_naming.
The wire shape matches PortableSonarrNaming (shared column structure).
Field semantics are Lidarr-native (artist/album/track tokens).
object
Shared media-management settings payload shape used across Arr families.
object
Portable payload for lidarr_media_settings.
The shape matches PortableMediaSettings.
object
Shared quality-definition payload shape used across Arr families.
object
Quality definition entry with min/max/preferred sizes
object
object
object
object
object
Portable payload for lidarr_quality_definitions.
The shape matches PortableQualityDefinitions.
object
Quality definition entry with min/max/preferred sizes
object
Responses
Section titled “Responses”Entity created successfully
object
Examplegenerated
{ "success": true}Validation error (missing fields, duplicate name, invalid data)
object
Examplegenerated
{ "error": "example"}Cannot write to base layer
object
Examplegenerated
{ "error": "example"}Database cache not available
object
Examplegenerated
{ "error": "example"}