[INFO] fetching crate hi-jira2 0.0.1... [INFO] documenting hi-jira2-0.0.1 against try#a394c9cd9ec93787f09a7ac445b14cc674a94549 for pr-151918-2 [INFO] extracting crate hi-jira2 0.0.1 into /workspace/builds/worker-2-tc2/source [INFO] started tweaking crates.io crate hi-jira2 0.0.1 [INFO] finished tweaking crates.io crate hi-jira2 0.0.1 [INFO] tweaked toml for crates.io crate hi-jira2 0.0.1 written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate hi-jira2 0.0.1 on toolchain a394c9cd9ec93787f09a7ac445b14cc674a94549 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a394c9cd9ec93787f09a7ac445b14cc674a94549" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a394c9cd9ec93787f09a7ac445b14cc674a94549" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 175 packages to latest compatible versions [INFO] [stderr] Adding reqwest v0.11.27 (available: v0.13.2) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a394c9cd9ec93787f09a7ac445b14cc674a94549" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+a394c9cd9ec93787f09a7ac445b14cc674a94549" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 80bdc6a07d93fbc1c7260778dd35a3ecb2319ef4c28b23a9b1cd48c64f88035b [INFO] running `Command { std: "docker" "start" "-a" "80bdc6a07d93fbc1c7260778dd35a3ecb2319ef4c28b23a9b1cd48c64f88035b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "80bdc6a07d93fbc1c7260778dd35a3ecb2319ef4c28b23a9b1cd48c64f88035b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "80bdc6a07d93fbc1c7260778dd35a3ecb2319ef4c28b23a9b1cd48c64f88035b", kill_on_drop: false }` [INFO] [stdout] 80bdc6a07d93fbc1c7260778dd35a3ecb2319ef4c28b23a9b1cd48c64f88035b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+a394c9cd9ec93787f09a7ac445b14cc674a94549" "doc" "--frozen" "--no-deps" "--document-private-items" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 3236513f680d67b075cf67e58a6a1b21a3e92c5d4f7b8adb36c50027e1f9ad29 [INFO] running `Command { std: "docker" "start" "-a" "3236513f680d67b075cf67e58a6a1b21a3e92c5d4f7b8adb36c50027e1f9ad29", kill_on_drop: false }` [INFO] [stderr] Compiling unicode-ident v1.0.23 [INFO] [stderr] Compiling libc v0.2.181 [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Compiling cc v1.2.55 [INFO] [stderr] Checking bytes v1.11.1 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking futures-task v0.3.31 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling zmij v1.0.20 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking ryu v1.0.23 [INFO] [stderr] Checking unicase v2.9.0 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.2 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking rustls-pemfile v1.0.4 [INFO] [stderr] Checking sync_wrapper v0.1.2 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Documenting hi-jira2 v0.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unresolved link to `em>` [INFO] [stdout] --> src/models/search_request_bean.rs:31:22 [INFO] [stdout] | [INFO] [stdout] 31 | /// Use [expand](em>#expansion) to include additional information about issues in the response. Note that, unlike the majority o... [INFO] [stdout] | ^^^^^^^^^^^^^ unbalanced angle brackets [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unresolved link to `em>` [INFO] [stdout] --> src/models/version.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | /// Use [expand](em>#expansion) to include additional information about version in the response. This parameter accepts a comma-... [INFO] [stdout] | ^^^^^^^^^^^^^ unbalanced angle brackets [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:548 [INFO] [stdout] | [INFO] [stdout] 160 | ... --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] = note: `#[warn(rustdoc::bare_urls)]` on by default [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST '' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:835 [INFO] [stdout] | [INFO] [stdout] 160 | ...e-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:884 [INFO] [stdout] | [INFO] [stdout] 160 | ...://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:1346 [INFO] [stdout] | [INFO] [stdout] 160 | ...InBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST',... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:2077 [INFO] [stdout] | [INFO] [stdout] 160 | ... code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https:... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:2149 [INFO] [stdout] | [INFO] [stdout] 160 | ...ttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:2612 [INFO] [stdout] | [INFO] [stdout] 160 | ...code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth imp... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:2745 [INFO] [stdout] | [INFO] [stdout] 160 | ...th import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:3429 [INFO] [stdout] | [INFO] [stdout] 160 | ...is code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', '... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:3760 [INFO] [stdout] | [INFO] [stdout] 160 | ...nse = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $he... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( '{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:4009 [INFO] [stdout] | [INFO] [stdout] 160 | ...ge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // https://www.npmjs.com/package/fo... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/apis/issue_attachments_api.rs:160:4065 [INFO] [stdout] | [INFO] [stdout] 160 | ...loper.atlassian.com/platform/forge/ // https://www.npmjs.com/package/form-data import api from \"@forge/api\"; im... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 160 | /// Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)). Note that: * The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information. * The name of the multipart/form-data parameter that contains the attachments must be `file`. The following examples upload a file called *myfile.txt* to the issue *TEST-123*: #### curl #### curl --location --request POST 'https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments' -u 'email@example.com:' -H 'X-Atlassian-Token: no-check' --form 'file=@\"myfile.txt\"' #### Node.js #### // This code sample uses the 'node-fetch' and 'form-data' libraries: // https://www.npmjs.com/package/node-fetch // https://www.npmjs.com/package/form-data const fetch = require('node-fetch'); const FormData = require('form-data'); const fs = require('fs'); const filePath = 'myfile.txt'; const form = new FormData(); const stats = fs.statSync(filePath); const fileSizeInBytes = stats.size; const fileStream = fs.createReadStream(filePath); form.append('file', fileStream, {knownLength: fileSizeInBytes}); fetch('https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments', { method: 'POST', body: form, headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:' ).toString('base64')}`, 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err)); #### Java #### // This code sample uses the 'Unirest' library: // http://unirest.io/java.html HttpResponse response = Unirest.post(\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\") .basicAuth(\"email@example.com\", \"\") .header(\"Accept\", \"application/json\") .header(\"X-Atlassian-Token\", \"no-check\") .field(\"file\", new File(\"myfile.txt\")) .asJson(); System.out.println(response.getBody()); #### Python #### # This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = \"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\" auth = HTTPBasicAuth(\"email@example.com\", \"\") headers = { \"Accept\": \"application/json\", \"X-Atlassian-Token\": \"no-check\" } response = requests.request( \"POST\", url, headers = headers, auth = auth, files = { \"file\": (\"myfile.txt\", open(\"myfile.txt\",\"rb\"), \"application-type\") } ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\",\", \": \"))) #### PHP #### // This code sample uses the 'Unirest' library: // http://unirest.io/php.html Unirest\\Request::auth('email@example.com', ''); $headers = array( 'Accept' => 'application/json', 'X-Atlassian-Token' => 'no-check' ); $parameters = array( 'file' => File::add('myfile.txt') ); $response = Unirest\\Request::post( 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments', $headers, $parameters ); var_dump($response) #### Forge #### // This sample uses Atlassian Forge and the `form-data` library. // https://developer.atlassian.com/platform/forge/ // import api from \"@forge/api\"; import FormData from \"form-data\"; const form = new FormData(); form.append('file', fileStream, {knownLength: fileSizeInBytes}); const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', { method: 'POST', body: form, headers: { 'Accept': 'application/json', 'X-Atlassian-Token': 'no-check' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/models/filter.rs:35:93 [INFO] [stdout] | [INFO] [stdout] 35 | ... the ID of the filter. For example, *https://your-domain.atlassian.net/issues/?filter=10100*. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 35 | /// A URL to view the filter results in Jira, using the ID of the filter. For example, **. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/models/filter.rs:38:209 [INFO] [stdout] | [INFO] [stdout] 38 | ...ts. For example, *https://your-domain.atlassian.net/rest/api/2/search?jql=project+%3D+SSP+AND+issuetype+%3D+Bug*. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 38 | /// A URL to view the filter results in Jira, using the [Search for issues using JQL](#api-rest-api-2-filter-search-get) operation with the filter's JQL string to return the filter results. For example, **. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/models/filter_details.rs:38:93 [INFO] [stdout] | [INFO] [stdout] 38 | ... the ID of the filter. For example, *https://your-domain.atlassian.net/issues/?filter=10100*. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 38 | /// A URL to view the filter results in Jira, using the ID of the filter. For example, **. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/models/filter_details.rs:41:209 [INFO] [stdout] | [INFO] [stdout] 41 | ...ts. For example, *https://your-domain.atlassian.net/rest/api/2/search?jql=project+%3D+SSP+AND+issuetype+%3D+Bug*. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 41 | /// A URL to view the filter results in Jira, using the [Search for issues using JQL](#api-rest-api-2-filter-search-get) operation with the filter's JQL string to return the filter results. For example, **. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this URL is not a hyperlink [INFO] [stdout] --> src/models/issue_field_option_create_bean.rs:19:136 [INFO] [stdout] | [INFO] [stdout] 19 | ...extractions (see https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/) are defined in t... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: bare URLs are not automatically turned into clickable links [INFO] [stdout] help: use an automatic link instead [INFO] [stdout] | [INFO] [stdout] 19 | /// The properties of the option as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see ) are defined in the descriptor for the issue field module. [INFO] [stdout] | + + [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stderr] thread 'rustc' (663) panicked at src/librustdoc/html/markdown.rs:534:22: [INFO] [stderr] a production-ready version of this should handle the error somehow: LatexError(14, DuplicateSubOrSup) [INFO] [stderr] stack backtrace: [INFO] [stderr] 0: 0x7a7d36646d9b - <::print::DisplayBacktrace as core[37ab4a9f28f6fd13]::fmt::Display>::fmt [INFO] [stderr] 1: 0x7a7d36c0ef88 - core[37ab4a9f28f6fd13]::fmt::write [INFO] [stderr] 2: 0x7a7d3665dc36 - ::write_fmt [INFO] [stderr] 3: 0x7a7d3661ce48 - std[6281e874092a0dfc]::panicking::default_hook::{closure#0} [INFO] [stderr] 4: 0x7a7d3663a163 - std[6281e874092a0dfc]::panicking::default_hook [INFO] [stderr] 5: 0x7a7d3560ff8d - std[6281e874092a0dfc]::panicking::update_hook::>::{closure#0} [INFO] [stderr] 6: 0x7a7d3663a442 - std[6281e874092a0dfc]::panicking::panic_with_hook [INFO] [stderr] 7: 0x7a7d3661cf08 - std[6281e874092a0dfc]::panicking::panic_handler::{closure#0} [INFO] [stderr] 8: 0x7a7d36611479 - std[6281e874092a0dfc]::sys::backtrace::__rust_end_short_backtrace:: [INFO] [stderr] 9: 0x7a7d3661e96d - __rustc[670611b3f56fc7d7]::rust_begin_unwind [INFO] [stderr] 10: 0x7a7d332ce58c - core[37ab4a9f28f6fd13]::panicking::panic_fmt [INFO] [stderr] 11: 0x7a7d32f88b72 - core[37ab4a9f28f6fd13]::result::unwrap_failed [INFO] [stderr] 12: 0x5a3e839cf51e - ::into_iter::{closure#0}>>>>, ::into_iter::{closure#1}::{closure#0}>>> as core[37ab4a9f28f6fd13]::iter::traits::iterator::Iterator>::next [INFO] [stderr] 13: 0x5a3e83965c16 - ::into_iter::{closure#0}>>>>, ::into_iter::{closure#1}::{closure#0}>>>> as core[37ab4a9f28f6fd13]::iter::traits::iterator::Iterator>::next [INFO] [stderr] 14: 0x5a3e837cb493 - ::into_iter::{closure#0}>>>>, ::into_iter::{closure#1}::{closure#0}>>>>, pulldown_cmark_escape[cb8658d251f4e39e]::FmtWriter<&mut core[37ab4a9f28f6fd13]::fmt::Formatter>>>::run [INFO] [stderr] 15: 0x5a3e8361ab80 - ::write_into::<&mut core[37ab4a9f28f6fd13]::fmt::Formatter> [INFO] [stderr] 16: 0x5a3e839be521 - as core[37ab4a9f28f6fd13]::fmt::Display>::fmt [INFO] [stderr] 17: 0x7a7d36c0ef88 - core[37ab4a9f28f6fd13]::fmt::write [INFO] [stderr] 18: 0x5a3e839bf5da - as core[37ab4a9f28f6fd13]::fmt::Display>::fmt [INFO] [stderr] 19: 0x7a7d36c0ef88 - core[37ab4a9f28f6fd13]::fmt::write [INFO] [stderr] 20: 0x5a3e839c05a5 - as core[37ab4a9f28f6fd13]::fmt::Display>::fmt [INFO] [stderr] 21: 0x7a7d36c0ef88 - core[37ab4a9f28f6fd13]::fmt::write [INFO] [stderr] 22: 0x5a3e839c124a - as core[37ab4a9f28f6fd13]::fmt::Display>::fmt [INFO] [stderr] 23: 0x7a7d36c0ef88 - core[37ab4a9f28f6fd13]::fmt::write [INFO] [stderr] 24: 0x5a3e835e194f - ::render_into:: [INFO] [stderr] 25: 0x5a3e839c3ab0 - as core[37ab4a9f28f6fd13]::fmt::Display>::fmt [INFO] [stderr] 26: 0x7a7d36c0ef88 - core[37ab4a9f28f6fd13]::fmt::write [INFO] [stderr] 27: 0x5a3e836b6c0a - rustdoc[7f40747ea455e46f]::html::layout::render::, core[37ab4a9f28f6fd13]::fmt::builders::FromFn<::render_item::{closure#1}>> [INFO] [stderr] 28: 0x5a3e8380ab85 - ::render_item [INFO] [stderr] 29: 0x5a3e839a5a5e - ::item [INFO] [stderr] 30: 0x5a3e836bfadc - rustdoc[7f40747ea455e46f]::formats::renderer::run_format_inner:: [INFO] [stderr] 31: 0x5a3e836bfc8f - rustdoc[7f40747ea455e46f]::formats::renderer::run_format_inner:: [INFO] [stderr] 32: 0x5a3e836bfc8f - rustdoc[7f40747ea455e46f]::formats::renderer::run_format_inner:: [INFO] [stderr] 33: 0x5a3e836bfc8f - rustdoc[7f40747ea455e46f]::formats::renderer::run_format_inner:: [INFO] [stderr] 34: 0x5a3e8378839f - rustdoc[7f40747ea455e46f]::main_args::{closure#2}::{closure#0} [INFO] [stderr] 35: 0x5a3e8377c100 - rustc_interface[7c235db06cadd779]::interface::run_compiler::<(), rustdoc[7f40747ea455e46f]::main_args::{closure#2}>::{closure#1} [INFO] [stderr] 36: 0x5a3e836b5078 - std[6281e874092a0dfc]::sys::backtrace::__rust_begin_short_backtrace::::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> [INFO] [stderr] 37: 0x5a3e837aedf7 - ::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[37ab4a9f28f6fd13]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} [INFO] [stderr] 38: 0x7a7d37e1dbac - ::new::thread_start [INFO] [stderr] 39: 0x7a7d3188aaa4 - [INFO] [stderr] 40: 0x7a7d31917a64 - clone [INFO] [stderr] 41: 0x0 - [INFO] [stderr] [INFO] [stderr] error: the compiler unexpectedly panicked. this is a bug. [INFO] [stderr] [INFO] [stderr] note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md [INFO] [stderr] [INFO] [stderr] note: please make sure that you have updated to the latest nightly [INFO] [stderr] [INFO] [stderr] warning: the ICE couldn't be written to `/opt/rustwide/workdir/rustc-ice-2026-02-09T22_55_26-662.txt`: Read-only file system (os error 30) [INFO] [stderr] [INFO] [stderr] note: rustc 1.95.0-nightly (a394c9cd9 2026-01-31) running on x86_64-unknown-linux-gnu [INFO] [stderr] [INFO] [stderr] note: compiler flags: --crate-type lib [INFO] [stderr] [INFO] [stderr] note: some of the compiler flags provided by cargo are hidden [INFO] [stderr] [INFO] [stderr] query stack during panic: [INFO] [stderr] end of query stack [INFO] [stderr] error: could not document `hi-jira2` [INFO] running `Command { std: "docker" "inspect" "3236513f680d67b075cf67e58a6a1b21a3e92c5d4f7b8adb36c50027e1f9ad29", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3236513f680d67b075cf67e58a6a1b21a3e92c5d4f7b8adb36c50027e1f9ad29", kill_on_drop: false }` [INFO] [stdout] 3236513f680d67b075cf67e58a6a1b21a3e92c5d4f7b8adb36c50027e1f9ad29