Sweep Expired App Data
curl --request POST \
--url https://api.launchmystore.io/api/v1/app-data/sweep-expired \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/app-data/sweep-expired"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/app-data/sweep-expired', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/app-data/sweep-expired",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/app-data/sweep-expired"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/app-data/sweep-expired")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/app-data/sweep-expired")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyApp Data
Sweep Expired App Data
Remove your app records whose TTL has passed
POST
/
api
/
v1
/
app-data
/
sweep-expired
Sweep Expired App Data
curl --request POST \
--url https://api.launchmystore.io/api/v1/app-data/sweep-expired \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/app-data/sweep-expired"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/app-data/sweep-expired', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/app-data/sweep-expired",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/app-data/sweep-expired"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/app-data/sweep-expired")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/app-data/sweep-expired")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDeletes every record of your app whose
ttlSeconds has passed. Reads
already skip expired records, so this is housekeeping — call it from a
scheduled job to keep short-lived records (OAuth state, idempotency markers)
from piling up.
App data is authenticated with your app’s client credentials, not a
store’s access token — so your app can read what it stored (for example a
store’s access token) before it has a token to use:Records are private to your app.
Authorization: Basic base64(<client_id>:<client_secret>)
storeId is a partition you choose: pass
the store’s id to keep a record per store, or omit it for app-wide records.Request
curl -X POST "https://api.launchmystore.io/api/v1/app-data/sweep-expired" \
-H "Authorization: Basic $(printf '%s:%s' "$CLIENT_ID" "$CLIENT_SECRET" | base64)"
Response
{
"status": 200,
"state": "success",
"message": null,
"data": { "deleted": 12 }
}
Errors
| Status | Description |
|---|---|
401 | Missing, malformed or wrong client credentials |