Rename file from portal

Rename file from portal

Rename a file on an upload portal (requires JWT auth).

POSThttps://studio.edgeimpulse.com/v1/api/portals/{portalId}/files/rename
Path parameters
portalId*integer

Portal ID

Body
oldPath*string

S3 path (within the portal)

newPath*string

S3 path (within the portal)

Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

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

Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/portals/{portalId}/files/rename', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "oldPath": "text",
      "newPath": "text"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated