This is the apilab.co internal API.
It's currently "version 0.x" and will become 1.0 when it's no longer potentially subject to breaking changes.
curl --request POST \ --url https://apilab.co/api/v0/users/register \ --data-urlencode email=$EMAIL
Create a new account.
curl --request POST \ --url https://apilab.co/api/v0/users/login \ --data-urlencode email=$EMAIL \ --data-urlencode password=$PASSWORD
Log in to a user account. A successful response sets a session cookie (session
).
curl --request POST \ --url https://apilab.co/api/v0/users/logout \ --cookie session=$SESSION
Log out of a session.
curl --request POST \ --url https://apilab.co/api/v0/users/password \ --cookie session=$SESSION \ --data-urlencode current=$CURRENT \ --data-urlencode new=$NEW
Change the user's password.
curl --request GET \ --url https://apilab.co/api/v0/users/domain \ --cookie session=$SESSION
Return the subdomain of apilab.co your published APIs are served from (e.g. company, which signifies company.apilab.co).
curl --request PUT \ --url https://apilab.co/api/v0/users/domain \ --cookie session=$SESSION \ --data-urlencode domain=$DOMAIN
Set the subdomain of apilab.co to publish your APIs from (https://{domain}.apilab.co/).
curl --request GET \ --url https://apilab.co/api/v0/docs \ --cookie session=$SESSION
Return a list of the API documents in this account.
curl --request POST \ --url https://apilab.co/api/v0/docs \ --cookie session=$SESSION \ --form source=$SOURCE
Create a new document from the source text.
A unique URL (not used by any existing document) is generated from title
and version
of the OAS spec and returned in the response.
curl --request GET \ --url "https://apilab.co/api/v0/docs/$URL?format=$FORMAT" \ --cookie session=$SESSION
Get the document source code or generated HTML.
If format
is oas3
the OAS 3.0 source of the document is returned, encoded as YAML or JSON.
If format
is html
the formatted output document is returned.
curl --request PUT \ --url https://apilab.co/api/v0/docs/$URL \ --cookie session=$SESSION \ --form source=$SOURCE
Replace the source code of the document located at url
and generate new formatted HTML.
curl --request DELETE \ --url https://apilab.co/api/v0/docs/$URL \ --cookie session=$SESSION
Delete the document. It can be undeleted during a grace period of about 15 minutes.
curl --request PATCH \ --url "https://apilab.co/api/v0/docs/$URL?operation=$OPERATION" \ --cookie session=$SESSION \ --data-urlencode url=$URL \ --data-urlencode publish=$PUBLISH
Perform an operation selected by the operation
parameter: move
(change the document's URL), publish
(publish or unpublish it) or undelete
(reverse a recent deletion).
curl --request POST \ --url https://apilab.co/api/v0/samples/docs \ --cookie session=$SESSION \ --data-urlencode doc=$DOC
curl --request POST \ --url https://apilab.co/api/v0/draft \ --form source=$SOURCE
Format a document that does not yet exist (a "draft"). The generated HTML is returned, but the document is not saved.
curl --request POST \ --url https://apilab.co/api/v0/chat/send \ --cookie session=$SESSION \ --form message=$MESSAGE