Update an existing preview
Update a preview with the given documentation file. The preview will stay active for 30 minutes after the last update.
Path parameters
-
UUID of an existing preview you wish to update.
Body
The preview object
-
Serialized definition of the version. This should be an OpenAPI 2.x, 3.x or AsyncAPI 2.x file serialized as a string, in YAML or JSON.
-
references array[object]
Import external references used by
definition
. It's usually resources not accessible by Bump servers, like local files or internal URLs.
PUT /previews/{preview_id}
curl \
-X PUT https://bump.sh/api/v1/previews/{preview_id} \
-H "Content-Type: application/json" \
-d '{"definition":"{asyncapi: \"2.0\", \"info\": { \"title: … }}\n","references":[{"location":"https://example.com/api/models/pet.yml","content":"string"}]}'
Request example
{
"definition": "{asyncapi: \"2.0\", \"info\": { \"title: … }}\n",
"references": [
{
"location": "https://example.com/api/models/pet.yml",
"content": "string"
}
]
}
Request examples
{
"definition": "{asyncapi: \"2.0\", \"info\": { \"title: … }}\n",
"references": [
{
"location": "https://example.com/api/models/pet.yml",
"content": "string"
}
]
}
Response examples (200)
{
"id": "3ef8f52f-9056-4113-840e-2f7183b90e06",
"expires_at": "2010-04-14 17:05:00 +0100",
"public_url": "https://bump.sh/preview/3ef8f52f-9056-4113-840e-2f7183b90e06"
}
Response examples (200)
{
"id": "3ef8f52f-9056-4113-840e-2f7183b90e06",
"expires_at": "2010-04-14T17:05:00+01:00",
"public_url": "https://bump.sh/preview/3ef8f52f-9056-4113-840e-2f7183b90e06"
}
Response examples (422)
{
"message": "Invalid definition file",
"errors": {
"raw_definition": [
"The property '#/paths//docs/{:id}/validations/post' contains additional properties [\"yolo\"] outside of the schema when none are allowed"
]
}
}
Response examples (422)
{
"message": "Invalid definition file",
"errors": {
"raw_definition": [
"The property '#/paths//docs/{:id}/validations/post' contains additional properties [\"yolo\"] outside of the schema when none are allowed"
]
}
}