Skip to content

Bulk-upsert platforms (admin)

POST
/api/admin/seed/platforms
curl --request POST \
--url http://localhost:3000/api/admin/seed/platforms \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{ "items": [ { "name": "example", "slug": "example", "manufacturerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "manufacturerSlug": "example", "description": "example", "nosFamily": "example", "typicalDevices": "example", "keyFeatures": "example", "commonUseCases": "example", "commercialStatus": "active", "automationApis": [ "example" ], "popular": true } ] }'

Upsert platforms keyed on slug. Resolves manufacturerId from manufacturerSlug when present.

Media type application/json
object
items
required
Array<object>
object
name
required
string
slug
string
manufacturerId
string format: uuid
manufacturerSlug
string
description
string
nullable
nosFamily
string
nullable
typicalDevices
string
nullable
keyFeatures
string
nullable
commonUseCases
string
nullable
commercialStatus
string
nullable
Allowed values: active maintenance eol deprecated
automationApis
Array<string>
popular
boolean

Seed report

Media type application/json
object
data
object
created
required
integer
updated
required
integer
skipped
required
integer
errors
required
Array<object>
object
index
required
integer
key
string
nullable
message
required
string
Example generated
{
"data": {
"created": 1,
"updated": 1,
"skipped": 1,
"errors": [
{
"index": 1,
"key": "example",
"message": "example"
}
]
}
}

Body must include items array

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Not authenticated

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Admin access required

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}