-
Notifications
You must be signed in to change notification settings - Fork 5
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
copy source image docs #65
Conversation
source/_references/sourceimages.md
Outdated
you can do a `COPY` request to `/sourceimages/{org}/{hash}` and send the `Destination` header with the destination organization. | ||
If you send a `Overwrite: F` header with it, it won't copy it, if it already exists at the destination. | ||
Your API user needs to have read permissions on the source organization and write permissions on the destination organization. | ||
The [memberships endpoint](memberships.html) has methods to give an API user access to more organizations, |
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.
organizations,
-> organizations.
source/_references/sourceimages.md
Outdated
Returns a 404 http code, if the source image was not found. | ||
|
||
```language-bash | ||
curl -X POST -H 'Destination: mycompany-stage' 'https://api.rokka.io/sourceimages/mycompany/c412d8d6e4b9b7b058320b06972ac0ec72cfe6e5' |
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.
Shouldn't be curl -X COPY -H ...
?
source/_references/sourceimages.md
Outdated
Returns a 201 http code, if the image was newly created at the destination. | ||
Returns a 204 http code, if the image was overwritten at the destination. | ||
Returns a 412 http code, if `Overwrite: F` was sent and the destination exists already. | ||
Returns a 404 http code, if the source image was not found. |
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.
Do we return a 400
if the destination organization does not exist?
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.
Do we return a 403
if the user has no write permissions on Destination
org?
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.
Both added and the rest is adjusted too, thank
source/_references/sourceimages.md
Outdated
## Restore a source image | ||
|
||
To restore a deleted image, do a `POST`request to `/sourceimages/{org}/{hash}/restore`. | ||
To restore a deleted image, do a `POST` request to `/sourceimages/{org}/{hash}/restore`. |
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.
There are two
(spaces) before __do
d51aac7
to
eb1377c
Compare
Backend is deployed