Skip to main content
POST
/
bulk
cURL
curl --request POST \
  --url https://api.osohq.com/api/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "delete": [
    {
      "predicate": "<string>",
      "args": [
        {
          "type": "<string>",
          "id": "<string>"
        }
      ]
    }
  ],
  "tell": [
    {
      "predicate": "<string>",
      "args": [
        {
          "type": "<string>",
          "id": "<string>"
        }
      ]
    }
  ]
}
'
import requests

url = "https://api.osohq.com/api/bulk"

payload = {
"delete": [
{
"predicate": "<string>",
"args": [
{
"type": "<string>",
"id": "<string>"
}
]
}
],
"tell": [
{
"predicate": "<string>",
"args": [
{
"type": "<string>",
"id": "<string>"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
delete: [{predicate: '<string>', args: [{type: '<string>', id: '<string>'}]}],
tell: [{predicate: '<string>', args: [{type: '<string>', id: '<string>'}]}]
})
};

fetch('https://api.osohq.com/api/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.osohq.com/api/bulk"

payload := strings.NewReader("{\n \"delete\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ],\n \"tell\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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.osohq.com/api/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"delete\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ],\n \"tell\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.osohq.com/api/bulk")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delete\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ],\n \"tell\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ]\n}"

response = http.request(request)
puts response.read_body
using RestSharp;


var options = new RestClientOptions("https://api.osohq.com/api/bulk");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"delete\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ],\n \"tell\": [\n {\n \"predicate\": \"<string>\",\n \"args\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n }\n ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
{
  "message": "<string>"
}
{
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Requires an API key to access.

Body

application/json
delete
object[]
required
tell
object[]
required

Response

message
string
required