Set an image's visibility
PUT
/media/v1/projects/{projectId}/images/{imageId}/visibilityUpdates an image's visibility (public, unlisted, or private). Requires project access.
Authorization
Bearer Authorization<token>
In: header
Path Parameters
projectId*string
Project ID
imageId*string
Image ID
Request Body
requiredapplication/json{
"$ref": "#/components/schemas/internal_media.updateVisibilityBody",
"$ref-value": {
"properties": {
"visibility": {
"enum": [
"public",
"unlisted",
"private"
],
"type": "string"
}
},
"required": [
"visibility"
],
"type": "object"
}
}Response Body
200application/json
OK
type: unknown
{
"$ref": "#/components/schemas/imagesv1.GetImageResponse",
"$ref-value": {
"properties": {
"attached_to_video": {
"type": "boolean"
},
"file": {
"$ref": "#/components/schemas/imagesv1.ImageFile",
"$ref-value": {
"properties": {
"format": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"project_id": {
"type": "string"
},
"size": {
"type": "integer"
},
"status": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"height": {
"type": "integer"
},
"id": {
"type": "string"
},
"thumbhash": {
"type": "string"
},
"visibility": {
"$ref": "#/components/schemas/imagesv1.Visibility",
"$ref-value": {
"enum": [
0,
1,
2,
3
],
"type": "integer",
"x-enum-varnames": [
"Visibility_VISIBILITY_UNSPECIFIED",
"Visibility_VISIBILITY_PUBLIC",
"Visibility_VISIBILITY_UNLISTED",
"Visibility_VISIBILITY_PRIVATE"
]
}
},
"width": {
"type": "integer"
}
},
"type": "object"
}
}curl -X PUT "https://api.rixl.com/media/v1/projects/string/images/string/visibility" \
-H "Content-Type: application/json" \
-d '{
"visibility": "public"
}'OK
application/json
{
"$ref": "#/components/schemas/imagesv1.GetImageResponse",
"$ref-value": {
"properties": {
"attached_to_video": {
"type": "boolean"
},
"file": {
"$ref": "#/components/schemas/imagesv1.ImageFile",
"$ref-value": {
"properties": {
"format": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"project_id": {
"type": "string"
},
"size": {
"type": "integer"
},
"status": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"height": {
"type": "integer"
},
"id": {
"type": "string"
},
"thumbhash": {
"type": "string"
},
"visibility": {
"$ref": "#/components/schemas/imagesv1.Visibility",
"$ref-value": {
"enum": [
0,
1,
2,
3
],
"type": "integer",
"x-enum-varnames": [
"Visibility_VISIBILITY_UNSPECIFIED",
"Visibility_VISIBILITY_PUBLIC",
"Visibility_VISIBILITY_UNLISTED",
"Visibility_VISIBILITY_PRIVATE"
]
}
},
"width": {
"type": "integer"
}
},
"type": "object"
}
}