-
Notifications
You must be signed in to change notification settings - Fork 70
new: Documented POST /images/upload endpoint #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3471,6 +3471,68 @@ paths: | |||||
--description "A longer description \ | ||||||
of the image" \ | ||||||
--disk_id 123 | ||||||
/images/upload: | ||||||
x-linode-cli-command: images | ||||||
post: | ||||||
servers: | ||||||
- url: https://api.linode.com/v4beta | ||||||
tags: | ||||||
- Images | ||||||
summary: Upload Image | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
just for consistency |
||||||
description: > | ||||||
Initiates a Machine Image upload. | ||||||
|
||||||
This endpoint creates a new private Image object and returns it, along | ||||||
with the URL the image data should be uploaded to. Images must be uploaded | ||||||
within 24 hours of creation or the upload will be cancelled. Image uploads | ||||||
should be made as an HTTP PUT request to the returned URL, with a | ||||||
`Content-type: application/octet-stream` header included in the request. | ||||||
Uploaded image data should be in gzip format. A maximum file size of | ||||||
5GB is supported for upload at this time. | ||||||
|
||||||
*NOTE* This endpoint is currently in beta, and is only available to users | ||||||
who are a part of the beta. You may see a 404 error returned from this | ||||||
endpoint if you are not currently enrolled - open a support ticket to | ||||||
sign up to join the beta when space becomes available. | ||||||
x-linode-cli-action: upload | ||||||
security: | ||||||
- personalAccessToken: [] | ||||||
- oauth: | ||||||
- images:read_write | ||||||
requestBody: | ||||||
description: The data | ||||||
content: | ||||||
application/json: | ||||||
schema: | ||||||
type: object | ||||||
properties: | ||||||
region: | ||||||
type: string | ||||||
description: The region to upload to. | ||||||
example: eu-central | ||||||
label: | ||||||
type: string | ||||||
description: Label for the new image. | ||||||
example: my-image-label | ||||||
description: | ||||||
type: string | ||||||
description: Description for the image. | ||||||
example: This is an example image in the docs. | ||||||
responses: | ||||||
'200': | ||||||
description: The new image and upload url. | ||||||
content: | ||||||
application/json: | ||||||
schema: | ||||||
type: object | ||||||
properties: | ||||||
upload_url: | ||||||
type: string | ||||||
description: The URL to upload the image to. | ||||||
image: | ||||||
$ref: '#/components/schemas/ImagePrivate' | ||||||
default: | ||||||
$ref: '#/components/responses/ErrorResponse' | ||||||
/images/{imageId}: | ||||||
x-linode-cli-command: images | ||||||
parameters: | ||||||
|
@@ -17270,6 +17332,20 @@ components: | |||||
x-linode-cli-color: | ||||||
None: black | ||||||
default_: white | ||||||
status: | ||||||
x-linode-cli-display: 7 | ||||||
type: string | ||||||
enum: | ||||||
- creating | ||||||
- pending_upload | ||||||
- available | ||||||
description: | | ||||||
The current status of this Image. Only images in an "available" status | ||||||
can be deployed. Images in a "creating" status are being created from | ||||||
a Linode Disk, and will become "available" shortly. Images in a | ||||||
"pending_upload" status are waiting for data to be uploaded for the | ||||||
image, and will become "available" after the upload is complete and | ||||||
processing occurs. | ||||||
ImagePublic: | ||||||
type: object | ||||||
description: Public Image object | ||||||
|
@@ -17373,6 +17449,16 @@ components: | |||||
x-linode-cli-color: | ||||||
None: black | ||||||
default_: white | ||||||
status: | ||||||
x-linode-cli-display: 7 | ||||||
type: string | ||||||
enum: | ||||||
- creating | ||||||
- pending_upload | ||||||
- available | ||||||
description: | | ||||||
The current status of this Image. Only images in an "available" status | ||||||
can be deployed. | ||||||
LinodeConfigInterface: | ||||||
type: object | ||||||
description: > | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