Skip to content

Instantly share code, notes, and snippets.

@ernestohs
Created April 8, 2017 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ernestohs/258ad4f60714d7b2e15e95e4ad429cd6 to your computer and use it in GitHub Desktop.
Save ernestohs/258ad4f60714d7b2e15e95e4ad429cd6 to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
title: Eldo SMPP API
description: Send SMS messages via SMPP using queue(s)
version: "1.0.0"
# the domain of the service
# host: api.uber.com
# array of all schemes that your API supports
# schemes:
# - http
# will be prefixed to all paths
# basePath: /v1
produces:
- application/json
paths:
/messages:
get:
summary: Messages
description: |
The Messages endpoint returns information about messages
sent by POST
offered by given params
parameters:
- name: conditions
in: query
description: Half of MYSQL WHERE condition (for example when conditions=id=30 means the query will look like (...WHERE id=30...) etc.)
required: false
type: string
format: string
- name: limit
in: query
description: Number of outputted elements.
required: false
type: number
format: int
- name: offset
in: query
description: Number of elements to offset.
required: false
type: number
format: int
- name: order
in: query
description: Name of column to order by.
required: false
type: number
format: int
tags:
- Messages
responses:
200:
description: An array of messages
schema:
type: array
items:
$ref: '#/definitions/Message'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
post:
summary: Messages
description: |
Send new message to queue
parameters:
- name: recipient
in: query
description: phone number of recipient
required: true
type: number
format: number
- name: text
in: query
description: message text
required: true
type: number
format: int
tags:
- Messages
responses:
200:
description: An array of messages
schema:
$ref: '#/definitions/Message'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Message:
type: object
properties:
id:
type: string
description: Unique identifier representing a specific message.
recipient:
type: string
description: Phone number of recipient.
text:
type: string
description: SMS text message.
status:
type: string
description: SMS status 0 - not sent, 1 - sent by queue.
ref_id:
type: string
description: Unique identifier of SMS received from SMPP (when not NULL means than SMS is sent).
created_at:
type: string
description: When message was created by POST.
updated_at:
type: string
description: When message was updated (usually means when message was sent).
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
fields:
type: string
# Added by API Auto Mocking Plugin
host: virtserver.swaggerhub.com
basePath: /AC7ION/eldo-smpp-api/1.0.0
schemes:
- https
- http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment