openapi: 3.2.0 info: title: Edge Impulse Post Processing API version: 1.0.0 servers: - url: https://studio.edgeimpulse.com/v1 security: - ApiKeyAuthentication: [] - JWTAuthentication: [] - JWTHttpHeaderAuthentication: [] - OAuth2: [] tags: - name: PostProcessing paths: /api/{projectId}/post-processing/{postProcessingId}: get: summary: Get post-processing block config description: Retrieve the configuration parameters for a post-processing block. Use the impulse functions to retrieve all post-processing blocks. operationId: getPostProcessingConfig x-oauth-scopes: - post-processing:read tags: - PostProcessing parameters: - $ref: '#/components/parameters/ProjectIdParameter' - $ref: '#/components/parameters/PostProcessingIdParameter' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PostProcessingConfigResponse' post: summary: Set post-processing block config description: Set configuration parameters for a post-processing block. Only values set in the body will be overwritten. operationId: setPostProcessingConfig x-oauth-scopes: - post-processing:update tags: - PostProcessing parameters: - $ref: '#/components/parameters/ProjectIdParameter' - $ref: '#/components/parameters/PostProcessingIdParameter' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostProcessingConfigRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GenericApiResponse' /api/{projectId}/post-processing/{postProcessingId}/samples/{sampleId}: post: summary: Check post-processing results for sample description: Retrieve post-processing results for a specific sample, e.g. whether it has generated features already. operationId: getPostProcessingResultsForSample x-oauth-scopes: - post-processing:read tags: - PostProcessing parameters: - $ref: '#/components/parameters/ProjectIdParameter' - $ref: '#/components/parameters/PostProcessingIdParameter' - $ref: '#/components/parameters/SampleIdParameter' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostProcessingFeaturesForSampleRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetPostProcessingResultsForSampleResponse' /api/{projectId}/post-processing/{postProcessingId}/samples/{sampleId}/classify: post: summary: Classify sample with post-processing description: Classify a sample using post-processing parameters. Sample should be in the post-processing dataset. operationId: generatePostProcessingFeaturesForSample x-oauth-scopes: - post-processing:run - jobs:run tags: - PostProcessing parameters: - $ref: '#/components/parameters/ProjectIdParameter' - $ref: '#/components/parameters/PostProcessingIdParameter' - $ref: '#/components/parameters/SampleIdParameter' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostProcessingFeaturesForSampleRequest' responses: '200': description: OK content: application/json: schema: anyOf: - $ref: '#/components/schemas/GetPostProcessingFeaturesForSampleResponse' - $ref: '#/components/schemas/StartJobResponse' components: schemas: PostProcessingConfig: type: object required: - enabled - parameters properties: enabled: type: boolean parameters: type: array items: $ref: '#/components/schemas/DSPGroupItem' ObjectTrackingPostProcessingResult: type: object required: - frames - parameters properties: frames: type: array items: type: object required: - frameIndex - objects properties: frameIndex: type: integer objects: type: array items: $ref: '#/components/schemas/ObjectTrackingPostProcessingObject' parameters: type: object additionalProperties: type: string StartJobResponse: allOf: - $ref: '#/components/schemas/GenericApiResponse' - type: object required: - id properties: id: type: integer description: Job identifier. Status updates will include this identifier. example: 12873488112 KerasModelVariantEnum: type: string enum: - int8 - float32 - akida PostProcessingFeaturesForSampleRequest: type: object required: - config - variant properties: config: $ref: '#/components/schemas/PostProcessingConfigRequest' variant: $ref: '#/components/schemas/KerasModelVariantEnum' GenericApiResponse: type: object required: - success properties: success: type: boolean description: Whether the operation succeeded error: type: string description: Optional error description (set if 'success' was false) PostProcessingConfigRequest: type: object required: - enabled - parameters properties: enabled: type: boolean parameters: type: object additionalProperties: type: string GetPostProcessingResultsForSampleResponse: allOf: - $ref: '#/components/schemas/GenericApiResponse' - type: object required: - hasResults properties: hasResults: type: string enum: - has-results - job-is-running - no-results results: type: object properties: objectTracking: $ref: '#/components/schemas/ObjectTrackingPostProcessingResult' objectDetection: $ref: '#/components/schemas/ObjectDetectionPostProcessingResult' jobIsRunning: type: object required: - jobId - config properties: jobId: type: integer config: $ref: '#/components/schemas/PostProcessingConfigRequest' ObjectTrackingPostProcessingObject: type: object required: - label - id - x - y - width - height properties: label: type: string id: type: integer x: type: number y: type: number width: type: number height: type: number ObjectDetectionPostProcessingResult: type: object required: - frames properties: frames: type: array items: type: object required: - frameIndex - objects properties: frameIndex: type: integer objects: type: array items: $ref: '#/components/schemas/ObjectDetectionPostProcessingObject' DSPGroupItem: type: object required: - name - type - param - defaultValue - readonly - shouldShow - required - showClickToSet properties: name: type: string example: Scale axes value: type: string defaultValue: type: string type: type: string example: text help: type: string example: Divide axes by this number param: type: string example: scale-axes selectOptions: type: array items: type: object properties: value: type: string description: What is the string that will be set if this option is selected? selected: type: boolean optionLabel: type: string description: What is the label that will be shown to the user for this option? priority: type: number description: The following options are optional. See Learn Block Auto Config in Notion. Higher priority will get chosen based on limits below. romEstimate: type: number description: Estimated ROM footprint for this choice. Will be tested against ROM budget in Studio. needsOps: type: array items: type: string description: ML operator needed by this choice. needsFeatures: type: array items: type: string description: Feature needed by this choice. (non op related) readonly: type: boolean shouldShow: type: boolean showIf: type: object required: - parameter - operator - value properties: parameter: type: string operator: type: string enum: - eq - neq value: type: string invalidText: type: string section: type: string description: Interface section to render parameter in. enum: - advanced - augmentation - modelProfiling multiline: type: boolean description: Only valid for type "string". Will render a multiline text area. required: type: boolean hint: type: string description: If set, shows a hint below the input. placeholder: type: string description: Sets the placeholder text on the input element (for types "string", "int", "float" and "secret") showClickToSet: type: boolean description: If enabled, render a disabled input element with 'Click to set' valid: type: array items: type: object description: Valid values for parameter. items: type: object description: Recursive definition for items of a parameter with type 'array'. properties: type: object description: Recursive definition for a parameter with type 'object'. minVal: type: number description: Minimum value for parameters of type 'int' or 'float'. maxVal: type: number description: Maximum value for parameters of type 'int' or 'float'. GetPostProcessingFeaturesForSampleResponse: allOf: - $ref: '#/components/schemas/GenericApiResponse' - type: object required: - results properties: results: type: object properties: objectTracking: $ref: '#/components/schemas/ObjectTrackingPostProcessingResult' objectDetection: $ref: '#/components/schemas/ObjectDetectionPostProcessingResult' PostProcessingConfigResponse: allOf: - $ref: '#/components/schemas/GenericApiResponse' - $ref: '#/components/schemas/PostProcessingConfig' ObjectDetectionPostProcessingObject: type: object required: - label - x - y - width - height - score properties: label: type: string x: type: number y: type: number width: type: number height: type: number score: type: number parameters: SampleIdParameter: name: sampleId in: path required: true description: Sample ID schema: type: integer PostProcessingIdParameter: name: postProcessingId in: path required: true description: Post-processing Block ID, use the impulse functions to retrieve the ID schema: type: integer ProjectIdParameter: name: projectId in: path required: true description: Project ID schema: type: integer securitySchemes: ApiKeyAuthentication: type: apiKey in: header name: x-api-key JWTAuthentication: type: apiKey in: cookie name: jwt JWTHttpHeaderAuthentication: type: apiKey in: header name: x-jwt-token OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: /v1/oauth/authorize tokenUrl: /v1/oauth/token scopes: openid: Access to basic profile information email: Access to email address profile: Access to full profile information implicit: authorizationUrl: /v1/oauth/authorize scopes: openid: Access to basic profile information email: Access to email address profile: Access to full profile information password: tokenUrl: /v1/oauth/token scopes: openid: Access to basic profile information email: Access to email address profile: Access to full profile information clientCredentials: tokenUrl: /v1/oauth/token scopes: openid: Access to basic profile information email: Access to email address profile: Access to full profile information