Skip to main content

FowApps Standarts

FowApps is designed in accordance with OAS3 guidelines. The response scheme is predefined.

This API returns a standardized response objects for all situations. None of endpoint returns directly main object of result. All of responses are placed into ApiResult object.

Successful and unsuccessful requests are as follows.

WARNING: This scheme is used at v1.0 or higher Api Versions.

Parameters of ApiResult

NameTypeRequiredDescription
SuccessbooleanInformation about if proccess resulted successfully or not.
KeystringType of response. Also each error has their own key. It's more like error code.
Dataobject / Generic<T>Contains main data of response. Data can be null with some unsuccessful requests.
MetaobjectMetadata about response, like pagination page counts or depricated elements etc.
MessagestringMessage about request. Mostly unseuccessful requests have message about it.
IsUserFriendlyMessagebooleanIndicates if Message comes from resources and readable by directly users or not.

Examples

  • A Successful listing result:
{
"success": true,
"key": "OK",
"message": "Completed operation successfully.",
"data": [
{
"id": "1234",
"title": "Hello World!"
},
{
"id": "1235",
"title": "Hello World 2!"
}
],
"meta": {
"total": 2,
"page": 1,
"perPage": 10,
"totalPages": 1
}
}
  • A badrequest result:
{
"message": "EntityNotFound System.Object[]",
"isUserFriendlyMessage": true,
"key": "EntityNotFound",
"errorCode": 1000,
"instance": "469492af-2982-49ce-9d85-88b0b0a60182"
}
  • An internal server error result:
{
"message": "Unhandled Exception",
"isUserFriendlyMessage": false,
"key": "InternelServerError",
"errorCode": 5000
}

Requests

Our API requests use JSON format. To make JSON formatted request, make sure you provide Content-Type: application/json in HTTP request headers. Our API supports UTF-8 for character encoding.

MethodDescription
GETUsed for get or filter data
POSTUsed for create data
PUTUsed for replace data
PATCHUsed for modify data
DELETEUsed for delete data

Url Naming

All our endpoints contain a common naming convention.

Names are used to name URIs

Generally, URIs are named with nouns that indicate the content of the resource, rather than adding a verb for the function being performed. For example, https://api.example.com/users is used instead of https://api.example.com/getUsers.

Intuitive, clear, unabridged names

Endpoints are intuitive and clear URL names are used. Abbreviations are not used in endpoints.

Slashes to denote URI hierarchy

Endpoints are typically structured in a hierarchy.

Going from left to right ("/") each progresses from the general to the specific.

For example, https://api.example.com/users/123/first-name will retrieve the first name of the user with ID number 123.

Separate words with hyphens

When a REST API endpoint contains multiple words (e.g. https://api.example.com/users/123/first-name), we separated the words using hyphens.

Lowercase Letters

Whenever possible, used lowercase letters in we API URLs. This is mainly because the RFC 3986 specification for URI standards denotes that URIs are case-sensitive (except for the scheme and host components of the URL). Lowercase letters for URIs are in widespread use, and also help avoid confusion about inconsistent capitalization.

Avoid special characters

Special characters are not only unnecessary, they can also be confusing for users and technically complex. Because URLs can only be sent and received using the ASCII character set, all of we API URLs contain only ASCII characters.

In addition, try to avoid the use of "unsafe" ASCII characters, which are typically encoded in order to prevent confusion and security issues (e.g. "%20" for the space character). "Unsafe" ASCII characters for URLs include the space character (" "), as well as brackets ("[]"), angle brackets ("<>"), braces ("{}"), and pipes ("|").

Http Status Codes

CodeConstantReason Phrase
100CONTINUEContinue
101SWITCHING_PROTOCOLSSwitching Protocols
102PROCESSINGProcessing
200OKOK
201CREATEDCreated
202ACCEPTEDAccepted
203NON_AUTHORITATIVE_INFORMATIONNon Authoritative Information
204NO_CONTENTNo Content
205RESET_CONTENTReset Content
206PARTIAL_CONTENTPartial Content
207MULTI_STATUSMulti-Status
300MULTIPLE_CHOICESMultiple Choices
301MOVED_PERMANENTLYMoved Permanently
302MOVED_TEMPORARILYMoved Temporarily
303SEE_OTHERSee Other
304NOT_MODIFIEDNot Modified
305USE_PROXYUse Proxy
307TEMPORARY_REDIRECTTemporary Redirect
308PERMANENT_REDIRECTPermanent Redirect
400BAD_REQUESTBad Request
401UNAUTHORIZEDUnauthorized
402PAYMENT_REQUIREDPayment Required
403FORBIDDENForbidden
404NOT_FOUNDNot Found
405METHOD_NOT_ALLOWEDMethod Not Allowed
406NOT_ACCEPTABLENot Acceptable
407PROXY_AUTHENTICATION_REQUIREDProxy Authentication Required
408REQUEST_TIMEOUTRequest Timeout
409CONFLICTConflict
410GONEGone
411LENGTH_REQUIREDLength Required
412PRECONDITION_FAILEDPrecondition Failed
413REQUEST_TOO_LONGRequest Entity Too Large
414REQUEST_URI_TOO_LONGRequest-URI Too Long
415UNSUPPORTED_MEDIA_TYPEUnsupported Media Type
416REQUESTED_RANGE_NOT_SATISFIABLERequested Range Not Satisfiable
417EXPECTATION_FAILEDExpectation Failed
418IM_A_TEAPOTI'm a teapot
419INSUFFICIENT_SPACE_ON_RESOURCEInsufficient Space on Resource
420METHOD_FAILUREMethod Failure
421MISDIRECTED_REQUESTMisdirected Request
422UNPROCESSABLE_ENTITYUnprocessable Entity
423LOCKEDLocked
424FAILED_DEPENDENCYFailed Dependency
428PRECONDITION_REQUIREDPrecondition Required
429TOO_MANY_REQUESTSToo Many Requests
431REQUEST_HEADER_FIELDS_TOO_LARGERequest Header Fields Too Large
451UNAVAILABLE_FOR_LEGAL_REASONSUnavailable For Legal Reasons
500INTERNAL_SERVER_ERRORInternal Server Error
501NOT_IMPLEMENTEDNot Implemented
502BAD_GATEWAYBad Gateway
503SERVICE_UNAVAILABLEService Unavailable
504GATEWAY_TIMEOUTGateway Timeout
505HTTP_VERSION_NOT_SUPPORTEDHTTP Version Not Supported
507INSUFFICIENT_STORAGEInsufficient Storage
511NETWORK_AUTHENTICATION_REQUIREDNetwork Authentication Required