Start an upload by POSTing the filename and size to /samples/init_upload. To actually perform the upload it is then necessary to transmit the file to the provided upload_url, with any additional_fields as needed. This second step varies depending on the upload_type. Currently only a standard upload type is available.
Performing the actual upload – “standard” upload type
The standard upload involves POSTing a sample up to 20GB in size to a provided HTTPS URL. The Content-Type should be multipart/form-data and the additional_fields should be included in the POST body.The workflow using httpie or Python requests is:
# Start the uploadhttp --auth $ONE_CODEX_API_KEY: POST \https://app.onecodex.com/api/v1/samples/init_upload \filename=HiSeq_accuracy.fa size:=1189333# Returns a 200 response with the following JSON body:# {# "additional_fields": {# "AWSAccessKeyId": "XXXXXXXXXXXXXXXXXXXX",# "acl": "private",# "key": "user_xxxxxxxxxxxxxxxx/file_yyyyyyyyyyyyyyyy/${filename}",# "policy": "CiAgICAgICAgICAgAgICAgICB7ImJ1Y2tldCI6ICJyZWZnZW5vbWljcy11c2VyZGF0YS1kZXYtZW5jcnlwdGVkIiB9LAogICAS1lbmNyeXB0aW9uIjogIkFFUzI1NiJ9LAogICAgICAgICAgICAgICAgWyJzdGFydHMtd2l0aCIsICIka2V5IiwgInVzZXJfNGFkYTU2MTAzZDlhNDhiOC9maWxlXzI4NDU5NTA4NTkyYTQ4MWMvIl0sCiAgICAgICAgICAgICAgICB7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDEifSwKICAgICAgICAgICAgICBdCiAgICAgICAgICAgIH0KICAgICAgICAgICAg",# "signature": "ELADfQLgxXXXXXXXXx/5D99Q9AY=",# "success_action_status": 201,# "x-amz-server-side-encryption": "AES256"# },# "sample_id": "28459508592a481c",# "upload_url": "https://refgenomics-userdata-dev-encrypted.s3.amazonaws.com"# }http -f POST \ https://sample-upload-bucket.s3.amazonaws.com \ AWSAccessKeyId="XXXXXXXXXXXXXXXXXXXX" acl="private" \ key="user_xxxxxxxxxxxxxxxx/file_yyyyyyyyyyyyyyyy/${filename}" \ policy="CiAgICAgICAgICAgAgICAgICB7ImJ1Y2tldCI6ICJyZWZnZW5vbWljcy11c2VyZGF0YS1kZXYtZW5jcnlwdGVkIiB9LAogICAS1lbmNyeXB0aW9uIjogIkFFUzI1NiJ9LAogICAgICAgICAgICAgICAgWyJzdGFydHMtd2l0aCIsICIka2V5IiwgInVzZXJfNGFkYTU2MTAzZDlhNDhiOC9maWxlXzI4NDU5NTA4NTkyYTQ4MWMvIl0sCiAgICAgICAgICAgICAgICB7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDEifSwKICAgICAgICAgICAgICBdCiAgICAgICAgICAgIH0KICAgICAgICAgICAg" \ signature="ELADfQLgxXXXXXXXXx/5D99Q9AY=" success_action_status=201 \ x-amz-server-side-encryption="AES256" \ file@HiSeq_accuracy.fa# Returns a 201 response# Confirm the upload (see below)http --auth $ONE_CODEX_API_KEY: POST \ https://app.onecodex.com/api/v1/samples/confirm_upload \ sample_id="28459508592a481c"
# Start the uploadresp = requests.post('https://app.onecodex.com/api/v1/init_upload', json={'filename': 'HiSeq_accuracy.fa', 'size': os.path.getsize('HiSeq_accuracy.fa')}, auth=(os.getenv('ONE_CODEX_API_KEY'), '') ).json()# Perform the upload (should return a 201)requests.post(resp['upload_url'], data=resp['additional_fields'], files={'file': open('HiSeq_accuracy.fa')})# Finally, confirm the upload (should return a 200)requests.post('https://app.onecodex.com/api/v1/samples/confirm_upload', json={'sample_id': resp['sample_id']}, auth=(os.getenv('ONE_CODEX_API_KEY'), ''))
The filename of the sample to be uploaded. FASTA and FASTQ records, optionally gzipped (and ending in .gz or .gzip) are supported. Filenames should only contain alphanumeric characters, dashes, underscores, and periods.
Object storage location to POST the paired end file to (optional).
⌘I
{"docsConfig":{"theme":"willow","$schema":"https://mintlify.com/docs.json","name":"One Codex Developer Docs","description":"Documentation for the One Codex API and Python SDK. One Codex is a fast, easy-to-use platform for microbiome sequencing and analysis.","colors":{"primary":"#179B9A","light":"#6BC7B7","dark":"#179B9A"},"logo":{"light":"https://mintcdn.com/onecodex/DiToQ9fYtYBO3lRU/images/onecodex-logo-inverse@2x.png?fit=max\u0026auto=format\u0026n=DiToQ9fYtYBO3lRU\u0026q=85\u0026s=5cd285bf3bec7809faf0d8cd8274bb38","dark":"https://mintcdn.com/onecodex/DiToQ9fYtYBO3lRU/images/onecodex-logo@2x.png?fit=max\u0026auto=format\u0026n=DiToQ9fYtYBO3lRU\u0026q=85\u0026s=61398ceaeb352dc656dd2bdfecd053ff"},"favicon":"https://mintcdn.com/onecodex/DiToQ9fYtYBO3lRU/ocx_favicon-64.png?fit=max\u0026auto=format\u0026n=DiToQ9fYtYBO3lRU\u0026q=85\u0026s=697811a0b3a57d419f2e697f4c6e1da3","navbar":{"links":[{"href":"mailto:support@onecodex.com","label":"Support"},{"href":"https://onecodex.github.io/onecodex/","label":"Python SDK"}],"primary":{"type":"button","label":"Platform","href":"https://app.onecodex.com"}},"footer":{"socials":{"x":"https://x.com/onecodex","bluesky":"https://bsky.app/profile/onecodex.bsky.social","github":"https://github.com/onecodex","linkedin":"https://linkedin.com/company/onecodex"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"onecodex","hasAudioNarration":false,"actualSubdomain":"onecodex","customDomains":["developer.onecodex.com"],"gitSource":{"type":"github","owner":"onecodex","repo":"mainline","deployBranch":"master","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ada70f7059de5a640576a22","collectionId":"28a4489c-743b-4516-a9b1-0d7391717952","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ada70f7059de5a640576a22"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ada70f7059de5a640576a22","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Docs","count":103},{"language":"default","tag":"Analyses","count":30},{"language":"default","tag":"Workflows","count":19},{"language":"default","tag":"Documents","count":11},{"language":"default","tag":"Projects","count":11},{"language":"default","tag":"Samples","count":11},{"language":"default","tag":"API Basics","count":8},{"language":"default","tag":"Metadata \u0026 Tags","count":8},{"language":"default","tag":"Webhooks \u0026 Events","count":7},{"language":"default","tag":"Jobs","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/sample-resource-upload-file","slug":"/api-reference/sample-resource-upload-file","pageMetadata":{"title":"Starting an Upload","openapi":"POST /api/v1/samples/init_upload","description":null,"href":"/api-reference/sample-resource-upload-file"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Start an upload by `,_jsx(_components.code,{children:`POST`}),`ing the filename and size to `,_jsx(_components.code,{children:`/samples/init_upload`}),`. To actually perform the upload it is then necessary to transmit the file to the provided `,_jsx(_components.code,{children:`upload_url`}),`, with any `,_jsx(_components.code,{children:`additional_fields`}),` as needed. This second step varies depending on the `,_jsx(_components.code,{children:`upload_type`}),`. Currently only a `,_jsx(_components.code,{children:`standard`}),` upload type is available.`]}),`\n`,_jsx(Heading,{level:`3`,id:`performing-the-actual-upload-–-“standard”-upload-type`,children:`Performing the actual upload – “standard” upload type`}),`\n`,_jsxs(_components.p,{children:[`The standard upload involves POSTing a sample up to 20GB in size to a provided HTTPS URL. The `,_jsx(_components.code,{children:`Content-Type`}),` should be `,_jsx(_components.code,{children:`multipart/form-data`}),` and the `,_jsx(_components.code,{children:`additional_fields`}),` should be included in the `,_jsx(_components.code,{children:`POST`}),` body.`]}),`\n`,_jsxs(_components.p,{children:[`The workflow using `,_jsx(_components.a,{href:`https://httpie.org`,children:`httpie`}),` or Python requests is:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`httpie`,numberOfLines:`35`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`35`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Start the upload`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`http`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $ONE_CODEX_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`https://app.onecodex.com/api/v1/samples/init_upload `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`filename=HiSeq_accuracy.fa `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`size:=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1189333`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Returns a 200 response with the following JSON body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"additional_fields\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"AWSAccessKeyId\": \"XXXXXXXXXXXXXXXXXXXX\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"acl\": \"private\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:'# \"key\": \"user_xxxxxxxxxxxxxxxx/file_yyyyyyyyyyyyyyyy/${filename}\",'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"policy\": \"CiAgICAgICAgICAgAgICAgICB7ImJ1Y2tldCI6ICJyZWZnZW5vbWljcy11c2VyZGF0YS1kZXYtZW5jcnlwdGVkIiB9LAogICAS1lbmNyeXB0aW9uIjogIkFFUzI1NiJ9LAogICAgICAgICAgICAgICAgWyJzdGFydHMtd2l0aCIsICIka2V5IiwgInVzZXJfNGFkYTU2MTAzZDlhNDhiOC9maWxlXzI4NDU5NTA4NTkyYTQ4MWMvIl0sCiAgICAgICAgICAgICAgICB7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDEifSwKICAgICAgICAgICAgICBdCiAgICAgICAgICAgIH0KICAgICAgICAgICAg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"signature\": \"ELADfQLgxXXXXXXXXx/5D99Q9AY=\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"success_action_status\": 201,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"x-amz-server-side-encryption\": \"AES256\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"sample_id\": \"28459508592a481c\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"upload_url\": \"https://refgenomics-userdata-dev-encrypted.s3.amazonaws.com\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`http`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://sample-upload-bucket.s3.amazonaws.com`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` AWSAccessKeyId=\"XXXXXXXXXXXXXXXXXXXX\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` acl=\"private\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' key=\"user_xxxxxxxxxxxxxxxx/file_yyyyyyyyyyyyyyyy/${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filename`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` policy=\"CiAgICAgICAgICAgAgICAgICB7ImJ1Y2tldCI6ICJyZWZnZW5vbWljcy11c2VyZGF0YS1kZXYtZW5jcnlwdGVkIiB9LAogICAS1lbmNyeXB0aW9uIjogIkFFUzI1NiJ9LAogICAgICAgICAgICAgICAgWyJzdGFydHMtd2l0aCIsICIka2V5IiwgInVzZXJfNGFkYTU2MTAzZDlhNDhiOC9maWxlXzI4NDU5NTA4NTkyYTQ4MWMvIl0sCiAgICAgICAgICAgICAgICB7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDEifSwKICAgICAgICAgICAgICBdCiAgICAgICAgICAgIH0KICAgICAgICAgICAg\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` signature=\"ELADfQLgxXXXXXXXXx/5D99Q9AY=\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` success_action_status=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`201`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` x-amz-server-side-encryption=\"AES256\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` file@HiSeq_accuracy.fa`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Returns a 201 response`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Confirm the upload (see below)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`http`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $ONE_CODEX_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://app.onecodex.com/api/v1/samples/confirm_upload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sample_id=\"28459508592a481c\"`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Start the upload`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.onecodex.com/api/v1/init_upload'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'filename'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'HiSeq_accuracy.fa'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'size'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.path.getsize(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'HiSeq_accuracy.fa'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` auth`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ONE_CODEX_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ).json()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Perform the upload (should return a 201)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`requests.post(resp[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'upload_url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'additional_fields'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` files`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'file'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'HiSeq_accuracy.fa'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)})`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Finally, confirm the upload (should return a 200)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`requests.post(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.onecodex.com/api/v1/samples/confirm_upload'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sample_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: resp[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sample_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` auth`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ONE_CODEX_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Starting an Upload","openapi":"POST /api/v1/samples/init_upload","description":null,"href":"/api-reference/sample-resource-upload-file"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Performing the actual upload – “standard” upload type","slug":"performing-the-actual-upload-–-“standard”-upload-type","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/onecodex/38c32b33da45a451/restore-ref.js"],"openApiReferenceData":{"operation":{"operationId":"post_samples_instances_init_upload","requestBody":"367df148-8fe8-46b6-a3fe-348e2166f664","responses":{"200":"ab3c7739-8941-4a40-8752-ae81d955405f"},"summary":"POST samples instances_init_upload","method":"post","type":"path","servers":["9832d926-3c3d-43a8-a73e-07d1076c8b65"],"security":["11453643-25e3-4bd0-b8d6-359f20aa2808"],"path":"/api/v1/samples/init_upload","baseUrlOptions":["https://app.onecodex.com"],"title":"POST samples instances_init_upload","description":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"filename":{"description":"The filename of the sample to be uploaded. FASTA and FASTQ records, optionally gzipped (and ending in .gz or .gzip) are supported. Filenames should only contain alphanumeric characters, dashes, underscores, and periods.","pattern":"^[\\w\\.]+[\\w\\-\\.\\[\\]\\(\\)\\{\\} ]*\\.[\\w\\.]+$","title":"Filename","type":"string","isRequired":true,"uniqueKey":"filename","typeLabel":"string"},"external_sample_id":{"oneOf":[{"type":"string","title":"External Sample Id","description":"An optional external sample ID (see the Metadata resource) to match against pre-uploaded samples. Returns a 400 if no matching sample is found.","uniqueKey":"external_sample_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"External Sample Id","description":"An optional external sample ID (see the Metadata resource) to match against pre-uploaded samples. Returns a 400 if no matching sample is found.","uniqueKey":"external_sample_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"external_sample_id","typeLabel":"string | null"},"interleaved":{"oneOf":[{"type":"boolean","title":"Interleaved","description":"Whether the file is interleaved (true) or not (false).","uniqueKey":"interleaved.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Interleaved","description":"Whether the file is interleaved (true) or not (false).","uniqueKey":"interleaved.oneOf.1","typeLabel":"null"}],"uniqueKey":"interleaved","typeLabel":"boolean | null"},"metadata":{"oneOf":[{"type":"object","title":"InlineMetadata","description":"An optional metadata object to be added to the sample.","properties":{"custom":{"oneOf":[{"type":"object","title":"Custom","description":"Arbitrary metadata is supported as part of a custom object. custom has two constraints: (1) it must have a depth of one (i.e., no nested records); and (2) only strings, numbers, boolean, and null values are supported as values. Example: `{\"lab_tech\": \"Linus Pauling\", \"amplicon_scheme\": \"V3-V4\"}`","additionalProperties":true,"uniqueKey":"metadata.oneOf.0.custom.oneOf.0","typeLabel":"Custom · object"},{"type":"null","title":"Custom","description":"Arbitrary metadata is supported as part of a custom object. custom has two constraints: (1) it must have a depth of one (i.e., no nested records); and (2) only strings, numbers, boolean, and null values are supported as values. Example: `{\"lab_tech\": \"Linus Pauling\", \"amplicon_scheme\": \"V3-V4\"}`","uniqueKey":"metadata.oneOf.0.custom.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.custom","typeLabel":"Custom · object | null"},"date_collected":{"oneOf":[{"type":"string","title":"Date Collected","description":"Timestamp for when the sample was collected.","format":"date-time","uniqueKey":"metadata.oneOf.0.date_collected.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Date Collected","description":"Timestamp for when the sample was collected.","uniqueKey":"metadata.oneOf.0.date_collected.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.date_collected","typeLabel":"string\u003cdate-time> | null"},"date_sequenced":{"oneOf":[{"type":"string","title":"Date Sequenced","description":"Timestamp for when the sample was sequenced.","format":"date-time","uniqueKey":"metadata.oneOf.0.date_sequenced.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Date Sequenced","description":"Timestamp for when the sample was sequenced.","uniqueKey":"metadata.oneOf.0.date_sequenced.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.date_sequenced","typeLabel":"string\u003cdate-time> | null"},"description":{"oneOf":[{"type":"string","title":"Description","uniqueKey":"metadata.oneOf.0.description.oneOf.0","typeLabel":"string"},{"type":"null","title":"Description","uniqueKey":"metadata.oneOf.0.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.description","typeLabel":"string | null"},"external_sample_id":{"oneOf":[{"type":"string","title":"External Sample Id","description":"An arbitrary external sample ID, e.g., an ID in a LIMS. Up to 60 characters.","example":"LIMS-2024-00123","uniqueKey":"metadata.oneOf.0.external_sample_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"External Sample Id","description":"An arbitrary external sample ID, e.g., an ID in a LIMS. Up to 60 characters.","example":"LIMS-2024-00123","uniqueKey":"metadata.oneOf.0.external_sample_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.external_sample_id","typeLabel":"string | null"},"library_type":{"oneOf":[{"type":"string","title":"SequencingLibraryType","description":"An enum with the sample library type.","enum":["WGS","Targeted/16S","Other"],"uniqueKey":"metadata.oneOf.0.library_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"An enum with the sample library type.","uniqueKey":"metadata.oneOf.0.library_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.library_type","typeLabel":"enum\u003cstring> | null"},"location_lat":{"oneOf":[{"type":"number","title":"Location Lat","description":"The latitude `(-90.0-90.0)` of the sample location. By convention, we recommend using this for the location in which the physical specimen was collected.","maximum":90,"minimum":-90,"uniqueKey":"metadata.oneOf.0.location_lat.oneOf.0","typeLabel":"number"},{"type":"null","title":"Location Lat","description":"The latitude `(-90.0-90.0)` of the sample location. By convention, we recommend using this for the location in which the physical specimen was collected.","uniqueKey":"metadata.oneOf.0.location_lat.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.location_lat","typeLabel":"number | null"},"location_lon":{"oneOf":[{"type":"number","title":"Location Lon","description":"The longitude `(-180.0-180.0)` of the sample location.","maximum":180,"minimum":-180,"uniqueKey":"metadata.oneOf.0.location_lon.oneOf.0","typeLabel":"number"},{"type":"null","title":"Location Lon","description":"The longitude `(-180.0-180.0)` of the sample location.","uniqueKey":"metadata.oneOf.0.location_lon.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.location_lon","typeLabel":"number | null"},"location_string":{"oneOf":[{"type":"string","title":"Location String","maxLength":255,"uniqueKey":"metadata.oneOf.0.location_string.oneOf.0","typeLabel":"string"},{"type":"null","title":"Location String","uniqueKey":"metadata.oneOf.0.location_string.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.location_string","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","title":"Name","maxLength":255,"uniqueKey":"metadata.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","uniqueKey":"metadata.oneOf.0.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.name","typeLabel":"string | null"},"platform":{"oneOf":[{"type":"string","title":"SequencingPlatform","description":"An enum with the name of the sequencing platform.","enum":["454 sequencing","454 GS FLX","454 GS FLX Titanium","Illumina","Illumina Genome Analyzer II","Illumina HiSeq","Illumina HiSeq 1500","Illumina HiSeq 2000","Illumina HiSeq 2500","Illumina HiSeq 3000","Illumina HiSeq 4000","Illumina HiSeq X","Illumina iSeq 100","Illumina MiniSeq","Illumina MiSeq","Illumina NextSeq","Illumina NextSeq 500","Illumina NextSeq 550","Illumina NovaSeq","Illumina NovaSeq 5000","Illumina NovaSeq 6000","BGISEQ","BGISEQ 50","Element","Element AVITI","Ion","Ion S5","Ion S5 XL","Ion PGM","Ion Proton","Ion Torrent","Oxford Nanopore","Oxford Nanopore GridION X5","Oxford Nanopore MinION","Oxford Nanopore PromethION","PacBio","PacBio RS II","PacBio Sequel","PacBio Sequel II System","PacBio Revio","PacBio Onso","SOLiD","Solexa Genome Analyzer","Sanger","Other"],"uniqueKey":"metadata.oneOf.0.platform.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"An enum with the name of the sequencing platform.","uniqueKey":"metadata.oneOf.0.platform.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.platform","typeLabel":"enum\u003cstring> | null"},"sample_type":{"oneOf":[{"type":"string","title":"SequencingSampleType","description":"An enum with the sample type.","enum":["Isolate","Metagenomic","Other"],"uniqueKey":"metadata.oneOf.0.sample_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"An enum with the sample type.","uniqueKey":"metadata.oneOf.0.sample_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.sample_type","typeLabel":"enum\u003cstring> | null"},"starred":{"oneOf":[{"type":"boolean","title":"Starred","description":"Whether the sample has been starred by the user within the One Codex web application.","default":false,"uniqueKey":"metadata.oneOf.0.starred.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Starred","description":"Whether the sample has been starred by the user within the One Codex web application.","default":false,"uniqueKey":"metadata.oneOf.0.starred.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.oneOf.0.starred","typeLabel":"boolean | null"}},"uniqueKey":"metadata.oneOf.0","typeLabel":"InlineMetadata · object"},{"type":"null","description":"An optional metadata object to be added to the sample.","uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"InlineMetadata · object | null"},"paired_end_filename":{"oneOf":[{"type":"string","title":"Paired End Filename","description":"Optional filename for paired end uploads.","pattern":"^[\\w\\.]+[\\w\\-\\.\\[\\]\\(\\)\\{\\} ]*\\.[\\w\\.]+$","uniqueKey":"paired_end_filename.oneOf.0","typeLabel":"string"},{"type":"null","title":"Paired End Filename","description":"Optional filename for paired end uploads.","uniqueKey":"paired_end_filename.oneOf.1","typeLabel":"null"}],"uniqueKey":"paired_end_filename","typeLabel":"string | null"},"project":{"oneOf":[{"type":"object","title":"projects","description":"An optional project into which to upload the sample.","properties":{"__DOLLAR_REF__":{"example":"/api/v1/projects/a1b2c3d4e5f67890","format":"uri","pattern":"^/api/v1/projects/[a-f0-9]{16}$","type":"string","uniqueKey":"project.oneOf.0.__DOLLAR_REF__","typeLabel":"string\u003curi>"}},"uniqueKey":"project.oneOf.0","typeLabel":"projects · object"},{"type":"null","title":"Project","description":"An optional project into which to upload the sample.","uniqueKey":"project.oneOf.1","typeLabel":"null"}],"uniqueKey":"project","typeLabel":"projects · object | null"},"sample_id":{"oneOf":[{"type":"string","title":"Sample Id","description":"An optional sample ID to match against pre-uploaded samples. Returns a 400 if no matching sample is found.","uniqueKey":"sample_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Sample Id","description":"An optional sample ID to match against pre-uploaded samples. Returns a 400 if no matching sample is found.","uniqueKey":"sample_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"sample_id","typeLabel":"string | null"},"size":{"oneOf":[{"type":"integer","title":"Size","description":"The size of the file in bytes.","minimum":0,"uniqueKey":"size.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Size","description":"The size of the file in bytes.","uniqueKey":"size.oneOf.1","typeLabel":"null"}],"uniqueKey":"size","typeLabel":"integer | null"},"tags":{"default":[],"description":"An array of tags to be added to the sample.","items":{"properties":{"name":{"description":"The tag label or name. Name must be 30 characters or fewer.","maxLength":30,"title":"Name","type":"string","isRequired":true,"uniqueKey":"tags.items.[INDEX].name","typeLabel":"string"}},"required":["name"],"title":"InlineTag","type":"object","uniqueKey":"tags.items.[INDEX]","typeLabel":"InlineTag · object"},"title":"Tags","type":"array","uniqueKey":"tags","typeLabel":"InlineTag · object[]"},"upload_type":{"const":"standard","default":"standard","description":"The type of upload to initiate. Currently only standard uploads are supported via the init_upload route.","title":"Upload Type","type":"string","uniqueKey":"upload_type","typeLabel":"string"}},"required":["filename"],"title":"SampleInitUploadSchema","type":"object","uniqueKey":"","typeLabel":"SampleInitUploadSchema · object"},"examples":{"Example":{"title":"Example","value":{"filename":"\u003cstring>","external_sample_id":"\u003cstring>","interleaved":true,"metadata":{"custom":{},"date_collected":"2023-11-07T05:31:56Z","date_sequenced":"2023-11-07T05:31:56Z","description":"\u003cstring>","external_sample_id":"LIMS-2024-00123","location_lat":0,"location_lon":0,"location_string":"\u003cstring>","name":"\u003cstring>","starred":false},"paired_end_filename":"\u003cstring>","project":{"__DOLLAR_REF__":"/api/v1/projects/a1b2c3d4e5f67890"},"sample_id":"\u003cstring>","size":1,"tags":[],"upload_type":"standard"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"ab3c7739-8941-4a40-8752-ae81d955405f":{"content":{"application/json":{"schema":{"properties":{"sample_id":{"description":"The sample ID. Use to confirm the upload.","title":"Sample Id","type":"string","isRequired":true,"uniqueKey":"sample_id","typeLabel":"string"},"upload_url":{"description":"Object storage location to POST the file to.","title":"Upload Url","type":"string","isRequired":true,"uniqueKey":"upload_url","typeLabel":"string"},"additional_fields":{"additionalProperties":true,"default":{},"description":"Additional fields to include in the object storage POST request.","title":"Additional Fields","type":"object","uniqueKey":"additional_fields","typeLabel":"Additional Fields · object"},"fallback_options":{"oneOf":[{"type":"object","title":"Fallback Options","description":"Fallback options for the upload. Please contact support for help as needed.","additionalProperties":true,"uniqueKey":"fallback_options.oneOf.0","typeLabel":"Fallback Options · object"},{"type":"null","title":"Fallback Options","description":"Fallback options for the upload. Please contact support for help as needed.","uniqueKey":"fallback_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"fallback_options","typeLabel":"Fallback Options · object | null"},"paired_end_additional_fields":{"oneOf":[{"type":"object","title":"Paired End Additional Fields","description":"Additional fields to include in the object storage POST request for the paired end file (optional).","default":{},"additionalProperties":true,"uniqueKey":"paired_end_additional_fields.oneOf.0","typeLabel":"Paired End Additional Fields · object"},{"type":"null","title":"Paired End Additional Fields","description":"Additional fields to include in the object storage POST request for the paired end file (optional).","default":{},"uniqueKey":"paired_end_additional_fields.oneOf.1","typeLabel":"null"}],"uniqueKey":"paired_end_additional_fields","typeLabel":"Paired End Additional Fields · object | null"},"paired_end_upload_url":{"oneOf":[{"type":"string","title":"Paired End Upload Url","description":"Object storage location to POST the paired end file to (optional).","uniqueKey":"paired_end_upload_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Paired End Upload Url","description":"Object storage location to POST the paired end file to (optional).","uniqueKey":"paired_end_upload_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"paired_end_upload_url","typeLabel":"string | null"}},"required":["sample_id","upload_url"],"title":"SampleInitUploadResponse","type":"object","uniqueKey":"","typeLabel":"SampleInitUploadResponse · object"},"examples":{"Example":{"title":"Example","value":{"sample_id":"\u003cstring>","upload_url":"\u003cstring>","additional_fields":{},"fallback_options":{},"paired_end_additional_fields":{},"paired_end_upload_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"OK","exampleType":"generated"}},"security":{"11453643-25e3-4bd0-b8d6-359f20aa2808":{"apiKeyAuth":{"in":"header","name":"X-API-Key","type":"apiKey","scopes":[]}}},"servers":{"9832d926-3c3d-43a8-a73e-07d1076c8b65":{"url":"https://app.onecodex.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"in":"header","name":"X-API-Key","type":"apiKey","scopes":[]},"schema":{"title":"X-API-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKeyAuth","name":"X-API-Key"}],"title":"apiKeyAuth"}]},"originalFileLocation":"openapi-mintlify.json"},"subdomain":"onecodex","siteName":"One Codex Developer Docs","title":"Starting an Upload - One Codex Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-15T09:07:08.864Z","originalFileLocation":"api-reference/sample-resource-upload-file.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"One Codex Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Starting an Upload - One Codex Developer Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"One Codex Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.onecodex.com/api-reference/sample-resource-upload-file\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://onecodex.mintlify.app/_mintlify/api/og/v2?division=Uploading+Samples\u0026amp;title=Starting+an+Upload\u0026amp;theme=c55a80f222f8860115ec6bfc\u0026amp;signature=2d2063fdd72350f5c6185e6be3f6d1171862de68c6b60738422580601c129f96\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Starting an Upload - One Codex Developer Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://onecodex.mintlify.app/_mintlify/api/og/v2?division=Uploading+Samples\u0026amp;title=Starting+an+Upload\u0026amp;theme=c55a80f222f8860115ec6bfc\u0026amp;signature=2d2063fdd72350f5c6185e6be3f6d1171862de68c6b60738422580601c129f96\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/onecodex/Wn_cD8jjSYN9-4U4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"One Codex Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#179B9A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.onecodex.com/api-reference/sample-resource-upload-file\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/sample-resource-upload-file.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.onecodex.com/#organization\",\"name\":\"One Codex Developer Docs\",\"url\":\"https://developer.onecodex.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/onecodex/DiToQ9fYtYBO3lRU/images/onecodex-logo-inverse@2x.png?fit=max\u0026auto=format\u0026n=DiToQ9fYtYBO3lRU\u0026q=85\u0026s=5cd285bf3bec7809faf0d8cd8274bb38\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.onecodex.com#website\",\"name\":\"One Codex Developer Docs\",\"url\":\"https://developer.onecodex.com\",\"publisher\":{\"@id\":\"https://developer.onecodex.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file#webpage\",\"url\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file\",\"name\":\"Starting an Upload\",\"dateModified\":\"2026-09-15T09:07:08.864Z\",\"isPartOf\":{\"@id\":\"https://developer.onecodex.com#website\"},\"breadcrumb\":{\"@id\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Samples\",\"item\":\"https://developer.onecodex.com/api-reference/sample-resource\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Uploading Samples\",\"item\":\"https://developer.onecodex.com/api-reference/uploading-samples\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Starting an Upload\",\"item\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file#apireference\",\"headline\":\"Starting an Upload\",\"name\":\"Starting an Upload\",\"url\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file\",\"mainEntityOfPage\":{\"@id\":\"https://developer.onecodex.com/api-reference/sample-resource-upload-file#webpage\"},\"dateModified\":\"2026-09-15T09:07:08.864Z\",\"publisher\":{\"@id\":\"https://developer.onecodex.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.onecodex.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"One Codex Developer Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"One Codex Developer Docs","nav":{"global":null,"tabs":[{"tab":"API Docs","groups":[{"group":"API Basics","pages":[{"title":"Getting Started","href":"/api-reference/getting-started"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"API Documentation","href":"/api-reference/api-documentation"},{"title":"CLI \u0026 Client Library (Python)","href":"/api-reference/command-line-interface"},{"title":"Jupyter Notebooks","href":"/api-reference/jupyter-notebooks"},{"title":"Pagination","href":"/api-reference/pagination"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Rate Limits","href":"/api-reference/rate-limits"}]},{"group":"Samples","pages":[{"title":"The Sample Resource","href":"/api-reference/sample-resource"},{"title":"Retrieve All Samples","openapi":"GET /api/v1/samples","href":"/api-reference/sample-resource-instances"},{"title":"Retrieve A Sample","openapi":"GET /api/v1/samples/{id}","href":"/api-reference/sample-resource-get"},{"title":"Retrieve Public Samples","openapi":"GET /api/v1/samples/public","href":"/api-reference/sample-resource-instances-public"},{"group":"Uploading Samples","pages":[{"title":"Uploads Overview","description":null,"href":"/api-reference/uploading-samples"},{"title":"Starting an Upload","openapi":"POST /api/v1/samples/init_upload","href":"/api-reference/sample-resource-upload-file"},{"title":"Confirming an Upload","openapi":"POST /api/v1/samples/confirm_upload","description":null,"href":"/api-reference/sample-resource-confirm-upload"},{"title":"Pre-Uploading Samples","openapi":"POST /api/v1/samples/preupload","href":"/api-reference/sample-resource-preupload"}]},{"title":"Updating Samples","openapi":"Patch /api/v1/samples/{id}","href":"/api-reference/sample-resource-patch"},{"title":"Downloading Sequence Data","openapi":"POST /api/v1/samples/{id}/download_uri","href":"/api-reference/sample-resource-download"},{"title":"Delete A Sample","openapi":"DELETE /api/v1/samples/{id}","href":"/api-reference/sample-resource-delete"}]},{"group":"Projects","pages":[{"title":"The Project Resource","href":"/api-reference/project-resource"},{"title":"Retrieve All Projects","openapi":"GET /api/v1/projects","href":"/api-reference/project-resource-instances"},{"title":"Retrieve Public Projects","openapi":"GET /api/v1/projects/public","href":"/api-reference/project-resource-instances-public"},{"title":"Retrieve A Project","openapi":"GET /api/v1/projects/{id}","href":"/api-reference/project-resource-get"},{"title":"Create A Project","openapi":"POST /api/v1/projects","href":"/api-reference/project-resource-create"},{"title":"Update A Project","openapi":"PATCH /api/v1/projects/{id}","href":"/api-reference/project-resource-patch"},{"title":"Delete A Project","openapi":"DELETE /api/v1/projects/{id}","href":"/api-reference/project-resource-delete"},{"group":"Sharing \u0026 Members","pages":[{"title":"List Project Members","openapi":"GET /api/v1/projects/{id}/members","href":"/api-reference/project-resource-members"},{"title":"Add A User To A Project","openapi":"POST /api/v1/projects/{id}/add_user","href":"/api-reference/project-resource-add-user"},{"title":"Remove A User From A Project","openapi":"POST /api/v1/projects/{id}/remove_user","href":"/api-reference/project-resource-remove-user"},{"title":"Change Project Sharing","openapi":"POST /api/v1/projects/{id}/change_sharing","href":"/api-reference/project-resource-change-sharing"}]}]},{"group":"Metadata \u0026 Tags","pages":[{"title":"The Metadata Resource","href":"/api-reference/metadata-resource"},{"title":"The Tag Resource","href":"/api-reference/tag-resource"},{"title":"Retrieve All Metadata","openapi":"GET /api/v1/metadata","href":"/api-reference/metadata-resource-instances"},{"title":"Retrieve A Metadata Record","openapi":"GET /api/v1/metadata/{id}","href":"/api-reference/metadata-resource-get"},{"title":"Retrieve All Tags","openapi":"GET /api/v1/tags","href":"/api-reference/tag-resource-instances"},{"title":"Retrieve A Tag","openapi":"GET /api/v1/tags/{id}","href":"/api-reference/tag-resource-get"},{"title":"Create A Tag","openapi":"POST /api/v1/tags","href":"/api-reference/tag-resource-create"},{"title":"Updating Metadata","openapi":"PATCH /api/v1/metadata/{id}","href":"/api-reference/metadata-resource-patch"}]},{"group":"Analyses","pages":[{"title":"The Analysis Resource","href":"/api-reference/analysis-resource"},{"title":"Retrieve All Analyses","openapi":"GET /api/v1/analyses","href":"/api-reference/analysis-resource-instances"},{"title":"Retrieve An Analysis","openapi":"GET /api/v1/analyses/{id}","href":"/api-reference/analysis-resource-get"},{"title":"Retrieve Analysis Results","openapi":"GET /api/v1/analyses/{id}/results","href":"/api-reference/analysis-resource-results"},{"title":"Retrieve Analysis Output File Details","openapi":"GET /api/v1/analyses/{id}/file_details","href":"/api-reference/analysis-resource-file-details"},{"group":"Classifications","pages":[{"title":"The Classification Resource","href":"/api-reference/classification-resource"},{"title":"Retrieve All Classifications","openapi":"GET /api/v1/classifications","href":"/api-reference/classification-resource-instances"},{"title":"Retrieve A Classification","openapi":"GET /api/v1/classifications/{id}","href":"/api-reference/classification-resource-get"},{"title":"Retrieve Classification Results","openapi":"GET /api/v1/classifications/{id}/results","href":"/api-reference/classification-resource-results"},{"title":"Read-Level Results","openapi":"GET /api/v1/classifications/{id}/readlevel","href":"/api-reference/classification-resource-read-level"}]},{"group":"Functional Profiles","pages":[{"title":"The Functional Profile Resource","href":"/api-reference/functional-profile-resource"},{"title":"Retrieve All Functional Profiles","openapi":"GET /api/v1/functional_profiles","href":"/api-reference/functional-profile-resource-instances"},{"title":"Retrieve A Functional Profile","openapi":"GET /api/v1/functional_profiles/{id}","href":"/api-reference/functional-profile-resource-get"},{"title":"Functional Profile Results","openapi":"GET /api/v1/functional_profiles/{id}/results","href":"/api-reference/functional-profile-resource-results"},{"title":"Functional Profile Filtered Results","openapi":"GET /api/v1/functional_profiles/{id}/filtered_results","href":"/api-reference/functional-profile-resource-filtered-results"}]},{"group":"Panels","pages":[{"title":"The Panel Resource","href":"/api-reference/panel-resource"},{"title":"Retrieve All Panels","openapi":"GET /api/v1/panels","href":"/api-reference/panel-resource-instances"},{"title":"Retrieve A Panel","openapi":"GET /api/v1/panels/{id}","href":"/api-reference/panel-resource-get"},{"title":"Panel Results","openapi":"GET /api/v1/panels/{id}/results","href":"/api-reference/panel-resource-results"}]},{"group":"Alignments","pages":[{"title":"The Alignment Resource","href":"/api-reference/alignment-resource"},{"title":"Retrieve All Alignments","openapi":"GET /api/v1/alignments","href":"/api-reference/alignment-resource-instances"},{"title":"Retrieve An Alignment","openapi":"GET /api/v1/alignments/{id}","href":"/api-reference/alignment-resource-get"}]},{"group":"MLST","pages":[{"title":"The MLST Resource","href":"/api-reference/mlst-resource"},{"title":"Retrieve All MLST Results","openapi":"GET /api/v1/mlsts","href":"/api-reference/mlst-resource-instances"},{"title":"Retrieve An MLST Result","openapi":"GET /api/v1/mlsts/{id}","href":"/api-reference/mlst-resource-get"},{"title":"MLST Results","openapi":"GET /api/v1/mlsts/{id}/results","href":"/api-reference/mlst-resource-results"}]},{"group":"Workflows","pages":[{"title":"The Workflow Resource","href":"/api-reference/workflow-resource"},{"title":"Retrieve All Workflow Runs","openapi":"GET /api/v1/workflows","href":"/api-reference/workflow-resource-instances"},{"title":"Retrieve A Workflow Run","openapi":"GET /api/v1/workflows/{id}","href":"/api-reference/workflow-resource-get"},{"title":"Workflow Results","openapi":"GET /api/v1/workflows/{id}/results","href":"/api-reference/workflow-resource-results"}]}]},{"group":"Jobs","pages":[{"title":"The Job Resource","href":"/api-reference/job-resource"},{"title":"Retrieve All Jobs","openapi":"GET /api/v1/jobs","href":"/api-reference/job-resource-instances"},{"title":"Retrieve A Job","openapi":"GET /api/v1/jobs/{id}","href":"/api-reference/job-resource-get"},{"title":"Job Details","openapi":"GET /api/v1/jobs/{id}/details","href":"/api-reference/job-resource-details"},{"title":"Create A Job","openapi":"POST /api/v1/jobs","href":"/api-reference/job-resource-create"},{"title":"Update A Job","openapi":"PATCH /api/v1/jobs/{id}","href":"/api-reference/job-resource-patch"},{"title":"Run A Job","openapi":"POST /api/v1/jobs/{id}/run","href":"/api-reference/job-resource-run"}]},{"group":"Documents","pages":[{"title":"The Document Resource","href":"/api-reference/document-resource"},{"title":"Retrieve All Documents","openapi":"GET /api/v1/documents","href":"/api-reference/document-resource-instances"},{"title":"Retrieve A Document","openapi":"GET /api/v1/documents/{id}","href":"/api-reference/document-resource-get"},{"group":"Uploading Documents","pages":[{"title":"Uploading Documents Overview","href":"/api-reference/uploading-documents"},{"title":"Starting a Document Upload","openapi":"POST /api/v1/documents/init_upload","href":"/api-reference/document-resource-upload-file"},{"title":"Confirming an Upload","openapi":"POST /api/v1/documents/confirm_upload","href":"/api-reference/document-resource-confirm-upload"}]},{"title":"Downloading Documents","openapi":"POST /api/v1/documents/{id}/download_uri","href":"/api-reference/document-resource-download"},{"title":"Rename A Document","openapi":"PATCH /api/v1/documents/{id}/rename","href":"/api-reference/document-resource-rename"},{"title":"Delete A Document","openapi":"DELETE /api/v1/documents/{id}","href":"/api-reference/document-resource-delete"},{"group":"Sharing","pages":[{"title":"Share A Document With A User","openapi":"POST /api/v1/documents/{id}/add_user","href":"/api-reference/document-resource-add-user"},{"title":"Revoke A User's Document Access","openapi":"POST /api/v1/documents/{id}/remove_user","href":"/api-reference/document-resource-remove-user"}]}]},{"group":"Webhooks \u0026 Events","pages":[{"title":"Using Webhooks","href":"/api-reference/using-webhooks"},{"title":"Checking Signatures","href":"/api-reference/checking-webhook-signatures"},{"title":"The Webhook Resource","href":"/api-reference/webhook-resource"},{"title":"Retrieve All Webhooks","openapi":"GET /api/v1/webhooks","href":"/api-reference/webhook-resource-instances"},{"title":"Retrieve A Webhook","openapi":"GET /api/v1/webhooks/{id}","href":"/api-reference/webhook-resource-get"},{"title":"Retrieve All Events","openapi":"GET /api/v1/events","href":"/api-reference/event-resource-instances"},{"title":"Retrieve An Event","openapi":"GET /api/v1/events/{id}","href":"/api-reference/event-resource-get"}]},{"group":"Users \u0026 Account","pages":[{"title":"The Account Resource","href":"/api-reference/account-resource"},{"title":"Retrieve The Authenticated Account","openapi":"GET /api/v1/account","href":"/api-reference/account-resource-get"},{"title":"The User Resource","href":"/api-reference/user-resource"},{"title":"Retrieve All Users","openapi":"GET /api/v1/users","href":"/api-reference/user-resource-instances"},{"title":"Retrieve A User","openapi":"GET /api/v1/users/{id}","href":"/api-reference/user-resource-get"}]},{"group":"Sequencing","pages":[{"title":"The Sequencing Batch Resource","href":"/api-reference/sequencing-batch-resource"},{"title":"Retrieve All Sequencing Batches","openapi":"GET /api/v1/sequencing/batches","href":"/api-reference/sequencing-batch-resource-instances"},{"title":"Retrieve A Sequencing Batch","openapi":"GET /api/v1/sequencing/batches/{id}","href":"/api-reference/sequencing-batch-resource-get"},{"title":"Registering a Sequencing Batch","openapi":"POST /api/v1/sequencing/batches/register","href":"/api-reference/sequencing-batch-resource-post"},{"title":"Retrieve Samples in a Sequencing Batch","openapi":"GET /api/v1/sequencing/batches/{id}/samples","href":"/api-reference/sequencing-batch-resource-samples"}]}]},{"tab":"Workflows","pages":[{"title":"Workflows","href":"/workflows/workflows-introduction"}]}]},"basePath":"","title":"Starting an Upload - One Codex Developer Docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}