Typescript (SDK)
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.paperSecretAdmin.search();
console.log(result);
}
run();package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.PaperSecretAdmin.Search(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.PaperSecretAdminServiceSearchResponse != nil {
// handle response
}
}curl --request POST \
--url https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"createdAfter": "2023-11-07T05:31:56Z",
"createdBefore": "2023-11-07T05:31:56Z",
"creatorUserIds": [
"<string>"
],
"includeDeleted": true,
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"statuses": []
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin"
payload = {
"createdAfter": "2023-11-07T05:31:56Z",
"createdBefore": "2023-11-07T05:31:56Z",
"creatorUserIds": ["<string>"],
"includeDeleted": True,
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"statuses": []
}
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({
createdAfter: '2023-11-07T05:31:56Z',
createdBefore: '2023-11-07T05:31:56Z',
creatorUserIds: ['<string>'],
includeDeleted: true,
pageSize: 123,
pageToken: '<string>',
query: '<string>',
statuses: []
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin', 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://{tenantDomain}.conductor.one/api/v1/search/secrets-admin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createdAfter' => '2023-11-07T05:31:56Z',
'createdBefore' => '2023-11-07T05:31:56Z',
'creatorUserIds' => [
'<string>'
],
'includeDeleted' => true,
'pageSize' => 123,
'pageToken' => '<string>',
'query' => '<string>',
'statuses' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"createdAfter\": \"2023-11-07T05:31:56Z\",\n \"createdBefore\": \"2023-11-07T05:31:56Z\",\n \"creatorUserIds\": [\n \"<string>\"\n ],\n \"includeDeleted\": true,\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"statuses\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin")
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 \"createdAfter\": \"2023-11-07T05:31:56Z\",\n \"createdBefore\": \"2023-11-07T05:31:56Z\",\n \"creatorUserIds\": [\n \"<string>\"\n ],\n \"includeDeleted\": true,\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"statuses\": []\n}"
response = http.request(request)
puts response.read_body{
"list": [
{
"ageSuite": "AGE_SUITE_UNSPECIFIED",
"allowedEmails": [
"<string>"
],
"allowedUserIds": [
"<string>"
],
"contentDeleted": true,
"contentExpiresAt": "2023-11-07T05:31:56Z",
"contentReady": true,
"contentType": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"creatorUserId": "<string>",
"currentViews": 123,
"deletedAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"fileSize": "<string>",
"filename": "<string>",
"inputFormat": "SECRET_INPUT_FORMAT_UNSPECIFIED",
"maxViews": 123,
"secretType": "SECRET_TYPE_UNSPECIFIED",
"shareCode": "<string>",
"shareUrl": "<string>",
"sharingMode": "PAPER_VAULT_SHARING_MODE_UNSPECIFIED",
"status": "SECRET_STATUS_UNSPECIFIED",
"updatedAt": "2023-11-07T05:31:56Z",
"vaultId": "<string>"
}
],
"nextPageToken": "<string>"
}Secrets Admin
Search
Search returns secrets across the tenant. Can filter by creator, sharing mode, status, time range, etc.
POST
/
api
/
v1
/
search
/
secrets-admin
Typescript (SDK)
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.paperSecretAdmin.search();
console.log(result);
}
run();package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.PaperSecretAdmin.Search(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.PaperSecretAdminServiceSearchResponse != nil {
// handle response
}
}curl --request POST \
--url https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"createdAfter": "2023-11-07T05:31:56Z",
"createdBefore": "2023-11-07T05:31:56Z",
"creatorUserIds": [
"<string>"
],
"includeDeleted": true,
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"statuses": []
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin"
payload = {
"createdAfter": "2023-11-07T05:31:56Z",
"createdBefore": "2023-11-07T05:31:56Z",
"creatorUserIds": ["<string>"],
"includeDeleted": True,
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"statuses": []
}
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({
createdAfter: '2023-11-07T05:31:56Z',
createdBefore: '2023-11-07T05:31:56Z',
creatorUserIds: ['<string>'],
includeDeleted: true,
pageSize: 123,
pageToken: '<string>',
query: '<string>',
statuses: []
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin', 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://{tenantDomain}.conductor.one/api/v1/search/secrets-admin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createdAfter' => '2023-11-07T05:31:56Z',
'createdBefore' => '2023-11-07T05:31:56Z',
'creatorUserIds' => [
'<string>'
],
'includeDeleted' => true,
'pageSize' => 123,
'pageToken' => '<string>',
'query' => '<string>',
'statuses' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"createdAfter\": \"2023-11-07T05:31:56Z\",\n \"createdBefore\": \"2023-11-07T05:31:56Z\",\n \"creatorUserIds\": [\n \"<string>\"\n ],\n \"includeDeleted\": true,\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"statuses\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/search/secrets-admin")
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 \"createdAfter\": \"2023-11-07T05:31:56Z\",\n \"createdBefore\": \"2023-11-07T05:31:56Z\",\n \"creatorUserIds\": [\n \"<string>\"\n ],\n \"includeDeleted\": true,\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"statuses\": []\n}"
response = http.request(request)
puts response.read_body{
"list": [
{
"ageSuite": "AGE_SUITE_UNSPECIFIED",
"allowedEmails": [
"<string>"
],
"allowedUserIds": [
"<string>"
],
"contentDeleted": true,
"contentExpiresAt": "2023-11-07T05:31:56Z",
"contentReady": true,
"contentType": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"creatorUserId": "<string>",
"currentViews": 123,
"deletedAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"fileSize": "<string>",
"filename": "<string>",
"inputFormat": "SECRET_INPUT_FORMAT_UNSPECIFIED",
"maxViews": 123,
"secretType": "SECRET_TYPE_UNSPECIFIED",
"shareCode": "<string>",
"shareUrl": "<string>",
"sharingMode": "PAPER_VAULT_SHARING_MODE_UNSPECIFIED",
"status": "SECRET_STATUS_UNSPECIFIED",
"updatedAt": "2023-11-07T05:31:56Z",
"vaultId": "<string>"
}
],
"nextPageToken": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.
Body
application/json
Admin search request - can filter by any user's secrets.
Filter by creator user ID (admin can see all users' secrets)
Include deleted secrets
The pageSize field.
The pageToken field.
Fuzzy search by display name
Filter by secret type (optional)
Available options:
SECRET_TYPE_UNSPECIFIED, SECRET_TYPE_TEXT, SECRET_TYPE_FILE Filter by sharing mode (optional)
Available options:
PAPER_VAULT_SHARING_MODE_UNSPECIFIED, PAPER_VAULT_SHARING_MODE_INTERNAL, PAPER_VAULT_SHARING_MODE_EXTERNAL Sort order
Available options:
SEARCH_SORT_BY_UNSPECIFIED, SEARCH_SORT_BY_CREATED_DESC, SEARCH_SORT_BY_CREATED_ASC, SEARCH_SORT_BY_EXPIRES_ASC, SEARCH_SORT_BY_NAME_ASC Filter by status (optional)
Available options:
SECRET_STATUS_UNSPECIFIED, SECRET_STATUS_ACTIVE, SECRET_STATUS_EXPIRED, SECRET_STATUS_BURNED, SECRET_STATUS_REVOKED, SECRET_STATUS_DATA_DELETED Was this page helpful?
⌘I