Skip to content

Commit 530f300

Browse files
author
markzegarelli
authored
Public API GA (#3390)
* Remove API subnav * Hide old Config API nav * Menu and content updates * Add blurb about the api * [netlify-build] * Value prop [netlify-build] * Update URL [netlify-build] * Config API -> Public API [netlify-build] * typo
1 parent af1aa0c commit 530f300

File tree

31 files changed

+121
-66
lines changed

31 files changed

+121
-66
lines changed

src/_data/glossary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Analytics.js: |
22
The Segment Javascript library wrapper, which makes it simple to send your data to any tool without having to learn, test or implement the new API for each tool every time.
33
44
API: |
5-
Application Programming Interface. In software, this term describes a way of interacting with software in an automated fashion, without the use of a user-interface designed for humans. In Segment, we call the standard calls (`track`, `page` and `screen`, `identify` and `group`) our API. We also provide the [Config API](/docs/config-api/), which you can use to configure sources and destinations, and perform other functions in your workspace, without logging in using a web browser.
5+
Application Programming Interface. In software, this term describes a way of interacting with software in an automated fashion, without the use of a user-interface designed for humans. In Segment, we call the standard calls (`track`, `page` and `screen`, `identify` and `group`) our API. We also provide the [Public API](/docs/api/), which you can use to configure sources and destinations, and perform other functions in your workspace, without logging in using a web browser.
66
77
App: |
88
The app is what we call the main Segment web application, the part you log in to, and where you configure sources and destinations, see events in the debugger, manage your tracking plan, and so on.

src/_data/sidenav/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,3 +407,23 @@ sections:
407407
title: Prod and Testing Environments in Segment
408408
- path: /segment-app/verify-email-address
409409
title: Verifying Your Email Address
410+
- section_title: API
411+
section:
412+
- path: /api
413+
title: Public API
414+
- section_title: Config API
415+
slug: api/config-api
416+
section:
417+
- path: /api/config-api
418+
title: Config API overview
419+
- path: /api/config-api/api-design
420+
title: API design
421+
- path: /api/config-api/authentication
422+
title: Authentication
423+
- path: /api/config-api/fql
424+
title: Destination Filter Query Language
425+
# - path: "https://reference.segmentapis.com/"
426+
# title: Reference
427+
# menu_icon: new-tab
428+
# - path: /config-api/tutorial-javascript-google-analytics
429+
# title: Creating a Javascript web source and Google Analytics destination

src/_includes/content/papi-ga.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div class="premonition success">
2+
<div class="fa fa-info-circle"></div>
3+
<div class="content">
4+
<p class="header">The Segment Public API is available</p>
5+
<p markdown=1>Segment's [Public API](/docs/api) is available to use. You can use the Public API and Config APIs in parallel, but moving forward any API updates will come to the Public API exclusively. </p>
6+
<p markdown=1>Please contact your account team or [[email protected]](mailto:[email protected]) with any questions.</p>
7+
</div>
8+
</div>

src/_includes/icons/api.svg

Lines changed: 5 additions & 0 deletions
Loading

src/_includes/menu/menu.html

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
<div class="sidebar">
44
<div class="sidebar__content">
55
{% include menu/menu-primary.html %}
6-
7-
<nav class="menu">
8-
<ul class="list list--unstyle">
9-
<li class="menu-item">
10-
<a class="menu-item__link menu-item__link--highlight menu-item__link--icon flex flex--middle" href="{{ site.baseurl }}/config-api/">
11-
<div class="menu-item__icon flex__column">
12-
{% include icons/config-api.svg %}
13-
</div>
14-
15-
<div class="flex__column">Config API</div>
16-
</a>
17-
</li>
18-
196
<li class="menu-item {% if currentPage == "help" %}menu-item--active{% endif %}">
207
<a class="menu-item__link menu-item__link--highlight menu-item__link--icon flex flex--middle" href="{{ site.baseurl }}/help/">
218
<div class="menu-item__icon flex__column">

src/_layouts/main.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
{% include menu/menu-glossary.html %}
1515
{% elsif currentPage[1] == 'partners' %}
1616
{% include menu/menu-partners.html %}
17-
{% elsif currentPage[1] == 'config-api' %}
18-
{% include menu/menu-config-api.html %}
1917
{% else %}
2018
{% include menu/menu.html %}
2119
{% endif %}

src/_sass/components/_markdown.scss

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,16 @@
152152
top: 0;
153153
left: 0;
154154
}
155+
155156
div.highlighter-rouge {
156157
margin: 15px auto;
157158
position: relative;
158159
}
160+
159161
table {
160162
margin: 15px auto;
161163
}
164+
162165
&>ul,
163166
ol {
164167
margin-top: 0;
@@ -213,6 +216,14 @@
213216
line-height: 1.5;
214217
padding: 24px;
215218
}
219+
220+
img {
221+
border: none;
222+
display: inline;
223+
margin: 0;
224+
vertical-align: inherit;
225+
}
226+
216227
}
217228

218229
thead {
@@ -309,7 +320,7 @@
309320
}
310321

311322
//a[target="_blank"]:not(.reference-button):after {
312-
//content: url("/docs/images/external-link-alt-solid.svg");
323+
//content: url("/docs/images/external-link-alt-solid.svg");
313324
// margin-left: 4px;
314325
//}
315326

@@ -406,12 +417,14 @@ div.highlighter-rouge {
406417
right: 0;
407418
border-radius: 0 0.15rem;
408419
width: 40px;
420+
409421
img {
410422
width: 16px;
411423
margin: 0;
412424
border: none;
413425
border-radius: 0px;
414426
}
427+
415428
img:hover {
416429
filter: invert(65%) sepia(9%) saturate(784%) hue-rotate(192deg) brightness(91%) contrast(87%);
417430
transition: 0.2s ease-out;
@@ -422,7 +435,7 @@ div.highlighter-rouge {
422435
}
423436
}
424437

425-
.green{
438+
.green {
426439
background-color: #BAE5D5;
427440
content: "copied!";
428441
}

src/config-api/api-design.md renamed to src/api/config-api/api-design.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: API Design
33
---
44

5+
{% include content/papi-ga.html %}
6+
57
## API Evolution: Versioning and Compatibility
68

79
Segment strives to maintain a strict contract around the stability of our APIs once they reach maturity.

src/config-api/authentication.md renamed to src/api/config-api/authentication.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: Authentication
33
---
44

5+
{% include content/papi-ga.html %}
6+
7+
58
You can access the Config API programmatically using access tokens. When you authenticate with an access token, you have access to any resource and permission assigned to the token.
69

710
## Create an Access Token

src/config-api/fql.md renamed to src/api/config-api/fql.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: Destination Filter Query Language
33
---
44

5+
{% include content/papi-ga.html %}
6+
7+
58
Destination Filter Reference documentation can be found in the [main Config API reference docs](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5).
69

710
Filter Query Language ("FQL") is a simple language for filtering JSON objects used by the Transformations API to conditionally apply transformations. In the Transformations API, FQL statements evaluate to `true` or `false` based on the contents of each Segment event. If the statement evaluates to `true`, the transformation is applied, and if it is `false` the transformation is not applied.

0 commit comments

Comments
 (0)