Skip to main content
POST
/
api
/
v1
/
search
/
secrets-admin
Search
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
    }
}
{
  "list": [
    {
      "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>",
      "maxViews": 123,
      "shareCode": "<string>",
      "shareUrl": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z",
      "vaultId": "<string>"
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

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.

createdAfter
string<date-time> | null
createdBefore
string<date-time> | null
creatorUserIds
string[] | null

Filter by creator user ID (admin can see all users' secrets)

includeDeleted
boolean | null

Include deleted secrets

pageSize
integer<int32> | null

The pageSize field.

pageToken
string | null

The pageToken field.

query
string | null

Fuzzy search by display name

secretType
enum<string> | null

Filter by secret type (optional)

Available options:
SECRET_TYPE_UNSPECIFIED,
SECRET_TYPE_TEXT,
SECRET_TYPE_FILE
sharingMode
enum<string> | null

Filter by sharing mode (optional)

Available options:
PAPER_VAULT_SHARING_MODE_UNSPECIFIED,
PAPER_VAULT_SHARING_MODE_INTERNAL,
PAPER_VAULT_SHARING_MODE_EXTERNAL
sortBy
enum<string> | null

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
statuses
enum<string>[] | null

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

Response

200 - application/json

Successful response

The PaperSecretAdminServiceSearchResponse message.

list
Paper Secret · object[] | null

The list field.

nextPageToken
string | null

The nextPageToken field.