Pastebin API

Listing Pastes

.Maui Pastebin API to list all your pastes.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

cmd String

Currently only the LS command is supported to display your pastes (max 500)

True

limit String

Takes two numeric arguments separated by comma (ex: 10,10). The first argument specifies the offset of the first file to return, and the second specifies the maximum number of files to return. Default is 0,500.

False

beauty Boolean

Format your JSON to make it more readable. Default is false.

False

 

The text is excluded for performance reasons. To obtain the text of a single paste, call the get function.

 

Success 200

It will be a JSON string

HTTP/1.1 200 OK         
{
    "1": {
        "title": "Raspberry Pi controllo led pagina html",
        "date": "2017-01-03T07:05:56.979",
        "language": "html",
        "author": "DotMaui",
        "UID": "ZOYxLQv7",
        "exposure": "public",
        "url": "https://dotmaui.com/pastebin/ZOYxLQv7",
        "expiration": "never"
    },
    "2": {
        "title": "Pyserver",
        "date": "2017-02-14T13:18:02.372",
        "language": "python",
        "author": "DotMaui",
        "UID": "7Q4VOFl5",
        "exposure": "public",
        "url": "https://dotmaui.com/pastebin/7Q4VOFl5",
        "expiration": "never"
    }
}

Create New Paste

.Maui Pastebin API to create a new paste.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/new/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

text String

The text of your paste

True

title String

The title of the paste. Default is Untitled

False

author String

The author of the paste. Default is A Guest

False

language String

The language to determine the syntax highlighting. Default is text.

False

exposure String

"public" or "private". Default is public.

False

theme String

For the complete list of themes see this paste.

False

expiration String

For the complete list of accepted values see this paste. Default is N (never).

False

 

Success 200

It will be a JSON string with the url and the UID of the new paste.

HTTP/1.1 200 OK         
{
    "UID": "2ujGg8IA",
    "url": "https://dotmaui.com/pastebin/2ujGg8IA"
}
<?php

$data = array("apikey"   => "YOUR_API_KEY", 
              "text"     => "My Text.",
              "title"    => "My Title",
              "language" => "text",
              "theme"    => "pastel-on-dark");

$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/new/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;

Get a complete Paste

.Maui Pastebin API to get a complete paste by UID.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/get/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

uid String

The UID of your paste

True

 

Success 200

It will be a JSON string.

HTTP/1.1 200 OK         
{
    "url": "https://dotmaui.com/pastebin/hexsntl4",
    "expiration": "never",
    "date": "2017-11-02T13:24:01.142",
    "author": "DotMaui",
    "exposure": "public",
    "title": "SambucaJS v0.1",
    "text": "Sambuca JavaScript Library v0.1",
    "language": "javascript",
    "UID": "hexsntl4"
}
<?php

$data = array("apikey"   => "YOUR_API_KEY", 
              "UID"     => "AQSWDEFR");

$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/get/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;

Delete a Paste

.Maui Pastebin API to delete a paste by UID.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/del/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

uid String

The UID of your paste

True

 

Success 200

It will be a JSON string with the result of the operation.

HTTP/1.1 200 OK         
{
    "code": "OK",
    "result": "Successfully deleted"
}
<?php

$data = array("apikey"   => "YOUR_API_KEY", 
              "UID"     => "AQSWDEFR");

$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/del/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;

* Only for premium users.