Password Pusher API fersiwn 2
BETADogfennaeth gynhwysfawr REST API ar gyfer integreiddio Password Pusher i mewn i'ch cymwysiadau
Hysbysiad Beta: Mae API v2 ar hyn o bryd mewn beta. Er ein bod wedi gwneud pob ymdrech i sicrhau sefydlogrwydd, efallai y bydd newidiadau torfol cyn y datganiad terfynol. Rydym yn croesawu eich adborth!
Ceisiadau
Mae ceisiadau yn galluogi cyfathrebu diogel, dwyffordd ar gyfer casglu gwybodaeth sensitif. Crëwch gais gydag URL cyfrinachol, rhannwch ef ag unrhyw un, a derbyniwch ymatebion diogel sy'n cynnwys testun neu ffeiliau—a hynny i gyd heb ddatgelu data sensitif mewn e-bost, sgwrs, na logiau.
Perffaith ar gyfer casglu manylion mewngofnodi, allweddi API, dogfennau cyfrinachol, neu unrhyw wybodaeth sensitif gan gydweithwyr, cleientiaid, neu gwsmeriaid. Mae ymatebion yn cael eu hamgryptio'n awtomatig ac yn cael eu dileu'n awtomatig ar ôl cyfnod penodol i leihau amlygiad data. Mae olrhain cylch bywyd llawn ar gael yn logiau archwilio pob cais.
Mae gan geisiadau dair cyflwr:
POST /api/v2/requests
Yn creu cais newydd. Angen dilysu.
Request Body (JSON)
{
"request": {
"request": "Please provide your hosting information here.",
"close_after_duration": 8,
"passphrase": "optional_passphrase",
"name": "Database Access Request",
"note": "Internal note",
"retrieval_step": true,
"include_requestor": false,
"response_file_attachments": true
}
}
Request Body with Files (multipart/form-data)
curl -X POST https://eu.pwpush.com/api/v2/requests \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "request[request]=Please provide your hosting information here." \
-F "request[close_after_duration]=8" \
-F "request[name]=Database Access Request" \
-F "request[files][]=@/path/to/document.pdf" \
-F "request[files][]=@/path/to/spreadsheet.xlsx"
Note: When attaching files, use multipart/form-data format. Multiple files can be attached using request[files][].
Parameters
| Parameter | Type | Description |
|---|---|---|
request
angenrheidiol
|
string | Y neges/testun cais i'w rhannu |
close_after_duration
dewisol
|
integer (0-17) | Enum hyd - pryd i gau'r cais |
passphrase
dewisol
|
string | Gofyn i dderbynwyr nodi'r cyfrinair hwn i weld |
name
dewisol
|
string | Enw a ddangosir yn y dangosfwrdd, hysbysiadau ac e-byst |
note
dewisol
|
string | Nodyn mewnol (dim ond yn weladwy i'r crëwr) |
retrieval_step
dewisol
|
boolean | Yn helpu i atal systemau sgwrsio a sganwyr URL rhag bwyta golygfeydd |
include_requestor
dewisol
|
boolean | Cynnwys gwybodaeth y ceisydd yn y cais |
response_file_attachments
dewisol
|
boolean | Caniatáu atodiadau ffeiliau mewn ymatebion |
files
dewisol
|
array | Ffeil(iau) i'w huwchlwytho a'u hatodi i'r cais |
notify_emails_to
dewisol
|
string | Cyfeiriadau e-bost i gael gwybod pan fydd cais yn cael ei greu (wedi'u gwahanu gan goma) |
notify_emails_to_locale
dewisol
|
string | Lleoliad (iaith) i anfon hysbysiad(au) e-bost ynddo |
account_id
dewisol
|
integer | ID y cyfrif i gysylltu'r cais ag ef |
Gwerthoedd Hyd ar gyfer close_after_duration
Cais Enghraifft
curl -X POST https://eu.pwpush.com/api/v2/requests \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"request": {
"request": "Please provide your hosting information here.",
"close_after_duration": 8,
"passphrase": "optional_passphrase",
"name": "Database Access Request"
}
}'
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://eu.pwpush.com/api/v2/requests')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request['Content-Type'] = 'application/json'
request.body = {
request: {
request: 'Please provide your hosting information here.',
close_after_duration: 8,
passphrase: 'optional_passphrase',
name: 'Database Access Request'
}
}.to_json
response = http.request(request)
puts response.body
import requests
import json
url = 'https://eu.pwpush.com/api/v2/requests'
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
data = {
'request': {
'request': 'Please provide your hosting information here.',
'close_after_duration': 8,
'passphrase': 'optional_passphrase',
'name': 'Database Access Request'
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
$headers = @{
'Authorization' = 'Bearer YOUR_API_TOKEN'
'Content-Type' = 'application/json'
}
$body = @{
request = @{
request = 'Please provide your hosting information here.'
close_after_duration = 8
passphrase = 'optional_passphrase'
name = 'Database Access Request'
}
} | ConvertTo-Json -Depth 10
$response = Invoke-RestMethod -Uri 'https://eu.pwpush.com/api/v2/requests' `
-Method Post `
-Headers $headers `
-Body $body
$response | ConvertTo-Json
GET /api/v2/requests/:url_token
Yn nôl cynnwys cais agored neu barod. Gall hyn gau'r cais os yw wedi'i ffurfweddu i gau ar ôl nifer penodol o ymweliadau.
Cais Enghraifft
curl -X GET https://eu.pwpush.com/api/v2/requests/orpw2wkg00vpn0a
Cais Enghraifft gyda Chyfrinair
curl -X GET "https://eu.pwpush.com/api/v2/requests/orpw2wkg00vpn0a?passphrase=your_passphrase"
Ymateb Enghraifft (Cais Agored)
{
"close_after_duration": 8,
"url_token": "orpw2wkg00vpn0a",
"retrieval_step": true,
"passphrase": "optional_passphrase",
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:00:00.000Z",
"state": "open",
"include_requestor": false,
"response_file_attachments": true,
"close_after_at": "2023-11-04T10:00:00.000Z",
"days_remaining": 8,
"json_url": "https://eu.pwpush.com/r/orpw2wkg00vpn0a.json",
"html_url": "https://eu.pwpush.com/r/orpw2wkg00vpn0a",
"request": "Please provide your hosting information here.",
"response": null,
"files": []
}
Ymateb Enghraifft (Cais Parod)
{
"close_after_duration": 8,
"url_token": "orpw2wkg00vpn0a",
"retrieval_step": true,
"passphrase": "optional_passphrase",
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:00:00.000Z",
"state": "ready",
"include_requestor": false,
"response_file_attachments": true,
"close_after_at": "2023-11-04T10:00:00.000Z",
"days_remaining": 8,
"json_url": "https://eu.pwpush.com/r/orpw2wkg00vpn0a.json",
"html_url": "https://eu.pwpush.com/r/orpw2wkg00vpn0a",
"request": null,
"response": "The API key is: sk_live_1234567890",
"files": []
}
Nodyn: Os oes gan y cais gyfrinair, cynhwyswch ef fel paramedr ymholiad: ?passphrase=your_passphrase. Mae adfer cais yn cyfrif fel golygfa a gall gau'r cais os yw'n cyrraedd ei derfyn golygfeydd.
PATCH /api/v2/requests/:url_token/respond
Yn ymateb i gais agored, gan newid ei gyflwr i 'barod'.
Request Body (JSON)
{
"request": {
"response": "The API key is: sk_live_1234567890"
}
}
Request Body with Files (multipart/form-data)
curl -X PATCH https://eu.pwpush.com/api/v2/requests/orpw2wkg00vpn0a/respond \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "request[response]=The API key is: sk_live_1234567890" \
-F "request[files][]=@/path/to/response_doc.pdf"
Note: When attaching files, use multipart/form-data format. Multiple files can be attached using request[files][].
Paramedrau
| Paramedr | Math | Disgrifiad |
|---|---|---|
response
angenrheidiol
|
string | Y testun/neges ymateb i'r cais |
files
dewisol
|
array | Ffeil(iau) i'w hatodi i'r ymateb (angenrheidiol response_file_attachments: true ar y cais) |
Nodyn: Dim ond ceisiadau yn y cyflwr "agored" all dderbyn ymatebion. Unwaith y bydd ymateb wedi'i gyflwyno, mae'r cais yn symud i'r cyflwr "parod" ac ni all dderbyn ymatebion ychwanegol.
GET /api/v2/requests/:url_token/preview
Yn dychwelyd URL cyfrinachol cwbl gymwys cais heb adfer y cynnwys.
Cais Enghraifft
curl -X GET https://eu.pwpush.com/api/v2/requests/orpw2wkg00vpn0a/preview
Ymateb Enghraifft
{
"url": "https://eu.pwpush.com/r/orpw2wkg00vpn0a"
}
GET /api/v2/requests/:url_token/audit
Yn dychwelyd y log archwilio ar gyfer cais. Mae angen dilysu a pherchnogaeth.
Paramedrau'r Ymholiad:
page (dewisol): Rhif tudalen ar gyfer tudalennau.
- Diofyn:
1(tudalen gyntaf) - Ystod:
1i200 - Yn dychwelyd hyd at 50 o gofnodion log archwilio fesul tudalen
- Enghraifft:
?page=2i adfer yr ail dudalen
Cais Enghraifft
curl -X GET https://eu.pwpush.com/api/v2/requests/orpw2wkg00vpn0a/audit \
-H "Authorization: Bearer YOUR_API_TOKEN"
Ymateb Enghraifft
{
"logs": [
{
"ip": "192.168.1.100",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"referrer": null,
"kind": "creation",
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:00:00.000Z"
},
{
"ip": "192.168.1.101",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
"referrer": "https://example.com",
"kind": "view",
"created_at": "2023-10-27T10:05:00.000Z",
"updated_at": "2023-10-27T10:05:00.000Z"
},
{
"ip": "192.168.1.102",
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15",
"referrer": null,
"kind": "response",
"created_at": "2023-10-27T10:10:00.000Z",
"updated_at": "2023-10-27T10:10:00.000Z"
}
]
}
Nodyn: Y kind Mae'r maes yn nodi'r math o weithred a gofnodwyd. Mae gwerthoedd cyffredin yn cynnwys: creation, view, response, close, failed_passphrase, a failed_view.
DELETE /api/v2/requests/:url_token
Yn cau cais ar unwaith ac yn dileu'n barhaol yr holl ddata sensitif sy'n gysylltiedig ag ef. Mae'r weithred hon yn anghildroadwy ac ni ellir ei dadwneud. Mae angen dilysu a pherchnogaeth.
Cais Enghraifft
curl -X DELETE https://eu.pwpush.com/api/v2/requests/orpw2wkg00vpn0a \
-H "Authorization: Bearer YOUR_API_TOKEN"
Ymateb Enghraifft
{
"close_after_duration": null,
"url_token": "orpw2wkg00vpn0a",
"retrieval_step": false,
"passphrase": null,
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:15:00.000Z",
"state": "closed",
"include_requestor": false,
"response_file_attachments": false,
"close_after_at": null,
"days_remaining": null,
"json_url": "https://eu.pwpush.com/r/orpw2wkg00vpn0a.json",
"html_url": "https://eu.pwpush.com/r/orpw2wkg00vpn0a",
"account_id": 1,
"note": null,
"name": null,
"request": null,
"response": null,
"files": []
}
GET /api/v2/requests/active
Yn dychwelyd rhestr dudalennau o'ch ceisiadau gweithredol (ar agor neu barod). Angen dilysu.
GET /api/v2/requests/open
Yn dychwelyd rhestr dudalennau o'ch ceisiadau agored. Angen dilysu.
GET /api/v2/requests/ready
Yn dychwelyd rhestr dudalennau o'ch ceisiadau parod. Angen dilysu.
GET /api/v2/requests/closed
Yn dychwelyd rhestr dudalennau o'ch ceisiadau caeedig. Angen dilysu.
Paramedrau'r Ymholiad:
page (dewisol): Rhif tudalen ar gyfer tudalennau.
- Diofyn:
1(tudalen gyntaf) - Ystod:
1i200 - Yn dychwelyd hyd at 50 o geisiadau fesul tudalen
- Enghraifft:
?page=2i adfer yr ail dudalen
Gwladwriaethau Cais
Agor
Mae'r cais wedi'i greu ac mae'n aros am ymateb. Mae testun y cais yn weladwy, ond nid oes ymateb wedi'i ddarparu eto.
Parod
Mae'r cais wedi cael ymateb ac mae bellach yn cynnwys llwyth y ymateb. Nid yw testun y cais yn weladwy mwyach, ond mae'r ymateb ar gael i'w adfer.
Ar gau
Mae'r cais wedi cael ei drin ac mae'r holl ddata sensitif (y cais a'r ymateb) wedi'i ddileu'n barhaol. Mae'r cyflwr hwn yn anghildroadwy.
Cais Enghraifft (Gweithredol)
curl -X GET https://eu.pwpush.com/api/v2/requests/active \
-H "Authorization: Bearer YOUR_API_TOKEN"
Cais Enghraifft (Agored)
curl -X GET https://eu.pwpush.com/api/v2/requests/open \
-H "Authorization: Bearer YOUR_API_TOKEN"
Cais Enghraifft (Parod)
curl -X GET https://eu.pwpush.com/api/v2/requests/ready \
-H "Authorization: Bearer YOUR_API_TOKEN"
Cais Enghraifft (Wedi'i Gau)
curl -X GET https://eu.pwpush.com/api/v2/requests/closed \
-H "Authorization: Bearer YOUR_API_TOKEN"
Ymateb Enghraifft
[
{
"close_after_duration": 7,
"url_token": "abc123xyz789",
"retrieval_step": false,
"passphrase": null,
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:00:00.000Z",
"state": "open",
"include_requestor": false,
"response_file_attachments": false,
"close_after_at": "2023-11-03T10:00:00.000Z",
"days_remaining": 7,
"json_url": "https://eu.pwpush.com/r/abc123xyz789.json",
"html_url": "https://eu.pwpush.com/r/abc123xyz789",
"account_id": 1,
"note": null,
"name": null
},
{
"close_after_duration": 7,
"url_token": "def456uvw012",
"retrieval_step": false,
"passphrase": null,
"created_at": "2023-10-26T15:30:00.000Z",
"updated_at": "2023-10-27T09:00:00.000Z",
"state": "ready",
"include_requestor": false,
"response_file_attachments": false,
"close_after_at": "2023-11-02T15:30:00.000Z",
"days_remaining": 6,
"json_url": "https://eu.pwpush.com/r/def456uvw012.json",
"html_url": "https://eu.pwpush.com/r/def456uvw012",
"account_id": 1,
"note": null,
"name": null
}
]
Nodyn: Y /active ceisiadau dychwelyd pwynt terfynol yn y ddau open a ready taleithiau. Defnyddiwch /open neu /ready pwyntiau terfyn i hidlo yn ôl cyflwr penodol.
Diweddarwyd ddiwethaf: July 12, 2026