Import API

This version is in Beta, there may be issues we're still working out.

Imports

Imports Overview

{
  "type": "swagger",
String

The type of the linked import

  "id": "766338787893577572",
String

Unique identifier representing the linked Import

  "links": {
  "links": { ... }
Object

Links

    "self": "https://api.gelato.io/v1/imports/123"
String

A URL pointing to the linked import

  }
}

Show Import Details

Open in API Explorer
GET /imports/{id}

This will get the details of an individual import for you.

Example Request

Format:
curl --request GET \
  --url 'https://api.gelato.io/v1/imports/766338787893577572?apikey=c79fddcba2cf4fc19ac2c0d112a77b9f'

Query Parameters

Name Type Required Description Example
apikey String Required

The API key used to access the Gelato API

c79fddcba2cf4fc19ac2c0d112a77b9f

Path Parameters

Name Type Required Description Example
id String Required

The ID of the import to return. You can find this in your import response.

766338787893577572

Responses

200 OK

Import details

Imports Import
{
  "id": "766338787893577572",
String

Unique identifier representing this Import

  "type": "swagger",
String

The type of this import

  "status": "in_progress",
String

Whether or not this import has been successfully processed

  "message": "foo"
String

Any parse messages or validation issues with this import

}

Create a new Import

Open in API Explorer
POST /imports

Creates a new Import in Gelato

Example Request

Format:
curl --request POST \
  --url 'https://api.gelato.io/v1/imports?apikey=c79fddcba2cf4fc19ac2c0d112a77b9f&api_id=766336463049590515&import_type=swagger&file_location=https%253A%252F%252Fyourhost.com%252Ffile.yml&api_version_id=766338826648946533'

Query Parameters

Name Type Required Description Example
apikey String Required

The API key used to access the Gelato API

c79fddcba2cf4fc19ac2c0d112a77b9f
api_id String Required

The API you'd like to import your Swagger file into

766336463049590515
import_type String Required

The type of definition you'd like to import. At the moment this must be swagger

swagger
file_location String Required

The publicly accessible location of the file you'd like to import.

https%3A%2F%2Fyourhost.com%2Ffile.yml
api_version_id String Optional

The API Version you'd like to import into. Use this to override the documentation for an existing version. If this is blank, a new version will be created. If you don't include api_version_id in the request, be sure to include the basePath in your OpenAPI (Swagger) spec.

766338826648946533

Responses

202 Accepted

A link to the newly created Import job.

Imports Import link
{
  "type": "swagger",
String

The type of the linked import

  "id": "766338787893577572",
String

Unique identifier representing the linked Import

  "links": {
  "links": { ... }
Object

Links

    "self": "https://api.gelato.io/v1/imports/123"
String

A URL pointing to the linked import

  }
}