Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

REST API

Tatsuro Shibamura edited this page Dec 25, 2022 · 1 revision

If you only want to use the API externally, disable App Service Authentication and use the Azure Functions Host Key to execute the API.

Common Headers

  • X-Functions-Key
    • Functions Host Key
  • Content-Type
    • application/json

Add Certificate

Request

POST /api/certificate

Payload

{
  "dnsNames": [
    "example.com",
    "www.example.com"
  ],
  "managedEnvironmentId": "container-apps-environment-resource-id",
  "bindToContainerApp": true,
  "containerAppId": "container-app-resource-id"
}

Response

202 Accepted
Location: /api/state/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
400 Bad Request

{
  "errors": {
    "DnsNames": [
      "The DnsNames is required."
    ]
  },
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "traceId": "00-e2468d29d2988e4490e92e2768b622b0-92d30024b7066e4d-00"
}
401 Unauthorized

Async request polling

Request

GET /api/state/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Response

200 OK
202 Accepted
Location: /api/state/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
500 Internal Server Error