Mutation

report_found_api

Adds found API to the API finder. The API may be newly found or an update to an API that has already been onboarded.

Arguments

input: ReportFoundApiInput!


Input Fields

unique_api_id(): ID!
Unique identifier for this found API. This field will be used distinguish between newly found APIs and updates to onboarded APIs.
title(): String!
Human-readable title for this API.
The API definition.

Return Fields

The status of the found API.
parse_error(): String
The error message if the API definition could not be parsed. Null if parsing succeeded.

Example

Query
mutation ReportFoundApi($input: ReportFoundApiInput!) {
  report_found_api(input: $input) {
    status
    parse_error
  }
}
Variables
{
  "input": {
    "api_definition": {
      "contents": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"title\": \"Orders API\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"https://api.example.com\"\n    }\n  ],\n  \"paths\": {\n    \"/orders\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of orders\"\n          }\n        }\n      }\n    }\n  }\n}\n"
    },
    "title": "Orders API",
    "unique_api_id": "orders-api"
  }
}
Result
{
  "data": {
    "report_found_api": {
      "status": "new",
      "parse_error": null
    }
  }
}