Initiate attachment upload
Request accessPurpose
This call is used to start adding a file to a feedback. It reserves a place for the file and returns a temporary link that you upload the file to. It is the first of the three calls described in Attachments.
The file itself is not sent with this call.
How to request data
HTTP method: POST
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for these values. The generic URL format is as follows.
URL request format
https://{baseURL}/maps/orbis/feedback/{feedbackId}/attachments?key={API-key}&apiVersion={version}Request parameters
The following table describes the parameters that can be used in a request.
- Required parameters must be used or the call will fail.
- The order of request parameters is not important.
Parameter | Required | Type | Description |
|---|---|---|---|
| Yes | string | The ID of the feedback the file belongs to. Part of the URL. |
| Yes | string | The name of the file, as it should be shown later. A maximum of 255 characters. |
| Yes | string | The type of the file. One of |
| Yes | integer | The size of the file in bytes. Must be greater than 0 and no larger than 10,485,760 (10 MiB). |
Example request
{ "filename": "missing-road-sign.png", "contentType": "image/png", "sizeBytes": 20480}Response data
The uploadUrl points at TomTom’s file storage on *.blob.core.windows.net and already carries a
temporary access token, so send it exactly as you received it. It is valid for 15 minutes, until the
moment given in expiresAt. Upload the file to it
with an HTTP PUT request, then confirm the upload with
Complete attachment upload.
If the link expires before you upload, simply make this call again to get a new one.
Response codes
HTTP Code | Message | Description | Sample response |
|---|---|---|---|
| Created | Upload started successfully | |
| Bad Request | Invalid request parameters, for example a file type that is not allowed or a file that is too large | |
| Forbidden | Access denied | |
| Not Found | Feedback not found | |
| Conflict | The feedback already has the maximum of 100 attachments | |
| Internal Server Error | Internal server error | |