Collections can be used to group information for an API. Create a collection on the FireTail platform to easily view inventory data for that API. To create a collection, upload a JSON or YAML file into the platform.
1. Navigate to the APIs tab.
2. Select the API you want to create the collection for.
3. Click the Collections tab.
4. Click Upload Collection.
5. Navigate to where you have your .json or .yml file save and select that file.
If you have successfully uploaded the collection, you are taken directly to the collection page. If their is an error on the file, for example, if it formatted incorrectly or missing required information then an error message is displayed indicating what the problem is.
openapi: 3.0.3
info:
title: OpenAPI 3.0
description: This is a sample OpenAPI 3.0 specification.
version: 1.0.0
tags:
- name: user
description: Operations about user
paths:
/user:
post:
tags:
- user
summary: Create user
description: This can only be done by the logged in user.
operationId: createUser
requestBody:
description: Created user object
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'
responses:
default:
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
put:
tags:
- user
summary: Update user
description: This can only be done by the logged in user.
operationId: updateUser
parameters:
- name: username
in: path
description: name that need to be deleted
required: true
schema:
type: string
requestBody:
description: Update an existent user in the store
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'
responses:
default:
description: successful operation
delete:
tags:
- user
summary: Delete user
description: This can only be done by the logged in user.
operationId: deleteUser
parameters:
- name: username
in: path
description: The name that needs to be deleted
required: true
schema:
type: string
responses:
'400':
description: Invalid username supplied
'404':
description: User not found
components:
schemas:
User:
type: object
properties:
id:
type: integer
format: int64
example: 10
username:
type: string
example: theUser
firstName:
type: string
example: John
lastName:
type: string
example: James
email:
type: string
example: john@email.com
password:
type: string
example: '12345'
phone:
type: string
example: '12345'
userStatus:
type: integer
description: User Status
format: int32
example: 1
xml:
name: user
requestBodies:
UserArray:
description: List of user object
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
Upload a new version
You can replace the existing version of a collection by uploading a new collection. The new version must be a .json or .yml file.
Navigate to the Collections tab on the FireTail platform to view all the collections that you have created for that organisation.
Select the collection you want to replace with a new version.
Click Upload a new version.
Browse to where the required file is located, select the file and click Open.
Delete a collection
Navigate to the Collections tab on the FireTail platform to view all the collections that you have created for that organisation.
Select the collection you want to delete.
Click the bin icon in the upper-right corner of the screen.