---
title: "Get all the fields details of the given Workflow / Lookup and stage name"
method: POST
path: "/api/Public/fields"
tags: ["Public"]
---

# Get all the fields details of the given Workflow / Lookup and stage name

`POST /api/Public/fields`

## Request

- Base URL: `https://apidocs.cflowapps.com` (the document declares no server; this is the origin it was published from)
- URL: `https://apidocs.cflowapps.com/api/Public/fields`
- Auth: API key in header `X-Api-Key` and API key in header `X-User-Key`
- TypeScript: <https://skmtc.dev/cflowapps/apis/cflow-public-api/docs/api/Public/fields/post.ts> (a function with typed inputs; its response is checked against the schema)

Sample request:
            
    POST 
    {
         "WorkflowName":"Test Workflow",
         "StageName":" Manager Approval"
    }

## Request body

- FieldRequest
  - `workflowName` string, required: Name of the worklfow / lookup
  - `stageName` string, required: For workflows, enter the workflow stage display name as stage name. For lookup workflows, enter the lookup name as the stage name.

## Response `200`

return list of field details

- FieldResponse
  - `sectionFields` FieldDetails[], nullable: Section Field Details
    - `displayName` string, nullable: Field Display Name
    - `fieldType` string, nullable: Field Type
    - `validValues` string[], nullable: Values that are valid for the field
    - `defaultValues` string, nullable: Default value in the field
    - `dataType` string, nullable: Data type of the field
    - `isMandatory` string, nullable: Indicates whether the field is mandatory
    - `isEnable` string, nullable: Indicates whether the field is enabled
    - `maxLength` string, nullable: Maximum length
    - `unique` string, nullable: Indicates whether the field value must be unique
    - `isVisible` string, nullable: Indicates whether the field is visible to the user
  - `tables` Tables[], nullable: Table Details
    - `tableName` string, nullable: Name of the table
    - `tableFields` FieldDetails[], nullable: Table Fields
      - `displayName` string, nullable: Field Display Name
      - `fieldType` string, nullable: Field Type
      - `validValues` string[], nullable: Values that are valid for the field
      - `defaultValues` string, nullable: Default value in the field
      - `dataType` string, nullable: Data type of the field
      - `isMandatory` string, nullable: Indicates whether the field is mandatory
      - `isEnable` string, nullable: Indicates whether the field is enabled
      - `maxLength` string, nullable: Maximum length
      - `unique` string, nullable: Indicates whether the field value must be unique
      - `isVisible` string, nullable: Indicates whether the field is visible to the user
  - `dateFormat` string, nullable: Date Format

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Workflow Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/cflowapps/apis/cflow-public-api.md) - [All operations](https://skmtc.dev/cflowapps/apis/cflow-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cflowapps/apis/cflow-public-api/revisions/af0dadd0ad10?raw)
