Skip to content

create graphql api versions

Pongstr edited this page Mar 24, 2022 · 1 revision

title: 'Create graphQL API Versions' description: '' updated: '2022-03-13T01:07:33.533Z' group: 'API Version' breadcrumb: ['API Version'] author: 'RapidAPI'

create graphQL API Versions

Request

Request Headers
X-RapidAPI-Key:  6176a4b1b7msh79f63eb622dd69cp1284cdjsn762fc4839b13
X-RapidAPI-Host:  rAPIdAPI-graphqlAPI.p.rAPIdAPI.xyz
Content-Type:  application/json; charset=utf-8
Cookie:  jwt_auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzc5MTc0NSwibWFzaGFwZUlkIjoiNWY0NGM5YzMwOGNiMDIxMjNhODc3MWMzIiwib3JpZ2luX3NpdGUiOiJwbGF0Zm9ybS1hcGkiLCJpc05ld1VzZXIiOmZhbHNlLCJpc0F1dGhlbnRpY2F0ZWRCeVNTTyI6ZmFsc2UsImVtYWlsIjpudWxsLCJpYXQiOjE2NDcxMDQ2ODQsImV4cCI6MTY3ODY0MDY4NH0.0O6WT0z5x5CWbnDExjdca3UTWhrANZTyR3AnMS-sdyw; connect.sid=s%3AFRLLS9Tl-mDqOnaR4gsW17uQxc24CJHs.Wd2tZlhb9%2BFnZOHwsjcVQsgNJb%2F1NG6P0Ax0E3HiX8I
Request URL Parameters
Empty URL Parameters
GraphQL: Variables
{
  "gqlAPI VersionCreateInput": [
    {
      "API": "API_4c9f7cc1-2171-490f-b21e-15efb69e739b",
      "name": "v2",
      "introspectionCallUrl": "https://API.spacex.land/graphql/",
      "isIntrospectionCall": true
    }
  ]
}
GraphQL: Mutation
mutation ($gqlAPI VersionCreateInput: [GqlAPI VersionCreateInput!]!) {
  createGqlAPI Versions(gqlAPI Versions: $gqlAPI VersionCreateInput) {
    id
    API
    current
    description
    longDescription
    name
    pricing
    status
    keywords
    type
    createdAt
    updatedAt
    visibility
    APIInstance {
      id
    }
    kafkaConfiguration {
      kafkaConfiguration {
        brokers
      }
    }
    webhooks
    websiteUrl
    payloads {
      id
    }
    accessControl {
      secretParameters {
        id
      }
    }
    endpoints {
      id
    }
    groups {
      id
    }
    publicdns {
      id
    }
    billingplans {
      id
    }
    headlines {
      id
    }
    billingitems {
      id
    }
    billingitemendpoints {
      id
    }
    publicBillingPlanVersions {
      id
    }
    billingfeatures {
      id
    }
    authentication {
      id
    }
    targetGroup {
      id
    }
    targetGroupId
    transformations {
      id
    }
    versionStatus
    APISubType
    certificateRecordAssignments {
      API VersionId
    }
  }
}

Response

Response Headers
Request URL: https://rAPIdAPI-graphqlAPI.p.rAPIdAPI.xyz/
Status Code: HTTP/1.1 200 OK

Content-Type:  application/json; charset=utf-8
Access-Control-Allow-Origin:  *
Set-Cookie:  jwt_auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzc5MTc0NSwibWFzaGFwZUlkIjoiNWY0NGM5YzMwOGNiMDIxMjNhODc3MWMzIiwib3JpZ2luX3NpdGUiOiJwbGF0Zm9ybS1hcGkiLCJpc05ld1VzZXIiOmZhbHNlLCJpc0F1dGhlbnRpY2F0ZWRCeVNTTyI6ZmFsc2UsImVtYWlsIjpudWxsLCJpYXQiOjE2NDYwNjEzNzIsImV4cCI6MTY3NzU5NzM3Mn0.ud_EVdA-PqaKI_6RsqP6AZu7tvjn3pWgar7hasdTsDM; Max-Age=31536000; Path=/; Expires=Tue, 28 Feb 2023 15:16:12 GMT; HttpOnly; Secure; SameSite=Strict
Server:  RapidAPI-1.2.8
X-Download-Options:  noopen
X-Correlation-Id:  005c1644-88e5-4c69-b622-a9dbb84fd3df
X-XSS-Protection:  1; mode=block
X-RapidAPI-Region:  AWS - us-east-1
Date:  Mon, 28 Feb 2022 15:16:12 GMT
Strict-Transport-Security:  max-age=15552000; includeSubDomains
X-RapidAPI-Version:  1.2.8
Content-Length:  1193
Connection:  Close
X-Content-Type-Options:  nosniff
Etag:  W/"4a9-CSEROZ85qGWVKRbmZQBtjHto3fU"
X-DNS-Prefetch-Control:  off
X-Frame-Options:  SAMEORIGIN

Response Body
{
  "errors": [
    {
      "message": "Request failed with status code 400 At createAPI Version",
      "path": ["createGqlAPI Versions"],
      "extensions": {
        "code": {
          "errors": [
            {
              "status": 400,
              "title": "Bad Request",
              "details": "API version name - v2 already exists",
              "source": "/v3/API/API_4c9f7cc1-2171-490f-b21e-15efb69e739b/version"
            }
          ],
          "took": 6
        },
        "correlationId": "005c1644-88e5-4c69-b622-a9dbb84fd3df",
        "exception": {
          "stacktrace": [
            "GraphQLError: Request failed with status code 400 At createAPI Version",
            "    at Object.relocatedError (/usr/local/rAPIdAPI-API/rAPIdAPI-API/node_modules/@graphql-tools/utils/index.js:3247:12)",
            "    at mergeDataAndErrors (/usr/local/rAPIdAPI-API/rAPIdAPI-API/node_modules/@graphql-tools/delegate/index.js:1021:34)",
            "    at checkResultAndHandleErrors (/usr/local/rAPIdAPI-API/rAPIdAPI-API/node_modules/@graphql-tools/delegate/index.js:1009:38)",
            "    at Transformer.transformResult (/usr/local/rAPIdAPI-API/rAPIdAPI-API/node_modules/@graphql-tools/delegate/index.js:1111:16)",
            "    at /usr/local/rAPIdAPI-API/rAPIdAPI-API/node_modules/@graphql-tools/delegate/index.js:1336:28",
            "    at runMicrotasks (<anonymous>)",
            "    at processTicksAndRejections (internal/process/task_queues.js:95:5)"
          ]
        }
      }
    }
  ],
  "data": null
}
Clone this wiki locally