Create upload portal

Create upload portal

Creates a new upload portal for the organization.

POSThttps://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/portals/create
Path parameters
organizationId*integer

Organization ID

Body
name*string

The name of the upload portal.

Example: "EdgeImpulse Inc."
descriptionstring

The purpose and description of the upload portal.

Example: "EdgeImpulse Inc. Portal description"
bucketId*integer

The S3 bucket id to store the uploaded data. Set to '0' to select a bucket hosted by Edge Impulse.

Example: 1
bucketPath*string

The path in the bucket the upload portal will write to.

Example: "/path/in/bucket"
Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

id*integer

Portal ID for the new upload portal

url*string

URL to the portal

signedUrlstring

pre-signed upload URL. Only set if using a non-built-in bucket.

bucketBucketstring

Only set if using a non-built-in bucket.

Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/portals/create', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "EdgeImpulse Inc.",
      "bucketId": 1,
      "bucketPath": "/path/in/bucket"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text",
  "id": 0,
  "url": "text",
  "signedUrl": "text",
  "bucketBucket": "text"
}

Last updated