AppAIGatewayDocs

Poll a CLI operation

GET
/v1/cli/operations/{id}

Only the operation's token can read it. Completed claims report the account they landed on; the CLI keeps the access it already had. Provider secrets are never returned; a one-time key an operation created is, for 15 minutes. A login's key is returned once, by the first completed answer, and never when the login registered a loopback redirect. A step a person declined answers expired with denied: true.

Authorization

CliPollProof
AuthorizationBearer <token>

The initiating CLI's private operation token, distinct from the browser's approval proof.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/cli/operations/string"
{  "id": "string",  "kind": "bootstrap",  "state": "pending",  "denied": true,  "expiresAt": "string",  "url": "http://example.com",  "deployment": {    "id": "string",    "mode": "cloud",    "apiUrl": "http://example.com",    "consoleOrigin": "http://example.com"  },  "result": {    "credential": {      "token": "string"    },    "unclaimedAccess": {      "endsAt": "string",      "limit": 0    },    "accountId": "string",    "app": {      "revision": 1,      "id": "string",      "name": "string",      "config": {        "authentication": {          "type": "apple_app_attest",          "end_user": {            "source": "issuer",            "issuer": {              "jwks_url": "http://example.com",              "issuer": "string",              "audience": "string",              "user_id_claim": "string",              "token_header": "string",              "required_claims": [                {                  "path": "string",                  "contains": "string",                  "equals": "string"                }              ],              "max_token_lifetime_seconds": 1,              "provider": "firebase",              "entitlement": "revenuecat"            }          },          "app_attest": {            "team_id": "string",            "bundle_id": "string",            "environments": [              "production"            ],            "verify_on": "every_request"          }        },        "routing": {          "providers": {            "mode": "all"          },          "model_rewrites": {            "property1": "string",            "property2": "string"          }        },        "limits": {},        "endpoints": {}      },      "status": "active",      "created_at": "string",      "updated_at": "string",      "warnings": [        {          "code": "string",          "message": "string",          "until": "string",          "docs_url": "string"        }      ]    },    "api_key": {      "id": "string",      "name": "string",      "key": "string",      "key_prefix": "string",      "created_at": "string"    },    "provider": {      "id": "string",      "type": "openai",      "slug": "string",      "name": "string",      "secretHint": "string",      "providerGatewayId": "string",      "gatewayRoute": {        "modelPrefix": "string",        "providerOnly": [          "string"        ]      },      "baseUrl": "string",      "pricing": {        "property1": {          "input": 0,          "output": 0,          "cached_input": 0,          "cache_write": 0,          "cache_write_1h": 0,          "image_input": 0,          "audio_input": 0,          "video_input": 0,          "image_output": 0,          "long_input": 0,          "long_output": 0,          "long_cached_input": 0,          "long_cache_write": 0,          "long_cache_write_1h": 0,          "long_context_threshold": 1        },        "property2": {          "input": 0,          "output": 0,          "cached_input": 0,          "cache_write": 0,          "cache_write_1h": 0,          "image_input": 0,          "audio_input": 0,          "video_input": 0,          "image_output": 0,          "long_input": 0,          "long_output": 0,          "long_cached_input": 0,          "long_cache_write": 0,          "long_cache_write_1h": 0,          "long_context_threshold": 1        }      },      "route": "direct",      "capability": {        "apiStyles": [          "responses"        ],        "endpointStyles": [          "responses"        ],        "modelPrefix": "string",        "paths": "provider"      },      "revision": 1,      "status": "active",      "createdAt": "string",      "createdBy": "string"    },    "gateway": {      "id": "string",      "name": "string",      "secretHint": "string",      "providerCount": 0,      "referencedCount": 0,      "revision": 1,      "status": "active",      "createdAt": "string",      "updatedAt": "string",      "createdBy": "string",      "type": "cf_aig",      "config": {        "accountId": "string",        "gatewayId": "string"      }    }  },  "account": {    "id": "string",    "name": "string",    "createdAt": "string",    "claimed": true,    "expiresAt": "string"  }}