--- id: span-analytics title: Span Analytics APIs sidebar_label: Span Analytics description: Span Analytics APIs allow you to browse spans collected in the system. slug: /help/docs/api/span-analytics/ canonical: https://www.sumologic.com/help/docs/api/span-analytics/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; import ApiErrors from '../reuse/api-errors.md'; import ApiRoles from '../reuse/api-roles.md'; Distributed Operations icon The Span Analytics API allows you to browse spans collected in the system. You can execute queries to find individual spans matching provided search criteria as well as run aggregated span queries and retrieve their results. For more information, see [Spans](/docs/apm/spans). :::tip Other Tracing APIs See also: [Service Map APIs](/docs/api/service-map) and [Traces APIs](/docs/api/tracing). Tracing APIs give you the ability to browse and execute queries for traces and span analytics, and request a service map of your application environment. ::: ## Documentation Documentation for OpenAPI built APIs is hosted on each deployment. Sumo Logic has several deployments that are assigned depending on the geographic location and the date an account is created. See [how to determine which endpoint to use](/docs/api/about-apis/getting-started#which-endpoint-should-i-should-use) if you are unsure. Select the documentation link for your deployment: | Region code | Region name | AWS region | API endpoint | |:----|:----|:---|:-----| | AU | Asia Pacific (Sydney) | ap-southeast-2 | https://api.au.sumologic.com/docs/#tag/spanAnalytics | | CA | Canada (Central) | ca-central-1 | https://api.ca.sumologic.com/docs/#tag/spanAnalytics | | CH | Switzerland (Zurich) | eu-central-2 | https://api.ch.sumologic.com/docs/#tag/spanAnalytics | | DE | EU (Frankfurt) | eu-central-1 | https://api.de.sumologic.com/docs/#tag/spanAnalytics | | ESC | AWS European Sovereign Cloud | eusc-de-east-1 | https://api.esc.sumologic.com/docs/#tag/spanAnalytics | | EU | EU (Ireland) | eu-west-1 | https://api.eu.sumologic.com/docs/#tag/spanAnalytics | | FED | US East (N. Virginia) | us-east-1 | https://api.fed.sumologic.com/docs/#tag/spanAnalytics | | JP | Asia Pacific (Tokyo) | ap-northeast-1 | https://api.jp.sumologic.com/docs/#tag/spanAnalytics | | KR | Asia Pacific (Seoul) | ap-northeast-2 | https://api.kr.sumologic.com/docs/#tag/spanAnalytics | | US1 | US East (N. Virginia) | us-east-1 | https://api.sumologic.com/docs/#tag/spanAnalytics | | US2 | US West (Oregon) | us-west-2 | https://api.us2.sumologic.com/docs/#tag/spanAnalytics | ## Required role capabilities * [Data Management](/docs/manage/users-roles/roles/role-capabilities/#data-management) * Download Search Results * View Collectors ## Endpoints for API access Sumo Logic has deployments that are assigned depending on the geographic location and the date an account is created. For API access, you must manually direct your API client to the correct Sumo Logic API URL. See [Sumo Logic Endpoints](/docs/api/about-apis/getting-started#sumo-logic-endpoints-by-deployment-and-firewall-security) for the list of the URLs. An `HTTP 301 Moved error` suggests that the wrong endpoint was specified. ## Session Timeout While the span analytics query is running you need to request the query status based on the query ID. The API keeps the query alive by either polling for status or gathering results. If the search job is not kept alive by API requests, it is canceled after fifteen minutes. When a query is canceled after fifteen minutes of inactivity, you will get a 404 status. ## Errors