White Label Admin - Add Project API key

White Label Admin - Add Project API key

White label admin only API to add an API key to a project. Add a temporary API key that can be used to make Projects API (/api/projects/{projectId}/) requests on behalf of the project admin. These API keys are not visible to the project itself and have a customizable TTL defaulting to 1 minute.

POSThttps://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/whitelabel/projects/{projectId}/apiKeys
Path parameters
organizationId*integer

Organization ID

projectId*integer

Project ID

Body
name*string

Description of the key

apiKey*string

API key. This needs to start with ei_ and will need to be at least 32 characters long.

ttlinteger

Time to live in seconds. If not set, the key will expire in 1 minute.

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/organizations/{organizationId}/whitelabel/projects/{projectId}/apiKeys', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "apiKey": "text"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated