Table of Contents Created by gh-md-toc
GET api.pasteme.cn/:key
| Name | Type | Description |
|---|---|---|
| key | string | Paste key |
Content-Type: application/json
| Name | Type | Description |
|---|---|---|
| status | int | request status code |
| lang | string | Paste content's language |
| content | text | Paste content |
{
"status": 200,
"lang": "bash",
"content": "echo Hello"
}| Method | URL | Description |
|---|---|---|
POST |
api.pasteme.cn |
Create a permanent paste |
POST |
api.pasteme.cn/once |
Create a temporary paste with random key |
Content-Type: application/json
| Name | Type | Description | Required |
|---|---|---|---|
| lang | string | Paste content's language | Yes |
| content | text | Paste's content | Yes |
| password | string | Paste's password | No |
{
"lang": "bash",
"content": "echo Hello"
}or
{
"lang": "bash",
"content": "echo Hello",
"password": "password"
}Content-Type: application/json
| Name | Type | Description |
|---|---|---|
| status | string | Request status code |
| key | string | Paste's key |
{
"status": 201,
"key": "100"
}PUT api.pasteme.cn/:key
| Name | Type | Description |
|---|---|---|
| key | string | Paste key |
Content-Type: application/json
| Name | Type | Description | Required |
|---|---|---|---|
| lang | string | Paste content's language | Yes |
| content | text | Paste's content | Yes |
| password | string | Paste's password | No |
{
"lang": "bash",
"content": "echo Hello"
}or
{
"lang": "bash",
"content": "echo Hello",
"password": "password"
}Content-Type: application/json
| Name | Type | Description |
|---|---|---|
| status | string | Request status code |
| key | string | Paste's key |
{
"status": 201,
"key": "100"
}Content-Type: application/json
| Name | Type | Description |
|---|---|---|
| status | int | Request status code |
| error | string | Error content |
| message | string | Error's detail |
{
"status": 401,
"error": "unauthorized",
"message": "wrong password"
}