REST API - View the URLs for ticket attachments
Last modified on 2023/04/05 15:30
Content
GET /requests/{rfc_number}/documents
- This method allows the URLs for attachements of a specified ticket to be obtained (a ticket includes incident, service request, change request, investment request, problem and event).
example /requests/I161026_000005/documents
Notes
See REST API Conventions Service Manager
- If successful, an HTTP status code 200 is returned and URL links (HREF) to the resource, parent resource and each file attachment are provided.
List of parameters / fields
Mandatory parameters
You must use the parameter below in the URL.
Parameter | Type | Description / Example |
---|---|---|
rfc_number | string | Ticket number |
Optional parameters
None
Optional fields
None
HTTP status codes for the method
StatusHeader
Code | Error | Description |
---|
Status200
200 | OK (Successful) | Request successfully processed. |
Status401
401 | Unauthorized | Incorrect authentication process for accessing the resource: Incorrect login/password, invalid session, incorrect Service Manager account.
example { "error": "Invalid Login / Password" } |
Status404
404 | Not found | Resource not found: Incorrect URI, missing resource, incorrect communication with the server, rfc_number not found.
example { "error": "Resource not found" } |
Example
Result with a status code 200 returned
{
"PARENT_HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005",
"HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005/documents",
"Documents": [
{
"HREF": "https://{your_server}/autoconnect_mail.php?field1=5C0F051E540F056E114E&field2=&field3=&docpath={your_account}/Documents/40000_9ae8ab51e5eb847d76a72aeac2a0f1c99f1039cebd585b49e6b1914c43bf79d5%7CDocument%20cr%C3%A9%C3%A9%20via%20API%20REST.txt",
"PARENT_HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005",
"DOCUMENT_ID": "40000_9ae8ab51e5eb847d76a72aeac2a0f1c99f1039cebd585b49e6b1914c43bf79d5",
"DOCUMENT": "Document created via API REST.txt",
"DDL_HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005/documents/40000_9ae8ab51e5eb847d76a72aeac2a0f1c99f1039cebd585b49e6b1914c43bf79d5"
}
]
}
"PARENT_HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005",
"HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005/documents",
"Documents": [
{
"HREF": "https://{your_server}/autoconnect_mail.php?field1=5C0F051E540F056E114E&field2=&field3=&docpath={your_account}/Documents/40000_9ae8ab51e5eb847d76a72aeac2a0f1c99f1039cebd585b49e6b1914c43bf79d5%7CDocument%20cr%C3%A9%C3%A9%20via%20API%20REST.txt",
"PARENT_HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005",
"DOCUMENT_ID": "40000_9ae8ab51e5eb847d76a72aeac2a0f1c99f1039cebd585b49e6b1914c43bf79d5",
"DOCUMENT": "Document created via API REST.txt",
"DDL_HREF": "https://{your_server}/api/v1/{your_account}/requests/I191030_000005/documents/40000_9ae8ab51e5eb847d76a72aeac2a0f1c99f1039cebd585b49e6b1914c43bf79d5"
}
]
}
ConventionsAPI
REST API Conventions
Convention | Meaning | |
---|---|---|
Orange | Parameters used in an HTTP request string which do not correspond to Service Manager database fields.
example Method View a list of assets https://{your_server}/api/v1/{your_account}/assets?max_rows=3&fields=asset_tag |
|
Black and Bold | Parameters used in the URL of an HTTP request which correspond to Service Manager database fields.
example Method View an asset https://{your_server}/api/v1/{your_account}/assets/{asset_id} |
|
Green | Parameters used in the body of an HTTP request which represent JSON object names corresponding to Service Manager database fields; they allow the value of a database field to be assigned or modified.
example Method Close an incident/request { "closed": { "end_date": "11/20/2016 12:12:12", } } |
|
Parameters used in the body of an HTTP request which represent JSON object names not corresponding to Service Manager database fields.
example Method Reopen an incident/request { "restarted": { "comment": "string (required)" } } |