Swagger API Lab API Reference

API mocks for use with GitLab

See https://gitlab.com/gitlab-org/apilab

API Endpoint
https://apilab.gitlap.com
Schemes: https
Version: 1.0.0

Pets

Everything about your Pets

GET /pets

Returns all pets, optionally filtered by one or more criteria

tags

Filters pets by one or more tags

format
comma separated (tags=aaa,bbb)
type
string[]
in
query
type

Filters pets by type (dog, cat, or bird)

type
string , x ∈ { cat , dog , bird }
in
query
age

Filters pets by age

type
integer
in
query
dob

Filters pets by date of birth

type
string (date)
in
query
vet.name

Filters pets by veterinarian name

type
string
in
query
default
pet

Returns the matching pets

Response Example (default )
[
  {
    "age": "integer",
    "dob": "string(date)",
    "name": "string",
    "tags": "array",
    "type": "string",
    "vet": {
      "$ref": "#/definitions/veterinarian"
    }
  }
]

DELETE /pets

Deletes all pets, optionally filtered by one or more criteria

tags

Filters pets by one or more tags

format
comma separated (tags=aaa,bbb)
type
string[]
in
query
type

Filters pets by type (dog, cat, or bird)

type
string , x ∈ { cat , dog , bird }
in
query
age

Filters pets by age

type
integer
in
query
dob

Filters pets by date of birth

type
string (date)
in
query
vet.name

Filters pets by veterinarian name

type
string
in
query
default
pet

Returns the pets that were deleted

Response Example (default )
[
  {
    "age": "integer",
    "dob": "string(date)",
    "name": "string",
    "tags": "array",
    "type": "string",
    "vet": {
      "$ref": "#/definitions/veterinarian"
    }
  }
]

POST /pets

Creates a new pet in the store

pet

The pet to add to the store

Request Example
{
  "age": "integer",
  "dob": "string(date)",
  "name": "string",
  "tags": "array",
  "type": "string",
  "vet": {
    "$ref": "#/definitions/veterinarian"
  }
}
201 Created
pet

Returns the newly-added pet

Response Example (201 Created)
{
  "age": "integer",
  "dob": "string(date)",
  "name": "string",
  "tags": "array",
  "type": "string",
  "vet": {
    "$ref": "#/definitions/veterinarian"
  }
}

GET /pets/{petName}

Returns a pet by name

(no description)

in
default
pet

Returns the pet data

Response Example (default )
{
  "age": "integer",
  "dob": "string(date)",
  "name": "string",
  "tags": "array",
  "type": "string",
  "vet": {
    "$ref": "#/definitions/veterinarian"
  }
}

DELETE /pets/{petName}

Deletes a single pet based on the name supplied

(no description)

in
default
pet

Returns the pet that was deleted

Response Example (default )
{
  "age": "integer",
  "dob": "string(date)",
  "name": "string",
  "tags": "array",
  "type": "string",
  "vet": {
    "$ref": "#/definitions/veterinarian"
  }
}

PATCH /pets/{petName}

Updates a pet by name

pet

The updated pet info

(no description)

in
Request Example
{
  "age": "integer",
  "dob": "string(date)",
  "name": "string",
  "tags": "array",
  "type": "string",
  "vet": {
    "$ref": "#/definitions/veterinarian"
  }
}
default
pet

Returns the updated pet data

Response Example (default )
{
  "age": "integer",
  "dob": "string(date)",
  "name": "string",
  "tags": "array",
  "type": "string",
  "vet": {
    "$ref": "#/definitions/veterinarian"
  }
}

Users

Interact with and retrive data about a user

POST /users

Creates a new user in the store

The user to add to the store

Request Example
{
  "id": "string",
  "username": "string"
}
201 Created

Returns the newly-added user

Response Example (201 Created)
{
  "id": "string",
  "username": "string"
}

GET /users/{userId}

Returns a user by user ID

(no description)

in
default

Returns the user

Response Example (default )
{
  "id": "string",
  "username": "string"
}

PATCH /users/{userId}

Updates a user by user ID

The updated user info

(no description)

in
Request Example
{
  "id": "string",
  "username": "string"
}
default

Returns the updated user data

Response Example (default )
{
  "id": "string",
  "username": "string"
}

POST /users/{userId}/snippets

Creates a new snippet in the store

The snippet to add to the store

(no description)

in
Request Example
{
  "id": "string",
  "name": "string",
  "text": "string"
}
201 Created

Returns the newly-added snippet

Response Example (201 Created)
{
  "id": "string",
  "name": "string",
  "text": "string"
}

GET /users/{userId}/snippets/{id}

Returns a snippet by ID

(no description)

in
id

The ID of the snippet

type
string
in
path
default

Returns the snippet

Response Example (default )
{
  "id": "string",
  "name": "string",
  "text": "string"
}

PATCH /users/{userId}/snippets/{id}

Updates a snippet by ID

The updated snippet info

(no description)

in
id

The ID of the snippet

type
string
in
path
Request Example
{
  "id": "string",
  "name": "string",
  "text": "string"
}
default

Returns the updated snippet data

Response Example (default )
{
  "id": "string",
  "name": "string",
  "text": "string"
}

Models

pet: object

name: string (at least 4 chars)
age: integer
dob: string (date)
type: string , x ∈ { cat , dog , bird }
vet: veterinarian
tags: string[]

snippet: object

id: string
name: string
text: string

user: object

id: string (at least 16 chars)
username: string (at least 4 chars)

veterinarian: object

name: string (at least 1 chars)