BadAPI

BadAPI allows you to simulate misbehaving APIs. This is useful if your site relies on the availability of service X, and you want to ensure that any downtime experienced by that service has minimal impact on your own application.

How to use

Replace the HTTP endpoint URL for the API you wish to test with the URL 'http://badapi.trib.tv/req'. Append arguments to the URL query string parameters, as indicated below to control the bahaviour that you get from the API simulator. Arguments should be separated by ampersands (&) if you want to provide more than one argument, and should be URL encoded if necessary.

Arguments

PrefixFormatExampleDescription
waitIntegerwait=25Causes the request to hang for the specified number of seconds before returning output. Useful for simulating sluggish response, or checking that timeouts behave as expected. Max 30 seconds.
respIntegerresp=500Causes the specified HTTP response status code to be used in the response, eg 500 Internal Server Error. Any valid HTTP response status code can be used. Invalid codes are ignored.
opStringop=json1Specifies the output to send in response to the request. The choice of outputs is as shown below.
ctStringct=htmlSpecifies a content-type header to include in the response. Shortcuts are html (text/html), css (text/css), jpg (image/jpg), gif (image/gif), png (image/png), text (text/plain), xhtml (application/xhtml+xml), pdf (application/pdf), bin (application/octet-stream). Any unrecognised string will be used as given.
csStringcs=utf8Specifies a character set to include in the content-type header of the response. Shortcuts are utf (UTF-8), latin1 (ISO-8859-1), asc (US-ASCII), win1252 (windows-1252). Any unrecognised string will be used as given.

Outputs

