Date: Thu, 28 Mar 2024 13:25:54 +0000 (UTC) Message-ID: <732973254.8269.1711632354589@catch-kbase-p> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8268_476373007.1711632354589" ------=_Part_8268_476373007.1711632354589 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Incident Attachments (collection) resource for fetching attachments asso= ciated with a Incident, or adding new attachments to the Incident.
This resource supports the following methods: GET, POST
Retrieves list of attachments for the Incident.
This method supports the OData parameters $filter, $top, $take, $orderby= and $inlinecount. See OData Topic for more details.
These are the expected status codes returned by the service. In addition= , some other status codes may be returned if either an internal error occur= s or there is an authentication issue (such as an expired OAuth token).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successful= ly. |
403 - Forbidden | Returned if you have insufficient permissions to= retrieve attachments. |
404 - NotFound | Returned if the Incident was not found. |
Retrieves a list of all attachments associated with a Incident.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 4bb709c2-e0e7-4af3-9f60-a045016a9610 | Unique identifier of the script. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=3Dutf-8 |
Response Body
{ "Items": [ { "Id": "9b02c840-c330-4725-b743-b40181420bc2", "IncidentId": "ad506e26-dea1-4fba-a2c8-ee993b9f9444", "Name": "screenshot 1", "FileName": "screenshot1.png", "ContentType": "image/png", "CreatedAt": "2012-01-01T14:04:05Z", "CreatedById": "2b364daa-0dff-4a6f-8554-f5963d3011be", "Size": 122454, "Self": "http://localhost/api/incident/ad506e26-dea1-4fba-a2c8-ee993b= 9f9444/attachment/9b02c840-c330-4725-b743-b40181420bc2", "Content": "http://localhost/api/attachment/00000000-0000-0000-0000-0= 00000000000/contents" }, { "Id": "5669f517-5ef4-40b6-856f-dbd488319da6", "IncidentId": "ad506e26-dea1-4fba-a2c8-ee993b9f9444", "Name": "notes.txt", "FileName": "notes", "ContentType": "text/plain", "CreatedAt": "2012-01-01T14:04:05Z", "CreatedById": "2b364daa-0dff-4a6f-8554-f5963d3011be", "Size": 3, "Self": "http://localhost/api/incident/ad506e26-dea1-4fba-a2c8-ee993b= 9f9444/attachment/5669f517-5ef4-40b6-856f-dbd488319da6", "Content": "http://localhost/api/attachment/00000000-0000-0000-0000-0= 00000000000/contents" } ] }
Status Code
200 - OK
Upload one or more attachments for this Incident.
These are the expected status codes returned by the service. In addition= , some other status codes may be returned if either an internal error occur= s or there is an authentication issue (such as an expired OAuth token).
Status | Description |
---|---|
201 - Created | Returned if the attachments were uploaded succes= sfully. |
403 - Forbidden | Returned if the multipart request did not contai= n any files. |
415 - UnsupportedMediaType | Returned if the request is not mime multipart.= td> |
Uploads one or more files using a mime multipart request (this example s= hows a response where two files were uploaded).
Request Headers
Key | Value | Description |
---|---|---|
Content-Type | multipart/mixed; boundary=3D65bf6b94-c91c-= 442c-abe7-f41444d7c71f |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 4bb709c2-e0e7-4af3-9f60-a045016a9610 | The unique identifier (GUID) of the script to ad= d the attachments to. |
Request Body
--65bf= 6b94-c91c-442c-abe7-f41444d7c71f Content-Disposition: attachment; filename=3Dscreenshot1.png; name=3D"screen= shot 1"; size=3D122454 Content-Type: image/png Content-Length: 3 ... --65bf6b94-c91c-442c-abe7-f41444d7c71f Content-Disposition: attachment; filename=3Dnotes.txt; name=3Dnotes; size= =3D3 Content-Type: text/plain Content-Length: 3 ABC --65bf6b94-c91c-442c-abe7-f41444d7c71f--
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=3Dutf-8 |
Response Body
{ "Items": [ { "Id": "9b02c840-c330-4725-b743-b40181420bc2", "IncidentId": "ad506e26-dea1-4fba-a2c8-ee993b9f9444", "Name": "screenshot 1", "FileName": "screenshot1.png", "ContentType": "image/png", "CreatedAt": "2012-01-01T14:04:05Z", "CreatedById": "2b364daa-0dff-4a6f-8554-f5963d3011be", "Size": 122454, "Self": "http://localhost/api/incident/ad506e26-dea1-4fba-a2c8-ee993b= 9f9444/attachment/9b02c840-c330-4725-b743-b40181420bc2", "Content": "http://localhost/api/attachment/00000000-0000-0000-0000-0= 00000000000/contents" }, { "Id": "5669f517-5ef4-40b6-856f-dbd488319da6", "IncidentId": "ad506e26-dea1-4fba-a2c8-ee993b9f9444", "Name": "notes.txt", "FileName": "notes", "ContentType": "text/plain", "CreatedAt": "2012-01-01T14:04:05Z", "CreatedById": "2b364daa-0dff-4a6f-8554-f5963d3011be", "Size": 3, "Self": "http://localhost/api/incident/ad506e26-dea1-4fba-a2c8-ee993b= 9f9444/attachment/5669f517-5ef4-40b6-856f-dbd488319da6", "Content": "http://localhost/api/attachment/00000000-0000-0000-0000-0= 00000000000/contents" } ] }
Status Code
201 - Created