--- id: saved-search-create sidebar_label: Create a saved search hide_title: true hide_table_of_contents: true api: {"tags":["Saved Search"],"description":"Creates a new saved search.\n","operationId":"savedSearchCreate","requestBody":{"description":"The saved search to persist.","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"description":"The name of the saved search.\n","type":"string","example":"Disabled accounts"},"description":{"description":"The description of the saved search.\n","type":"string","example":"Disabled accounts"}}},{"type":"object","properties":{"public":{"description":"Indicates if the saved search is public.\n","type":"boolean","default":false},"created":{"description":"The date the saved search was initially created.\n","type":"string","nullable":true,"format":"date-time","example":"2018-06-25T20:22:28.104Z"},"modified":{"description":"The last date the saved search was modified.\n","type":"string","nullable":true,"format":"date-time","example":"2018-06-25T20:22:28.104Z"},"indices":{"description":"The names of the Elasticsearch indices in which to search.\n","type":"array","items":{"description":"Enum representing the currently supported indices.\nAdditional values may be added in the future without notice.","type":"string","enum":["accessprofiles","accountactivities","entitlements","events","identities","roles"],"example":"identities"},"example":["identities"]},"columns":{"description":"The columns to be returned (specifies the order in which they will be presented) for each document type.\n\nThe currently supported document types are: _accessprofile_, _accountactivity_, _account_, _aggregation_, _entitlement_, _event_, _identity_, and _role_.\n","type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"field":{"description":"The name of the field.\n","type":"string"},"header":{"description":"The value of the header.\n","type":"string"}},"required":["field"]}},"example":{"identity":[{"field":"displayName","header":"Display Name"},{"field":"email","header":"Work Email"},{"field":"attributes.cloudLifecycleState","header":"Lifecycle State"}]}},"query":{"description":"The search query using Elasticsearch [Query String Query](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/query-dsl-query-string-query.html#query-string) syntax from the Query DSL.\n","type":"string","example":"@accounts(disabled:true)"},"fields":{"description":"The fields to be searched against in a multi-field query.\n","type":"array","items":{"type":"string"},"example":["disabled"]},"sort":{"description":"The fields to be used to sort the search results.\n","type":"array","items":{"type":"string"},"example":["displayName"]},"filters":{"nullable":true,"allOf":[{"type":"object","description":"The filters to be applied for each filtered field name.","example":{"attributes.cloudAuthoritativeSource":{"type":"EXISTS","exclude":true},"accessCount":{"type":"RANGE","range":{"lower":{"value":"3"}}},"created":{"type":"RANGE","range":{"lower":{"value":"2019-12-01","inclusive":true},"upper":{"value":"2020-01-01"}}},"source.name":{"type":"TERMS","terms":["HR Employees","Corporate Active Directory"],"exclude":true},"protected":{"type":"TERMS","terms":["true"]}}},{"type":"object","properties":{"type":{"description":"Enum representing the currently supported filter types.\nAdditional values may be added in the future without notice.","type":"string","enum":["EXISTS","RANGE","TERMS"],"example":"RANGE"},"range":{"type":"object","description":"The range of values to be filtered.","properties":{"lower":{"description":"The lower bound of the range.","type":"object","required":["value"],"properties":{"value":{"description":"The value of the range's endpoint.","type":"string"},"inclusive":{"description":"Indicates if the endpoint is included in the range.","type":"boolean","default":false}}},"upper":{"description":"The upper bound of the range.","type":"object","required":["value"],"properties":{"value":{"description":"The value of the range's endpoint.","type":"string"},"inclusive":{"description":"Indicates if the endpoint is included in the range.","type":"boolean","default":false}}}}},"terms":{"description":"The terms to be filtered.","type":"array","items":{"type":"string"}},"exclude":{"description":"Indicates if the filter excludes results.","type":"boolean","default":false}}}]}},"required":["indices","query"]}]}}},"required":true},"responses":{"201":{"description":"The persisted saved search.","content":{"application/json":{"schema":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The saved search ID.\n","type":"string","example":"0de46054-fe90-434a-b84e-c6b3359d0c64"},"owner":{"description":"The owner of the saved search.\n","type":"object","properties":{"type":{"type":"string","enum":["ACCOUNT_CORRELATION_CONFIG","ACCESS_PROFILE","ACCESS_REQUEST_APPROVAL","ACCOUNT","APPLICATION","CAMPAIGN","CAMPAIGN_FILTER","CERTIFICATION","CLUSTER","CONNECTOR_SCHEMA","ENTITLEMENT","GOVERNANCE_GROUP","IDENTITY","IDENTITY_PROFILE","IDENTITY_REQUEST","LIFECYCLE_STATE","PASSWORD_POLICY","ROLE","RULE","SOD_POLICY","SOURCE","TAG_CATEGORY","TASK_RESULT","REPORT_RESULT","SOD_VIOLATION","ACCOUNT_ACTIVITY"],"description":"An enumeration of the types of DTOs supported within the IdentityNow infrastructure.","example":"IDENTITY"},"id":{"type":"string","example":"2c91808568c529c60168cca6f90c1313"}},"required":["type","id"]}}},{"type":"object","properties":{"name":{"description":"The name of the saved search.\n","type":"string","example":"Disabled accounts"},"description":{"description":"The description of the saved search.\n","type":"string","example":"Disabled accounts"}}},{"type":"object","properties":{"public":{"description":"Indicates if the saved search is public.\n","type":"boolean","default":false},"created":{"description":"The date the saved search was initially created.\n","type":"string","nullable":true,"format":"date-time","example":"2018-06-25T20:22:28.104Z"},"modified":{"description":"The last date the saved search was modified.\n","type":"string","nullable":true,"format":"date-time","example":"2018-06-25T20:22:28.104Z"},"indices":{"description":"The names of the Elasticsearch indices in which to search.\n","type":"array","items":{"description":"Enum representing the currently supported indices.\nAdditional values may be added in the future without notice.","type":"string","enum":["accessprofiles","accountactivities","entitlements","events","identities","roles"],"example":"identities"},"example":["identities"]},"columns":{"description":"The columns to be returned (specifies the order in which they will be presented) for each document type.\n\nThe currently supported document types are: _accessprofile_, _accountactivity_, _account_, _aggregation_, _entitlement_, _event_, _identity_, and _role_.\n","type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"field":{"description":"The name of the field.\n","type":"string"},"header":{"description":"The value of the header.\n","type":"string"}},"required":["field"]}},"example":{"identity":[{"field":"displayName","header":"Display Name"},{"field":"email","header":"Work Email"},{"field":"attributes.cloudLifecycleState","header":"Lifecycle State"}]}},"query":{"description":"The search query using Elasticsearch [Query String Query](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/query-dsl-query-string-query.html#query-string) syntax from the Query DSL.\n","type":"string","example":"@accounts(disabled:true)"},"fields":{"description":"The fields to be searched against in a multi-field query.\n","type":"array","items":{"type":"string"},"example":["disabled"]},"sort":{"description":"The fields to be used to sort the search results.\n","type":"array","items":{"type":"string"},"example":["displayName"]},"filters":{"nullable":true,"allOf":[{"type":"object","description":"The filters to be applied for each filtered field name.","example":{"attributes.cloudAuthoritativeSource":{"type":"EXISTS","exclude":true},"accessCount":{"type":"RANGE","range":{"lower":{"value":"3"}}},"created":{"type":"RANGE","range":{"lower":{"value":"2019-12-01","inclusive":true},"upper":{"value":"2020-01-01"}}},"source.name":{"type":"TERMS","terms":["HR Employees","Corporate Active Directory"],"exclude":true},"protected":{"type":"TERMS","terms":["true"]}}},{"type":"object","properties":{"type":{"description":"Enum representing the currently supported filter types.\nAdditional values may be added in the future without notice.","type":"string","enum":["EXISTS","RANGE","TERMS"],"example":"RANGE"},"range":{"type":"object","description":"The range of values to be filtered.","properties":{"lower":{"description":"The lower bound of the range.","type":"object","required":["value"],"properties":{"value":{"description":"The value of the range's endpoint.","type":"string"},"inclusive":{"description":"Indicates if the endpoint is included in the range.","type":"boolean","default":false}}},"upper":{"description":"The upper bound of the range.","type":"object","required":["value"],"properties":{"value":{"description":"The value of the range's endpoint.","type":"string"},"inclusive":{"description":"Indicates if the endpoint is included in the range.","type":"boolean","default":false}}}}},"terms":{"description":"The terms to be filtered.","type":"array","items":{"type":"string"}},"exclude":{"description":"Indicates if the filter excludes results.","type":"boolean","default":false}}}]}},"required":["indices","query"]}]}}}},"400":{"description":"Client Error - Returned if the request body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"detailCode":{"type":"string","description":"Fine-grained error code providing more detail of the error.","example":"400.1 Bad Request Content"},"trackingId":{"type":"string","description":"Unique tracking id for the error.","example":"e7eab60924f64aa284175b9fa3309599"},"messages":{"type":"array","description":"Generic localized reason for error","items":{"type":"object","properties":{"locale":{"type":"string","description":"The locale for the message text, a BCP 47 language tag.","example":"en-US"},"localeOrigin":{"type":"string","enum":["DEFAULT","REQUEST"],"description":"An indicator of how the locale was selected. *DEFAULT* means the locale is the system default. *REQUEST* means the locale was selected from the request context (i.e., best match based on the *Accept-Language* header). Additional values may be added in the future without notice.","example":"DEFAULT"},"text":{"type":"string","description":"Actual text of the error message in the indicated locale.","example":"The request was syntactically correct but its content is semantically invalid."}}}},"causes":{"type":"array","description":"Plain-text descriptive reasons to provide additional detail to the text provided in the messages field","items":{"type":"object","properties":{"locale":{"type":"string","description":"The locale for the message text, a BCP 47 language tag.","example":"en-US"},"localeOrigin":{"type":"string","enum":["DEFAULT","REQUEST"],"description":"An indicator of how the locale was selected. *DEFAULT* means the locale is the system default. *REQUEST* means the locale was selected from the request context (i.e., best match based on the *Accept-Language* header). Additional values may be added in the future without notice.","example":"DEFAULT"},"text":{"type":"string","description":"Actual text of the error message in the indicated locale.","example":"The request was syntactically correct but its content is semantically invalid."}}}}}}}}},"403":{"description":"Forbidden - Returned if the user you are running as, doesn't have access to this end-point.","content":{"application/json":{"schema":{"type":"object","properties":{"detailCode":{"type":"string","description":"Fine-grained error code providing more detail of the error.","example":"400.1 Bad Request Content"},"trackingId":{"type":"string","description":"Unique tracking id for the error.","example":"e7eab60924f64aa284175b9fa3309599"},"messages":{"type":"array","description":"Generic localized reason for error","items":{"type":"object","properties":{"locale":{"type":"string","description":"The locale for the message text, a BCP 47 language tag.","example":"en-US"},"localeOrigin":{"type":"string","enum":["DEFAULT","REQUEST"],"description":"An indicator of how the locale was selected. *DEFAULT* means the locale is the system default. *REQUEST* means the locale was selected from the request context (i.e., best match based on the *Accept-Language* header). Additional values may be added in the future without notice.","example":"DEFAULT"},"text":{"type":"string","description":"Actual text of the error message in the indicated locale.","example":"The request was syntactically correct but its content is semantically invalid."}}}},"causes":{"type":"array","description":"Plain-text descriptive reasons to provide additional detail to the text provided in the messages field","items":{"type":"object","properties":{"locale":{"type":"string","description":"The locale for the message text, a BCP 47 language tag.","example":"en-US"},"localeOrigin":{"type":"string","enum":["DEFAULT","REQUEST"],"description":"An indicator of how the locale was selected. *DEFAULT* means the locale is the system default. *REQUEST* means the locale was selected from the request context (i.e., best match based on the *Accept-Language* header). Additional values may be added in the future without notice.","example":"DEFAULT"},"text":{"type":"string","description":"Actual text of the error message in the indicated locale.","example":"The request was syntactically correct but its content is semantically invalid."}}}}}},"examples":{"403":{"summary":"An example of a 403 response object","value":{"detailCode":"403 Forbidden","trackingId":"b21b1f7ce4da4d639f2c62a57171b427","messages":[{"locale":"en-US","localeOrigin":"DEFAULT","text":"The server understood the request but refuses to authorize it."}]}}}}}}},"method":"post","path":"/saved-searches","servers":[{"url":"https://{tenant}.api.identitynow.com/v3","description":"This is the production API server.","variables":{"tenant":{"default":"sailpoint","description":"This is the name of your tenant, typically your company's name."}}}],"security":[{"oauth2":[]}],"securitySchemes":{"oauth2":{"type":"oauth2","description":"OAuth2 Bearer token (JWT). See [IdentityNow REST API Authentication](https://developer.sailpoint.com/docs/authentication.html) for more information.\n- Directions for generating a [personal access token](https://developer.sailpoint.com/docs/authentication.html#personal-access-tokens)\n- Directions using [client credentials flow](https://developer.sailpoint.com/docs/authentication.html#client-credentials-grant-flow)\n- Directions for using [authorization code flow](https://developer.sailpoint.com/docs/authentication.html#authorization-code-grant-flow)\n\nWhich authentication method should I choose? See our [guide](https://developer.sailpoint.com/docs/authentication.html#which-oauth-2-0-grant-flow-should-i-use)\n\nLearn more about how to find your `tokenUrl` and `authorizationUrl` [in our docs](https://developer.sailpoint.com/docs/authentication.html#finding-your-tenant-s-oauth-details)\n","flows":{"clientCredentials":{"tokenUrl":"https://tenant.api.identitynow.com/oauth/token","scopes":{"sp:scopes:default":"default scope","sp:scopes:all":"access to all scopes"}},"authorizationCode":{"authorizationUrl":"https://tenant.identitynow.com/oauth/authorize","tokenUrl":"https://tenant.api.identitynow.com/oauth/token","scopes":{"sp:scopes:default":"default scope","sp:scopes:all":"access to all scopes"}}}}},"jsonRequestBodyExample":{"name":"Disabled accounts","description":"Disabled accounts","public":false,"created":"2018-06-25T20:22:28.104Z","modified":"2018-06-25T20:22:28.104Z","indices":["identities"],"columns":{"identity":[{"field":"displayName","header":"Display Name"},{"field":"email","header":"Work Email"},{"field":"attributes.cloudLifecycleState","header":"Lifecycle State"}]},"query":"@accounts(disabled:true)","fields":["disabled"],"sort":["displayName"],"filters":{"attributes.cloudAuthoritativeSource":{"type":"EXISTS","exclude":true},"accessCount":{"type":"RANGE","range":{"lower":{"value":"3"}}},"created":{"type":"RANGE","range":{"lower":{"value":"2019-12-01","inclusive":true},"upper":{"value":"2020-01-01"}}},"source.name":{"type":"TERMS","terms":["HR Employees","Corporate Active Directory"],"exclude":true},"protected":{"type":"TERMS","terms":["true"]}}},"info":{"contact":{"email":"developers@sailpoint.com","name":"Developer Relations","url":"https://developer.sailpoint.com/discuss"},"description":"These are the public APIs for SailPoint's SaaS services. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.","title":"SailPoint - SaaS API","version":"3.0.0"},"postman":{"name":"Create a saved search","description":{"content":"Creates a new saved search.\n","type":"text/plain"},"url":{"path":["saved-searches"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/sailpoint-api-v3/sail-point-saa-s-api --- import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; import ParamsItem from "@theme/ParamsItem"; import ResponseSamples from "@theme/ResponseSamples"; import SchemaItem from "@theme/SchemaItem" import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem"; ## Create a saved search Creates a new saved search.
Request Body required
The saved search to persist.
    columns object
    The columns to be returned (specifies the order in which they will be presented) for each document type. The currently supported document types are: _accessprofile_, _accountactivity_, _account_, _aggregation_, _entitlement_, _event_, _identity_, and _role_.
    items object
    filters object
    The filters to be applied for each filtered field name.
    range object
    The range of values to be filtered.
    lower object
    The lower bound of the range.
    upper object
    The upper bound of the range.
The persisted saved search.
Schema
    owner object
    The owner of the saved search.
    columns object
    The columns to be returned (specifies the order in which they will be presented) for each document type. The currently supported document types are: _accessprofile_, _accountactivity_, _account_, _aggregation_, _entitlement_, _event_, _identity_, and _role_.
    items object
    filters object
    The filters to be applied for each filtered field name.
    range object
    The range of values to be filtered.
    lower object
    The lower bound of the range.
    upper object
    The upper bound of the range.
Client Error - Returned if the request body is invalid.
Schema
    messages object[]
    Generic localized reason for error
    causes object[]
    Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
Schema
    messages object[]
    Generic localized reason for error
    causes object[]
    Plain-text descriptive reasons to provide additional detail to the text provided in the messages field