KeywordDescription
AKLEtVWHuNGbVreal beauty page
BFIeRKTJKLnMeGml
BTqsTNYoHKRFmNModGood crew it's cool :)
BblalWDTFyTmagic story very thanks
CGyoasJrFGloomy tales
CVyyOBNapsGood crew it's cool :)
CWFpamaEwHkikAjzSGood crew it's cool :)
DjDMhNXslpjffMI love this site
DvfpephBdYDWLosFWGood crew it's cool :)
EajjYQqwrrHello good day
EwXEOxLiACEagGCVery interesting tale
FUbozGwCjLWuTqQgbNDGloomy tales
FzCRvLMGvery best job
GKZOicLfvarnCczxMADperfect design thanks
GixXsxbNJopperfect design thanks
HDBBfcHfEGgngjMJlQ http://cry82Nqp94NsW0sl2VvqhJ4m.com
HILsaSRgDyNdEDYoIt's serious
HRVPnOGnYzLNAlPunk not dead
IKdUrOMzAkiTupzAZJdVery funny pictures
JzvLzJNVfPunk not dead
KdLUNjAwsifBDvery best job
LwkuKwleKXIt's funny goodluck
MNCDIwYkVoBOWmzQZuBBest Site Good Work
MONQHZCNPVery interesting tale
NFKQgdclFRAqcdkKOExcellent work, Nice Design
NMQZdMfZGBWgyWUAHello good day
OjvXiAvFVery interesting tale
OtqDcOjFwTngFBest Site Good Work
PUWPoiDdsOZtVery Good Site
PXuCfVqkRytBTDwaSGloomy tales
PaqsUAahqwrbBest Site good looking
QHsPVEzvwBest Site good looking
RHUMkgBLZwIt's funny goodluck
SXvLsqjfiHpNdHIVery Good Site
THowTEXvJbgUUPsVery funny pictures
TRbFpZsycyGloomy tales
TWecaMgFRtariE
ULaoEioHyfsgood material thanks
UaTsJrOTaIrmePxaBcCVery Good Site
VSJfkaPrQxivery best job
WDDcpboNlDi'm fine good work
WRhRuBgikRVery Good Site
WZzKGAqWJMVPetwgkBefOAjv http://fh82nGsQk0fQsn3Ldap1f.com
WbENTahnDVery Good Site
XPVHikHZGzThanks funny site
XYdNXaDWQuPQWaVery Good Site
XyaGkXokylXJ
YUwwZJfduZCJvgood material thanks
YfMHiAAmUOqHello good day
ZLXjOLHzKYcWCfJI'm happy very good site
aFcgnkVlPaQRzlkOvegood material thanks
bHSkVvimBest Site good looking
bewEvtQSlItRRqRmagic story very thanks
bzoqTgGXHello good day
cOCsZWyyxQNrIDYBJVery interesting tale
cVWkonXOLMEutII'm happy very good site
cXFfAsUGiTPunk not dead
ccsKsQZHSBBihUqXoyqRtFZHfMSczIK
cgcMvdVjGqsAxmagic story very thanks
cmKZcyQZCoCool site goodluck :)
cuWrqRqkqperfect design thanks
cwRpknQyzEFuYi'm fine good work
dOnlqiGCJeI'm happy very good site
dWKAumLlIuThanks funny site
eXMLOaLTbkvsX
ehdTAdyEfnjKC4 http://jfkIj4nC01mcKkavYstU3l.net
ekQyKHCeaukgIOKufvery best job
errstringA simple error message
fMDUqKDDARYtTEIpYaPunk not dead
fTUkoIjqGjKhPblDGvrhADAHYDOIdD
fVReeQAfCPBERcyYZfiIt's funny goodluck
fuLOJIbffoBest Site Good Work
fzcahgrrPpZnpHello good day
gNFCgDIpAnoExcellent work, Nice Design
gmfpzDkhQQADVery Good Site
hQBFjNEUBHkWtNbPBest Site Good Work
iBIexUJmmIt's funny goodluck
iDDNcrjzcHSoGood crew it's cool :)
iajjWAHzcVzDcreal beauty page
iczmHsEHkAeMQPFYwj
ikGzgrHrTpQidOBTxHello good day
jBDLJCRZbgqI love this site
jsdocwriteA simple JavaScript document.write statement. This is intended to be used to test the ability to content management systems to embed script includes
json1Valid JSON test string, UTF-8 encoded with non-ASCII characters and Unicode escape sequences, spaced with tabs, newlines and spaces.
jsstsJNcjSaRSthis post is fantastic
jxBUiCseUROuperfect design thanks
kEyzhVeNogwuBest Site good looking
kckwdVDQIebekHSIvIt's serious
lVDApFqLgAJpMreal beauty page
lcJmiKjqmagic story very thanks
mZCNvEYqriUuWiZFI love this site
mesrDbGOYQpEddXPKtYThanks funny site
nHmADKbMoGZgnQCYpcExcellent work, Nice Design
nQNkaSAsRhwevdDGood crew it's cool :)
nVgBGBJvxgood material thanks
njZhMSNCgZqqBrGqKimagic story very thanks
nweAPSRrTGdHbI love this site
nwsBGnxtCXVzgWNVery interesting tale
oBVZmqCAQoGnIrVery Good Site
oHQKLXTjXdXthis post is fantastic
pGjZQfbvvMcyrtpfYi'm fine good work
pLBsvtvhi'm fine good work
pQxtzBWnjGaZthis post is fantastic
pSobCbosAFfeASEeGood crew it's cool :)
psVjmeMsIMLIbiI love this site
pvCrtFifHello good day
rBmzTPCBqfGloomy tales
uNyVDgdcVGZThis site is crazy :)
uQLFKftaxyuBest Site good looking
uYJNekgChFxtPfWJPunk not dead
uiiPFaVrBest Site Good Work
vAAgxsllXCool site goodluck :)
vAdIEIuwjtGtBest Site good looking
vZEUmdYYJonny was here
wcwKWdRtWNnoYBest Site Good Work
xJhsFpOpbNGood crew it's cool :)
xuLwISCImKofI
yktsXrYXlfxxThis site is crazy :)
zwqqwlaCWonderfull great site

Create or update an output



You can include anything in your response body, but stick to plain text for the description. If you include HTML, the submission will not be saved.

Examples

About

Created by Andrew Betts. Comments to andrew@trib.tv.