> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nfig.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get completion status of individual step



## OpenAPI

````yaml api-reference/openapi-spec.json get /apis/request/workflow/step/status/{stepId}
openapi: 3.0.0
info:
  title: nFig Agent Backend
  description: nFig Agent Backend
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nfig.ai
    description: Production server
security:
  - bearer: []
tags:
  - name: nFig
    description: ''
paths:
  /apis/request/workflow/step/status/{stepId}:
    get:
      tags:
        - Workflow Step Mode APIs
      summary: Get completion status of individual step
      operationId: ExternalApisController_getWorkflowStepRunStatus
      parameters:
        - name: stepId
          required: true
          in: path
          description: Unique identifier for each step
          example: 92a7a42a-ee05-8abb-e0ed250d6c79
          schema:
            type: string
      responses:
        '200':
          description: Get a workflow step run status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StepRunStatusRes'
      security:
        - apiKey: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl --request GET \

            --url https://api.nfig.ai/apis/request/workflow/step/status/<stepId>
            \

            --header 'api-key: <api-key>'
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://api.nfig.ai/apis/request/workflow/step/status/<stepId>"

            headers = {
                "api-key": "<api-key>"
            }


            response = requests.get(url, headers=headers)

            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const url =
            'https://api.nfig.ai/apis/request/workflow/step/status/<stepId>';

            const headers = {
                'api-key': '<api-key>'
            };


            fetch(url, {
                method: 'GET',
                headers: headers
            })

            .then(response => response.json())

            .then(data => console.log(data))

            .catch(error => console.error('Error:', error));
        - lang: php
          label: PHP
          source: >-
            <?php

            $url =
            "https://api.nfig.ai/apis/request/workflow/step/status/<stepId>";

            $headers = array(
                "api-key: <api-key>"
            );


            $ch = curl_init();

            curl_setopt($ch, CURLOPT_URL, $url);

            curl_setopt($ch, CURLOPT_HTTPGET, true);

            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);


            $response = curl_exec($ch);

            curl_close($ch);

            echo $response;

            ?>
        - lang: go
          label: Go
          source: |-
            package main

            import (
                "encoding/json"
                "fmt"
                "net/http"
            )

            func main() {
                url := "https://api.nfig.ai/apis/request/workflow/step/status/<stepId>"
                
                req, _ := http.NewRequest("GET", url, nil)
                req.Header.Set("api-key", "<api-key>")
                
                client := &http.Client{}
                resp, err := client.Do(req)
                if err != nil {
                    panic(err)
                }
                defer resp.Body.Close()
                
                var result map[string]interface{}
                json.NewDecoder(resp.Body).Decode(&result)
                fmt.Println(result)
            }
        - lang: java
          label: Java
          source: |-
            import java.net.HttpURLConnection;
            import java.net.URL;
            import java.io.BufferedReader;
            import java.io.InputStreamReader;

            public class WorkflowStepStatus {
                public static void main(String[] args) {
                    try {
                        URL url = new URL("https://api.nfig.ai/apis/request/workflow/step/status/<stepId>");
                        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                        conn.setRequestMethod("GET");
                        conn.setRequestProperty("api-key", "<api-key>");
                        
                        BufferedReader in = new BufferedReader(
                            new InputStreamReader(conn.getInputStream()));
                        String inputLine;
                        StringBuffer response = new StringBuffer();
                        while ((inputLine = in.readLine()) != null) {
                            response.append(inputLine);
                        }
                        in.close();
                        
                        System.out.println(response.toString());
                        conn.disconnect();
                    } catch(Exception e) {
                        e.printStackTrace();
                    }
                }
            }
components:
  schemas:
    StepRunStatusRes:
      type: object
      properties:
        goal:
          type: string
          description: Goal to be executed
          example: Go to amazon.com
        type:
          type: string
          enum:
            - ACT
            - ASK
          description: Whether the goal is Ask or Act type
        status:
          type: string
          enum:
            - INITIATED
            - COMPLETED
            - FAILED
            - STOPPED
          description: Status of the step
      required:
        - goal
        - type
        - status
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: api-key

````