Back to Karakeep

Upload a new asset

docs/versioned_docs/version-v0.29.0/api/upload-a-new-asset.api.mdx

0.31.01.4 KB
Original Source

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading";

<Heading as={"h1"} className={"openapi__heading"} children={"Upload a new asset"}

</Heading>

<MethodEndpoint method={"post"} path={"/assets"} context={"endpoint"}

</MethodEndpoint>

Upload a new asset

<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}

</Heading>

<ParamsDetails parameters={undefined}

</ParamsDetails>

<RequestSchema title={"Body"} body={{"description":"The data to create the asset with.","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"title":"File to be uploaded"}},"required":["file"]}}}}}

</RequestSchema>

<StatusCodes id={undefined} label={undefined} responses={{"200":{"description":"Details about the created asset","content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"fileName":{"type":"string"}},"required":["assetId","contentType","size","fileName"],"title":"Asset"}}}}}}

</StatusCodes>