{"items":[{"type":"link","label":"Upload API","link":"/ch/upload-api","routeSlug":"/ch/upload-api","content":{"contentType":"overview","meta":{"name":"Upload API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"index.json","url":"/_bundle/ch/upload-api/@v2.0/index.json?download"},{"kind":"download","label":"index.yaml","url":"/_bundle/ch/upload-api/@v2.0/index.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"closed source","url":"https://www.sitecore.com"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Upload API (v2.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the Upload API to upload files to Content Hub. Uploads are completed in three steps:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Generate an upload URL that returns metadata about the upload session. Provide the following information:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Configuration"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" settings to use for the upload - an entity that hosts a predefined configuration, which specifies supported file extensions, the permitted file size, the default asset lifecycle for asset creation, and so on."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Purpose"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" of the newly uploaded file - create a new asset, use the uploaded file as a new master file for an existing asset, or use the file as an alternate file for an existing asset."},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Upload the file to the generated upload URL."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Complete the upload by providing the metadata about the session that was generated in step 1."},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For more information about the Upload API, see the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/developers/cloud-dev/upload.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"developer documentation"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" where you'll find examples and details on how to upload large files. To find out more about processing job prioritization, see the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/users/content-hub/prioritization.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"media processing documentation"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"admonition","inline":true,"attributes":{"type":"warning","name":"Important"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Upload API is not intended for the bulk upload of assets. High volumes of parallel uploads can impact performance. Review "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/users/content-hub/performance.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Performance best practices"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to ensure optimal performance of Content Hub."},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"admonition","inline":true,"attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Security is applied at the upload configuration level. This means that the user upload permissions depend on the upload configuration entities that users have access to."},"children":[]}]}]}]}]}],"sectionId":"/ch/upload-api"}],"sectionId":"/ch/upload-api"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/authentication"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To use the Upload API, you need:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The URL of your Content Hub server. You can get this from your Content Hub Administrator. Enter this URL in the "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"{{server}}"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" variable by hovering your mouse over the variable in the "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Try it"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" pane and then clicking "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Edit"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An access token and the client ID. Both are sent with every request. You can create a token through the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Content Hub interface"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or by "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"requesting one using the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}],"sectionId":"/ch/upload-api/section/authentication"}]}]}},{"type":"link","label":"Authentication","link":"/ch/upload-api/section/authentication","routeSlug":"/ch/upload-api/section/authentication","content":null},{"type":"group","label":"Upload","link":"/ch/upload-api/upload","routeSlug":"/ch/upload-api/upload","items":[{"label":"Generate an upload URL","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ch/upload-api/upload/createuploadurl","routeSlug":"/ch/upload-api/upload/createuploadurl","metadata":{"seo":{"title":"Generate an upload URL","description":"Generates a URL that can be used to upload a file based on the upload configuration provided. For security reasons, the URL is only valid for a limited time. When uploading a file, you must provide the configuration and action to be performed with the upload. When you upload a file, it can:  - Create a new asset.  - Create a new version of an existing asset.  - Be an alternate file for an existing asset. Uploads require an upload configuration that defines supported file extensions, the content repository to which the file is to be uploaded, and so on. Security checks validate that the user has permission to perform uploads. The upload URL is returned in the response location header."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"CreateUploadUrl","name":"Generate an upload URL","isWebhook":false,"pointer":"/paths/~1api~1v2.0~1upload/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Generate an upload URL","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Generates a URL that can be used to upload a file based on the upload configuration provided. For security reasons, the URL is only valid for a limited time. When uploading a file, you must provide the configuration and action to be performed with the upload. "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When you upload a file, it can:"},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"  - Create a new asset."},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"  - Create a new version of an existing asset."},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"  - Be an alternate file for an existing asset."},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Uploads require an upload configuration that defines supported file extensions, the content repository to which the file is to be uploaded, and so on. Security checks validate that the user has permission to perform uploads. The upload URL is returned in the response "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"location"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":[],"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}},"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json-patch+json","application/json","text/json","application/*+json"],"mediaTypeSchemas":{"application/json-patch+json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"application/json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"text/json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"application/*+json":{"schemaId":"components/schemas/FileUploadUrlRequest"}},"schemaId":"components/schemas/FileUploadUrlRequest","pointer":"/paths/~1api~1v2.0~1upload/post/requestBody","description":"The context for the upload."}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v2.0/upload","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}},"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json-patch+json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"application/json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"text/json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"application/*+json":{"schemaId":"components/schemas/FileUploadUrlRequest"}},"responseCodes":["201","400","401","403","404","500"],"pointer":"/api/v2.0/upload","href":"upload/createuploadurl","openApiOperationId":"CreateUploadUrl","summary":"Generate an upload URL"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"schemaId":"components/schemas/FileUploadUrlRequest","mediaTypes":["application/json-patch+json","application/json","text/json","application/*+json"],"mediaTypeSchemas":{"application/json-patch+json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"application/json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"text/json":{"schemaId":"components/schemas/FileUploadUrlRequest"},"application/*+json":{"schemaId":"components/schemas/FileUploadUrlRequest"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"The upload URl has been created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/FileUploadUrlResource"}},"schemaId":"components/schemas/FileUploadUrlResource"},{"code":"400","description":"Request not valid","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"401","description":"Unauthorized request"},{"code":"403","description":"User not allowed to perform an upload using the given context","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"404","description":"Upload configuration not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"500","description":"An internal server error occurred"}],"pointer":"/paths/~1api~1v2.0~1upload/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/FileUploadUrlResource","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/FileUploadUrlResource"}}},{"code":"400","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"401"},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"404","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/upload/createuploadurl"}],"panels":[]}]},"httpPath":"/api/v2.0/upload"},{"label":"Upload a file","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ch/upload-api/upload/processupload","routeSlug":"/ch/upload-api/upload/processupload","metadata":{"seo":{"title":"Upload a file","description":"Uploads a file in chunks or as a whole. The URL is generated by the upload URL endpoint. When uploading in chunks, the current chunk number starts at 0 and the total number of chunks must be provided as a query string parameter. Multiple chunks can be uploaded in parallel. To notify that the last chunk has been uploaded and no more are expected, a final request needs to be made with only the parameter of the chunk."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"ProcessUpload","name":"Upload a file","isWebhook":false,"pointer":"/paths/~1api~1v2.0~1upload~1process/post","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Upload a file","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Uploads a file in chunks or as a whole. The URL is generated by the upload URL endpoint. When uploading in chunks, the current chunk number starts at 0 and the total number of chunks must be provided as a query string parameter. Multiple chunks can be uploaded in parallel. To notify that the last chunk has been uploaded and no more are expected, a final request needs to be made with only the parameter of the chunk."},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":[],"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}},"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"key","in":"query","schemaId":"schema_1411","description":"The file identifier.","required":true},{"name":"name","in":"query","schemaId":"schema_1411","description":"The file name.","required":true},{"name":"expires","in":"query","schemaId":"schema_1412","description":"The expiration date of the request after which the upload URL becomes invalid.","required":true},{"name":"chunk","in":"query","schemaId":"schema_1413","description":"When uploading in chunks, the current chunk number."},{"name":"chunks","in":"query","schemaId":"schema_1413","description":"When uploading in chunks, the total number of chunks."}],"pointer":"/paths/~1api~1v2.0~1upload~1process/post/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v2.0/upload/process","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"parameters":{"path":[],"query":[{"name":"key","in":"query","required":true,"schemaId":"schema_1411"},{"name":"name","in":"query","required":true,"schemaId":"schema_1411"},{"name":"expires","in":"query","required":true,"schemaId":"schema_1412"},{"name":"chunk","in":"query","schemaId":"schema_1413"},{"name":"chunks","in":"query","schemaId":"schema_1413"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}},"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","403","500"],"pointer":"/api/v2.0/upload/process","href":"upload/processupload","openApiOperationId":"ProcessUpload","summary":"Upload a file"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"File successfully uploaded","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/FileUploadResult"}},"schemaId":"components/schemas/FileUploadResult"},{"code":"400","description":"Request not valid","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"403","description":"Request has expired or user is not authorized","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"500","description":"An internal server error occurred"}],"pointer":"/paths/~1api~1v2.0~1upload~1process/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/FileUploadResult","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/FileUploadResult"}}},{"code":"400","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/upload/processupload"}],"panels":[]}]},"httpPath":"/api/v2.0/upload/process"},{"label":"Finalize the upload process for a file","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ch/upload-api/upload/finalizeupload","routeSlug":"/ch/upload-api/upload/finalizeupload","metadata":{"seo":{"title":"Finalize the upload process for a file","description":"Finalizes the upload of a file after all chunks have been uploaded. Requires the metadata returned during the creation of the upload URL that identifies the current upload session. When finalizing the upload process, the action configured during the creation of the upload URL is performed."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"FinalizeUpload","name":"Finalize the upload process for a file","isWebhook":false,"pointer":"/paths/~1api~1v2.0~1upload~1finalize/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Finalize the upload process for a file","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Finalizes the upload of a file after all chunks have been uploaded. Requires the metadata returned during the creation of the upload URL that identifies the current upload session. When finalizing the upload process, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"action"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" configured during the creation of the upload URL is performed."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":[],"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}},"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json-patch+json","application/json","text/json","application/*+json"],"mediaTypeSchemas":{"application/json-patch+json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"application/json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"text/json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"application/*+json":{"schemaId":"components/schemas/FinalizeUploadRequest"}},"schemaId":"components/schemas/FinalizeUploadRequest","pointer":"/paths/~1api~1v2.0~1upload~1finalize/post/requestBody","description":"The context of the upload returned when creating the upload URL."}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/v2.0/upload/finalize","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}},"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json-patch+json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"application/json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"text/json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"application/*+json":{"schemaId":"components/schemas/FinalizeUploadRequest"}},"responseCodes":["200","400","401","403","404","500"],"pointer":"/api/v2.0/upload/finalize","href":"upload/finalizeupload","openApiOperationId":"FinalizeUpload","summary":"Finalize the upload process for a file"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"schemaId":"components/schemas/FinalizeUploadRequest","mediaTypes":["application/json-patch+json","application/json","text/json","application/*+json"],"mediaTypeSchemas":{"application/json-patch+json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"application/json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"text/json":{"schemaId":"components/schemas/FinalizeUploadRequest"},"application/*+json":{"schemaId":"components/schemas/FinalizeUploadRequest"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Upload finalized successfully"},{"code":"400","description":"Request not valid","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"401","description":"Unauthorized request"},{"code":"403","description":"Upload has expired or user not authorized","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"404","description":"Upload job not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"500","description":"An internal server error occurred"}],"pointer":"/paths/~1api~1v2.0~1upload~1finalize/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200"},{"code":"400","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"401"},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"404","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"500"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/upload/finalizeupload"}],"panels":[]}]},"httpPath":"/api/v2.0/upload/finalize"}],"content":{"contentType":"group","meta":{"name":"Upload"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Upload","showPageActions":true},{"nodeType":"markdoc","content":"The Upload endpoint is used to manage file uploads."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/v2.0/upload","summary":"Generate an upload URL","prefix":{"name":"post","color":"post"},"badges":[],"link":"/upload/createuploadurl","deprecated":false},{"title":"/api/v2.0/upload/process","summary":"Upload a file","prefix":{"name":"post","color":"post"},"badges":[],"link":"/upload/processupload","deprecated":false},{"title":"/api/v2.0/upload/finalize","summary":"Finalize the upload process for a file","prefix":{"name":"post","color":"post"},"badges":[],"link":"/upload/finalizeupload","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/FileUploadUrlRequest":{"id":"components/schemas/FileUploadUrlRequest","kind":"json-schema","title":"FileUploadUrlRequest","data":{"type":"object","properties":{"file_name":{"type":"string","description":"The name of the file to be uploaded.","nullable":true},"file_size":{"type":"integer","description":"The size of the file to be uploaded.","format":"int64"},"upload_configuration":{"$ref":"#/components/schemas/UploadConfigurationInfo"},"action":{"$ref":"#/components/schemas/UploadActionInfo"}},"additionalProperties":false,"description":"Information about the context of the upload when requesting an upload URL."}},"components/schemas/FileUploadUrlResource":{"id":"components/schemas/FileUploadUrlResource","kind":"json-schema","title":"FileUploadUrlResource","data":{"type":"object","properties":{"upload_identifier":{"type":"string","description":"The identifier for the upload session. This is used later to complete the upload process, after the file has been uploaded.","nullable":true},"storage_identifier":{"type":"string","description":"The identifier of the upload storage. This is used later to complete the upload process after the file has been uploaded.","nullable":true},"file_identifier":{"type":"string","description":"This is used later to complete the upload process after the file has been uploaded.","nullable":true}},"additionalProperties":false,"description":"Once an upload URL has been requested, the upload process is started. This information is required to finalize the process."}},"components/schemas/FileUploadResult":{"id":"components/schemas/FileUploadResult","kind":"json-schema","title":"FileUploadResult","data":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","nullable":true}},"additionalProperties":false}},"components/schemas/FinalizeUploadRequest":{"id":"components/schemas/FinalizeUploadRequest","kind":"json-schema","title":"FinalizeUploadRequest","data":{"type":"object","properties":{"upload_identifier":{"type":"string","description":"The identifier of the upload session returned during the request for the upload URL.","nullable":true},"storage_identifier":{"type":"string","description":"The identifier of the upload storage returned during the request for the upload URL.","nullable":true},"file_identifier":{"type":"string","description":"The file identifier returned during the request for the upload URL.","nullable":true}},"additionalProperties":false,"description":"Request to finalize an upload process."}},"components/schemas/ProblemDetails":{"id":"components/schemas/ProblemDetails","kind":"json-schema","title":"ProblemDetails","data":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}},"components/schemas/UploadActionInfo":{"id":"components/schemas/UploadActionInfo","kind":"json-schema","title":"UploadActionInfo","data":{"type":"object","properties":{"name":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The name of the action ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NewAsset"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NewMainFile"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NewAlternativeFile"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")"},"children":[]}]}]}],"nullable":true},"parameters":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The parameters necessary for some actions. The action "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NewMainFile"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NewAlternativeFile"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" requires the ID of the asset to which the file will be uploaded, such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{\"AssetId\": 32052}"},"children":[]}]}]}],"nullable":true,"type":"object"}},"additionalProperties":false}},"components/schemas/UploadConfigurationInfo":{"id":"components/schemas/UploadConfigurationInfo","kind":"json-schema","title":"UploadConfigurationInfo","data":{"type":"object","properties":{"name":{"type":"string","description":"The name of the upload configuration to use","nullable":true},"parameters":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Specifies additional parameters required by certain upload configurations. For example, you can configure an upload to automatically link the asset to another entity upon creation, such as associating an asset with a product. In this case, you must provide the relation name and the target entity ID as parameters (for example: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{ \"PCMProductToAsset\": 123 }"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). To enable this behavior, update the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"M.UploadConfiguration"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and modify the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ConfigurationSettings.entityConfiguration.relation"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property. See "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/developers/cloud-dev/update-the-configuration-settings.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Update the configuration settings"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for more information."},"children":[]}]}]}],"nullable":true,"type":"object"}},"additionalProperties":false,"description":"Information about the upload configuration."}},"schema_1411":{"kind":"json-schema","data":{"type":"string"},"id":"schema_1411"},"schema_1412":{"kind":"json-schema","data":{"type":"string","format":"date-time"},"id":"schema_1412"},"schema_1413":{"kind":"json-schema","data":{"type":"integer","format":"int32"},"id":"schema_1413"}},"exampleStore":{},"securitySchemeStore":{"OAuth2":{"id":"OAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}},"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}},"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"specType":"openapi"},"options":{"hideInfoMetadata":true,"sanitize":true,"sortRequiredPropsFirst":true,"corsProxyUrl":"https://cors.redoc.ly","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/ch/upload-api/@v2.0/index.json?download"},{"url":"/_bundle/ch/upload-api/@v2.0/index.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Upload API","description":"Use the Upload API to upload files to Content Hub. Uploads are completed in three steps:\n\n 1. Generate an upload URL that returns metadata about the upload session. Provide the following information:\n      - <b>Configuration</b> settings to use for the upload - an entity that hosts a predefined configuration, which specifies supported file extensions, the permitted file size, the default asset lifecycle for asset creation, and so on.\n\n      - <b>Purpose</b> of the newly uploaded file - create a new asset, use the uploaded file as a new master file for an existing asset, or use the file as an alternate file for an existing asset.\n\n 2. Upload the file to the generated upload URL.\n\n 3. Complete the upload by providing the metadata about the session that was generated in step 1.\n\n For more information about the Upload API, see the [developer documentation](https://doc.sitecore.com/ch/en/developers/cloud-dev/upload.html) where you'll find examples and details on how to upload large files. To find out more about processing job prioritization, see the [media processing documentation](https://doc.sitecore.com/ch/en/users/content-hub/prioritization.html).\n\n{% admonition type=\"warning\" name=\"Important\" %}The Upload API is not intended for the bulk upload of assets. High volumes of parallel uploads can impact performance. Review [Performance best practices](https://doc.sitecore.com/ch/en/users/content-hub/performance.html) to ensure optimal performance of Content Hub.{% /admonition %}\n{% admonition type=\"info\" name=\"Note\" %}Security is applied at the upload configuration level. This means that the user upload permissions depend on the upload configuration entities that users have access to.{% /admonition %}\n## Authentication\nTo use the Upload API, you need:\n- The URL of your Content Hub server. You can get this from your Content Hub Administrator. Enter this URL in the <b>{{server}}</b> variable by hovering your mouse over the variable in the <b>Try it</b> pane and then clicking <b>Edit</b>.\n- An access token and the client ID. Both are sent with every request. You can create a token through the [Content Hub interface](https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html) or by [requesting one using the API itself](https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows).\n","product":"Content Hub"}},"baseSlug":"/ch/upload-api","routesMapping":{}}