所有するモデルの日本語名・英語名・説明文・タグを直す(title・作者・使用許諾・ファイル・系譜は変更不可)
PATCH
/api/v1/models/{id}
const url = 'https://spritestack.dev/api/v1/models/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"titleJa":"example","titleEn":"example","description":"example","tags":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://spritestack.dev/api/v1/models/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "titleJa": "example", "titleEn": "example", "description": "example", "tags": [ "example" ] }'TitleJa・titleEn に空文字か null を送ると、その名前を消す。2 つとも無くなる直しは 400(title_required)。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
titleJa
日本語名。前後の空白は除く。空なら名前なし。
string | null
titleEn
英語名。前後の空白は除く。空なら名前なし。
string | null
description
string
tags
Array<string>
Example generated
{ "titleJa": "example", "titleEn": "example", "description": "example", "tags": [ "example" ]}Responses
Section titled “Responses”更新後のモデルの詳細
Media typeapplication/json
object
Example generated
{}入力の形が不正
Media typeapplication/json
object
Example generated
{}認証が必要(鍵が無い・正しくない・取り消された)
Media typeapplication/json
object
Example generated
{}所有者ではない、または運営者に止められた会員
Media typeapplication/json
object
Example generated
{}公開モデルが見つからない
Media typeapplication/json
object
Example generated
{}