Skip to main content
POST
/
api
/
v1
/
search
/
secrets
/
mine
SearchMySecrets
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.PaperSecret.SearchMySecrets(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.PaperSecretServiceSearchResponse != 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>",
      "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>"
}

Documentation Index

Fetch the complete documentation index at: https://conductorone-ian-account-to-user-pipeline.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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

SearchMySecrets request - for end users viewing their own secrets. Automatically scoped to current user.

pageSize
integer<int32>

The pageSize field.

pageToken
string

The pageToken field.

query
string

Fuzzy search by display name

secretType
enum<string>

Filter by secret type (optional)

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

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>

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

Search response for user's own secrets

Search response for user's own secrets

list
Paper Secret · object[] | null

The list field.

nextPageToken
string

The nextPageToken field.