Mutation

update_site_api_definition_enabled_endpoints

Updates the enabled endpoints for an API Definition.

Arguments

input: UpdateSiteApiDefinitionEnabledEndpointsInput!

The fields used to specify which site you want to update, and the API definition.


Input Fields

id(): ID!
The unique identifier of the API definition to be updated
enabled_endpoints(): [ApiEndpointInput!]!
A list of the enabled API endpoints.

Return Fields

site(): Site
The updated site.

Example

Query
mutation UpdateSiteApiDefinitionEnabledEndpoints($input: UpdateSiteApiDefinitionEnabledEndpointsInput!) {
  update_site_api_definition_enabled_endpoints(input: $input) {
    site {
      id
      api_definitions {
        id
        file_based_api_definition {
          filename
          enabled_endpoints {
            id
          }
        }
      }
    }
  }
}
Variables
{
  "input": {
    "enabled_endpoints": [
      {
        "id": "https://api.example.com /orders POST application/json"
      }
    ],
    "id": "155d6a7a-a109-324f-86ae-dea2b4b50976"
  }
}
Result
{
  "data": {
    "update_site_api_definition_enabled_endpoints": {
      "site": {
        "id": "1",
        "api_definitions": [
          {
            "id": "155d6a7a-a109-324f-86ae-dea2b4b50976",
            "file_based_api_definition": {
              "filename": "openapi.json",
              "enabled_endpoints": [
                {
                  "id": "https://api.example.com /orders POST application/json"
                }
              ]
            }
          }
        ]
      }
    }
  }
}