Skip to main content
POST
/
organizations
/
{orgId}
/
fileuploads
/
measurements
/
generateUploadUrl
Generate Upload URL
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/fileuploads/measurements/generateUploadUrl \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fileName": "<string>",
  "contentType": "application/json",
  "contentLength": 536870912
}
'
{
  "jobId": "<string>",
  "url": "<string>",
  "headers": {}
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Path Parameters

orgId
string
required

UUID of the Organization. The Organization represents your company as a direct customer of the m3ter platform.

Body

application/json

Request containing the file details when generating an upload URL.

fileName
string
required

The name of the measurements file to be uploaded.

Required string length: 1 - 100
contentType
enum<string>
required

The media type of the entity body sent, for example: "contentType":"text/json".

NOTE: Currently only a JSON formatted file type is supported by the File Upload Service.

Available options:
application/json,
text/json
Required string length: 1 - 20
contentLength
integer<int64>
required

The size of the body in bytes. For example: "contentLength": 485, where 485 is the size in bytes of the file to upload.

NOTE: Required.

Required range: 1 <= x <= 1073741824

Response

Returns the upload URL and jobId

Response containing the upload job URL details

jobId
string

UUID of the upload job

url
string

The URL

headers
object

The headers