Skip to main content
Flexible Top Header
Solved

v2 API deployments endpoint statuses?

  • January 10, 2026
  • 4 replies
  • 68 views

Forum|alt.badge.img+2

Anyone know why the swagger scheme lists “CANCEL” as the only enum for “status” on the endpoint?  I’m looking for all valid values and I know at minimum there are “DONE” and “FAILED” but the schema for some reason only lists CANCEL (and that seems to be true for all deployment types in the schema).

 

 

Best answer by awertkin

I am creating an issue for you -- I believe this is a defect in the swagger docs.  In the mean time and in general, for each resource type, it is possible to get the list of order-able and filter-able fields, along with valid comparators and values programmatically via the API.  For example, for deployments:

{{bam_url}}/api/v2/deployments?limit=0&supportedOrderByFields=true&supportedFilterFields=true

This will yield:
 

{
"count": 0,
"supportedOrderByFields": [
"status",
"id",
"user.name",
"startDateTime",
"user.id"
],
"supportedFilterFields": [
{
"name": "type",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"FullDeployment",
"DifferentialDeployment",
"QuickDeployment",
"SelectiveDeployment",
"ValidationDeployment"
]
},
{
"name": "service",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"DHCPv4",
"DHCPv6",
"DNS",
"TFTP"
]
},
{
"name": "user.id",
"acceptedType": "<number>",
"acceptedOperators": [
"EQ",
"NE",
"GT",
"GE",
"LT",
"LE",
"IN"
]
},
{
"name": "user.name",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"CONTAINS",
"STARTS_WITH",
"ENDS_WITH",
"IN"
]
},
{
"name": "startDateTime",
"acceptedType": "<iso8601_datetime>",
"acceptedOperators": [
"EQ",
"NE",
"GT",
"GE",
"LT",
"LE",
"IN"
]
},
{
"name": "method",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"MANUAL",
"SCHEDULED",
"INTERNAL",
"DYNAMIC_UPDATE"
]
},
{
"name": "state",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"NOT_RUN",
"PENDING",
"QUEUED",
"RUNNING",
"CANCELLED",
"CANCELLING",
"COMPLETED",
"COMPLETED_WITH_ERRORS",
"COMPLETED_WITH_WARNINGS",
"FAILED",
"UNKNOWN"
]
},
{
"name": "status",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"EXECUTING",
"INITIALIZING",
"QUEUED",
"CANCELLED",
"FAILED",
"NOT_DEPLOYED",
"WARNING",
"INVALID",
"DONE",
"NO_RECENT_DEPLOYMENT",
"CANCELLING"
]
},
{
"name": "message",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"CONTAINS",
"STARTS_WITH",
"ENDS_WITH",
"IN"
]
},
{
"name": "completionDateTime",
"acceptedType": "<iso8601_datetime>",
"acceptedOperators": [
"EQ",
"NE",
"GT",
"GE",
"LT",
"LE",
"IN"
]
}
],
"data": []
}

 

4 replies

awertkin
  • BlueCat Employee
  • Answer
  • January 11, 2026

I am creating an issue for you -- I believe this is a defect in the swagger docs.  In the mean time and in general, for each resource type, it is possible to get the list of order-able and filter-able fields, along with valid comparators and values programmatically via the API.  For example, for deployments:

{{bam_url}}/api/v2/deployments?limit=0&supportedOrderByFields=true&supportedFilterFields=true

This will yield:
 

{
"count": 0,
"supportedOrderByFields": [
"status",
"id",
"user.name",
"startDateTime",
"user.id"
],
"supportedFilterFields": [
{
"name": "type",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"FullDeployment",
"DifferentialDeployment",
"QuickDeployment",
"SelectiveDeployment",
"ValidationDeployment"
]
},
{
"name": "service",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"DHCPv4",
"DHCPv6",
"DNS",
"TFTP"
]
},
{
"name": "user.id",
"acceptedType": "<number>",
"acceptedOperators": [
"EQ",
"NE",
"GT",
"GE",
"LT",
"LE",
"IN"
]
},
{
"name": "user.name",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"CONTAINS",
"STARTS_WITH",
"ENDS_WITH",
"IN"
]
},
{
"name": "startDateTime",
"acceptedType": "<iso8601_datetime>",
"acceptedOperators": [
"EQ",
"NE",
"GT",
"GE",
"LT",
"LE",
"IN"
]
},
{
"name": "method",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"MANUAL",
"SCHEDULED",
"INTERNAL",
"DYNAMIC_UPDATE"
]
},
{
"name": "state",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"NOT_RUN",
"PENDING",
"QUEUED",
"RUNNING",
"CANCELLED",
"CANCELLING",
"COMPLETED",
"COMPLETED_WITH_ERRORS",
"COMPLETED_WITH_WARNINGS",
"FAILED",
"UNKNOWN"
]
},
{
"name": "status",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"IN"
],
"acceptedValues": [
"EXECUTING",
"INITIALIZING",
"QUEUED",
"CANCELLED",
"FAILED",
"NOT_DEPLOYED",
"WARNING",
"INVALID",
"DONE",
"NO_RECENT_DEPLOYMENT",
"CANCELLING"
]
},
{
"name": "message",
"acceptedType": "<string>",
"acceptedOperators": [
"EQ",
"NE",
"CONTAINS",
"STARTS_WITH",
"ENDS_WITH",
"IN"
]
},
{
"name": "completionDateTime",
"acceptedType": "<iso8601_datetime>",
"acceptedOperators": [
"EQ",
"NE",
"GT",
"GE",
"LT",
"LE",
"IN"
]
}
],
"data": []
}

 


awertkin
  • BlueCat Employee
  • January 11, 2026

Formatting looks a little suss of the JSON result, at least on my browser.  For deployment status specially, that API yields: 

      "acceptedValues": [
        "NOT_RUN",
        "PENDING",
        "QUEUED",
        "RUNNING",
        "CANCELLED",
        "CANCELLING",
        "COMPLETED",
        "COMPLETED_WITH_ERRORS",
        "COMPLETED_WITH_WARNINGS",
        "FAILED",
        "UNKNOWN"
      ]


Forum|alt.badge.img+2
  • Author
  • Verified Resolver
  • January 11, 2026

Awesome, thank you ​@awertkin !  The tip regarding supportedOrderByFields and supportedFilterFields would be great info to have in the API guides.


awertkin
  • BlueCat Employee
  • January 11, 2026

Agreed, and on it.