openapi: 3.1.0 info: title: Salesforce Analytics (CRM Analytics) REST Actions SOQL API description: REST API for accessing and managing CRM Analytics (formerly Tableau CRM / Einstein Analytics) resources including datasets, lenses, dashboards, and dataflows. Enables programmatic access to analytics metadata, query execution, and dashboard management. Uses the Wave API resource at /services/data/vXX.0/wave. version: '63.0' contact: name: Salesforce Developer Support url: https://developer.salesforce.com/support email: developer@salesforce.com license: name: Salesforce API Terms of Use url: https://www.salesforce.com/company/legal/agreements/ servers: - url: https://{instance}.salesforce.com/services/data/v63.0/wave description: Salesforce production or developer instance variables: instance: default: yourInstance description: Your Salesforce instance identifier security: - oauth2: [] - bearerAuth: [] tags: - name: SOQL description: Salesforce Object Query Language queries paths: /query: get: operationId: query summary: Execute a SOQL query description: Executes a SOQL query that returns records matching the query criteria. Results are returned in batches; use the nextRecordsUrl to retrieve additional batches if totalSize exceeds the batch size (default 2000 records). tags: - SOQL parameters: - name: q in: query required: true description: The SOQL query string (e.g., SELECT Id, Name FROM Account WHERE Industry = 'Technology') schema: type: string responses: '200': description: Query results content: application/json: schema: $ref: '#/components/schemas/QueryResult' '400': $ref: '#/components/responses/BadRequest' /queryAll: get: operationId: queryAll summary: Execute a SOQL query including deleted and archived records description: Executes a SOQL query that includes soft-deleted records (IsDeleted = true) and archived records in the results. Otherwise identical to the /query endpoint. tags: - SOQL parameters: - name: q in: query required: true description: The SOQL query string schema: type: string responses: '200': description: Query results including deleted and archived records content: application/json: schema: $ref: '#/components/schemas/QueryResult' /query/{queryLocator}: get: operationId: queryMore summary: Retrieve additional query results description: Retrieves the next batch of records for a query that has more results than the batch size. Use the nextRecordsUrl value from the previous response. tags: - SOQL parameters: - name: queryLocator in: path required: true description: The query locator from the nextRecordsUrl of a previous query response schema: type: string responses: '200': description: Next batch of query results content: application/json: schema: $ref: '#/components/schemas/QueryResult' components: schemas: SObjectRecord: type: object description: A Salesforce SObject record with attributes metadata and dynamic fields properties: attributes: type: object properties: type: type: string description: The API name of the SObject type url: type: string description: The relative REST API URL for this record required: - type Id: type: string description: The 18-character Salesforce record ID additionalProperties: true QueryResult: type: object description: Results from a SOQL query, including records and pagination information properties: totalSize: type: integer description: Total number of records matching the query done: type: boolean description: Whether all results have been returned. If false, use nextRecordsUrl to retrieve more. nextRecordsUrl: type: string description: The URL to retrieve the next batch of results. Only present when done is false. records: type: array items: $ref: '#/components/schemas/SObjectRecord' ErrorResponse: type: array items: $ref: '#/components/schemas/ApiError' ApiError: type: object properties: message: type: string description: A human-readable description of the error errorCode: type: string description: The Salesforce error code (e.g., INVALID_FIELD, MALFORMED_QUERY, NOT_FOUND) fields: type: array items: type: string description: Fields that caused the error, if applicable responses: BadRequest: description: The request could not be processed due to invalid syntax, missing required fields, or business rule violations content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://login.salesforce.com/services/oauth2/authorize tokenUrl: https://login.salesforce.com/services/oauth2/token scopes: api: Access and manage your Salesforce data wave_api: Access CRM Analytics REST API resources bearerAuth: type: http scheme: bearer