Skip to content

Commit abc3151

Browse files
jpipkin1kimsauce
andauthored
DOCS-1016 - Download the API specification (#5696)
* Add new section * Update docs/api/about-apis/intro-to-apis.md Co-authored-by: Kim (Sumo Logic) <[email protected]> * DOCS-1016 - Suggested edits (#5697) * Suggested edits - Intro to APIs * Update docs/api/about-apis/intro-to-apis.md * Update docs/api/about-apis/intro-to-apis.md * Update docs/api/about-apis/intro-to-apis.md * Update docs/api/about-apis/intro-to-apis.md * Update docs/api/about-apis/intro-to-apis.md * Update docs/api/about-apis/intro-to-apis.md * Update docs/api/about-apis/intro-to-apis.md --------- Co-authored-by: Kim (Sumo Logic) <[email protected]>
1 parent c0c18f2 commit abc3151

File tree

11 files changed

+30
-17
lines changed

11 files changed

+30
-17
lines changed

docs/api/about-apis/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Sumo Logic APIs follow Representational State Transfer (REST) patterns and are o
1515

1616
## Documentation
1717

18-
To view our main docs, click the link below corresponding to your deployment. If you're not sure, see [How to determine your endpoint](#which-endpoint-should-i-should-use).
18+
To access our API documentation, navigate to the appropriate link based on your Sumo Logic deployment. If you're not sure, see [Which endpoint should I use?](#which-endpoint-should-i-should-use)
1919

20-
| Deployment | API Docs URL |
20+
| Deployment | API documentation URL |
2121
|:-----------|:----------------------------------|
2222
| AU | https://api.au.sumologic.com/docs/ |
2323
| CA | https://api.ca.sumologic.com/docs/ |

docs/api/about-apis/intro-to-apis.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
99

1010
<img src={useBaseUrl('img/icons/operations/advanced-certificates.png')} alt="Thumbnail icon" width="50"/>
1111

12-
Sumo Logic has a host of useful APIs across all products that can add valuable functionality to any organization by providing access to data and activities without going through the website. API calls can be used for data gathering, automation of processes, and custom reports.
12+
Sumo Logic has a host of useful APIs across all products that let you access data and perform actions without using the Sumo Logic UI. API calls can be used for to gather data, automate processes, and create custom reports.
1313

14-
This article presumes that you have a solid understanding of Sumo Logic functionality: collectors, queries, security offerings, etc. While APIs are typically for "power users" looking for additional customization and access to web service resources, you also don't need a computer science degree to understand and make use of API calls. This article helps walk you through the basics and get you going with important data queries through the API.
14+
This article is for users who are familiar with Sumo Logic features (collectors, queries, and security tools, for example), but new to working with APIs. You dont need a development background to follow along. We’ll cover the basics so you can start making API calls to run queries and perform tasks.
1515

16-
In this article, you'll learn about:
17-
* How to create a Sumo Logic access ID/key.
18-
* How to access Sumo Logic APIs.
19-
* How to use APIs with Sumo Logic's Cloud SIEM.
16+
In this article, you'll learn how to:
17+
18+
* Create a Sumo Logic access ID/key.
19+
* Access Sumo Logic APIs.
20+
* Use APIs with Sumo Logic's Cloud SIEM.
2021

2122
## Create an access key
2223

@@ -66,11 +67,9 @@ However, most API users do not use a traditional web browser for API calls, othe
6667
An open source application such as [Postman](https://www.postman.com/) can be a convenient tool for testing and developing with API calls. To use Postman, download and install the app. Then:
6768
1. Enter the URL for the API call.
6869
1. Click the **Authorization** tab.
69-
1. Fill in the username and password fields with your Sumo Logic access ID and access key respectively.
70+
1. Fill in the username and password fields with your Sumo Logic access ID and access key, respectively.
7071
1. Click **Send** when finished.
71-
1. You see the JSON output (or error messages if there is a problem) in the bottom panel.
72-
73-
<img src={useBaseUrl('img/api/postman-ui.png')} alt="Postman UI" style={{border: '1px solid gray'}} width="800" />
72+
1. You see the JSON output (or error messages if there is a problem) in the bottom panel.<br/><img src={useBaseUrl('img/api/postman-ui.png')} alt="Postman UI" style={{border: '1px solid gray'}} width="800" />
7473

7574
Most programming and scripting languages provide modules and libraries for making web service and API calls in code. For instance, the following Python code can make the same "get collectors" call programmatically using the `requests` library:
7675

@@ -98,6 +97,18 @@ if __name__ == '__main__':
9897

9998
As you are learning how APIs work, we recommend setting up an API test program, then follow along with the API examples shown in the following sections. To execute API commands, you can use Postman as shown above, another API test application, or set up a quick code snippet in Python or the programming language of your choice.
10099

100+
### Download the OpenAPI Specification
101+
102+
Optionally, you can download the OpenAPI Specification for the Sumo Logic API and import it to your API test application. This lets you view the full specification for all Sumo Logic APIs and run them directly from your testing tool.
103+
104+
1. Select the API documentation URL for your deployment from the [Documentation](/docs/api/about-apis/getting-started/#documentation) section of the *API Authentication, Endpoints, and Security* article. For instance, US users would access either https://api.sumologic.com/docs/ or https://api.us2.sumologic.com/docs/.
105+
1. Click the **Download** button at the top of the page. <br/><img src={useBaseUrl('img/api/openapi-spec-download-button.png')} alt="Button to download Sumo Logic OpenAPI Specification" style={{border: '1px solid gray'}} width="600" />
106+
1. Import the downloaded file to your API test application. For example, to [import the file to Postman](https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-data/), select **File > Import**.
107+
1. The imported specification appears. Select any API to run it.<br/><img src={useBaseUrl('img/api/imported-api.png')} alt="Imported API specification" style={{border: '1px solid gray'}} width="500" />
108+
1. You can also download the API specification for Cloud SIEM or Cloud SOAR from the following locations. Simply select the API documentation URL for your deployment and click the **Download** button at the top of the page:
109+
* [Cloud SIEM API documentation](/docs/api/cloud-siem-enterprise/#documentation)
110+
* [Cloud SOAR API documentation](/docs/api/cloud-soar/#documentation)
111+
101112
## Basic API GET commands
102113

103114
Retrieving system data and configuration is one of the most common use cases for utilizing platform APIs. These data retrieval operations are generally known as GET commands in reference to the "GET" verb used by the HTTP protocol. Data retrieved through API calls can be processed by outside applications and scripts for report generation and advanced analytics, extending functionality beyond that offered by the Sumo Logic website.
@@ -116,7 +127,9 @@ Note the first ID from your list or the sample ID shown above from the Sumo Logi
116127

117128
<img src={useBaseUrl('img/api/collector-id.png')} alt="Collector ID" style={{border: '1px solid gray'}} width="800" />
118129

119-
Note that the collector data itself also contains a helpful follow-up link to analyze the sources currently configured for our chosen collector. Follow up by clicking on (or copying into the URL field) the given URL for sources: `https://api.sumologic.com/api/v1/collectors/<collectorID>/sources`
130+
Note that the collector data itself also contains a helpful follow-up link to analyze the sources currently configured for our chosen collector. Follow up by clicking on (or copying into the URL field) the given URL for sources:
131+
132+
`https://api.sumologic.com/api/v1/collectors/<collectorID>/sources`
120133

121134
<img src={useBaseUrl('img/api/collector-sources.png')} alt="Collector sources" style={{border: '1px solid gray'}} width="800" />
122135

@@ -353,4 +366,4 @@ Or add a new comment to an existing insight by creating comment text in the requ
353366

354367
<img src={useBaseUrl('img/api/insight-comment.png')} alt="Insight comment" style={{border: '1px solid gray'}} width="800" />
355368

356-
All elements of Cloud SIEM functionality are available through the API, including rules, match lists, automations, tags, and custom actions. Users can even use the API to generate their own insights based on a custom selection of signals.
369+
All elements of Cloud SIEM functionality are available through the API, including rules, match lists, automations, tags, and custom actions. Users can even use the API to generate their own insights based on a custom selection of signals.

docs/reuse/api-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ To get started with Sumo Logic APIs, see [API Authentication, Endpoints, and Sec
22

33
Our APIs are built with [OpenAPI](https://www.openapis.org/). You can generate client libraries in several languages and explore automated testing.
44

5-
To access our API documentation, navigate to the appropriate link based on your Sumo deployment. Deployment types differ based on geographic location and account creation date. If unsure, see [Which endpoint should I use?](/docs/api/about-apis/getting-started#which-endpoint-should-i-should-use)
5+
To access our API documentation, navigate to the appropriate link based on your Sumo Logic deployment. Deployment types differ based on geographic location and account creation date. If unsure, see [Which endpoint should I use?](/docs/api/about-apis/getting-started#which-endpoint-should-i-should-use)

docs/reuse/cse-api-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| Deployment | Documentation URL |
1+
| Deployment | API documentation URL |
22
|:-----------|:----------------------------------------------------------|
33
| AU | https://api.au.sumologic.com/docs/sec/ |
44
| CA | https://api.ca.sumologic.com/docs/sec/ |

docs/reuse/csoar-api-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| Deployment | Documentation URL |
1+
| Deployment | API documentation URL |
22
|:-----------|:----------------------------------------------------------|
33
| AU | https://api.au.sumologic.com/docs/csoar/ |
44
| CA | https://api.ca.sumologic.com/docs/csoar/ |
-5.92 KB
Loading
-4.48 KB
Loading

static/img/api/imported-api.png

74.9 KB
Loading
76.1 KB
Loading

static/img/api/postman-ui.png

-13.2 KB
Loading

0 commit comments

Comments
 (0)