Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADAPP-18865 rework Reports Service API docs #1155

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
^https?:\/\/(www.)?api\.adjust\.com(?:\/.*)?$
^https?:\/\/(www.)?automate\.adjust\.com(?:\/.*)?$
^https?:\/\/(www.)?example\.go\.link(?:\/.*)?$
^https?:\/\/(www.)?dash\.adjust\.com\/control-center(?:\/.*)?$
^https?:\/\/(www.)?segment\.com(?:\/.*)?$
Expand Down
5 changes: 4 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const prependLocaleToJSON = (input, locales) => {

for (const [key, value] of Object.entries(input)) {
const localeRegex = /^\/[a-z]{2}\//;
if (localeRegex.exec(value)) return;
if (localeRegex.exec(key)) {
result[key] = value;
continue;
}
locales.forEach((locale) => {
result[`/${locale}${key}`] = `/${locale}${value}`;
});
Expand Down
10 changes: 10 additions & 0 deletions markdoc.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ export default defineMarkdocConfig({
}
}
},
icon: {
render: component("src/components/Icon.astro"),
attributes: {
type: {
type: String,
required: true,
matches: ["Trash", "Pencil", "Person", "CogWheel", "Check", "Cross", "Copy"]
}
}
},
deflist: {
render: component("src/components/DefList.astro"),
},
Expand Down
13 changes: 13 additions & 0 deletions src/components/Icon.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
interface Props {
type: string;
}

const { type } = Astro.props;
---

<span class="inline-block align-middle">
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24">
<use href=`#${type}-inline-icon`></use>
</svg>
</span>
133 changes: 133 additions & 0 deletions src/components/Layout/Icons/UiIcons.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<symbol
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
role="img"
fill-rule="evenodd"
id="Trash-inline-icon"
style="width: 24px; height: 24px;"
>
<path
stroke="currentColor"
d="M4 5.5h16M10.5 8v9M13.5 8v9M17.5 5.5v13a1 1 0 01-1 1h-9a1 1 0 01-1-1v-13M14.5 5.5v-2h-5v2"
></path></symbol
>
<symbol
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
role="img"
fill-rule="evenodd"
id="Pencil-inline-icon"
style="width: 24px; height: 24px;"
>
<path
fill-rule="evenodd"
stroke="currentColor"
d="M6.5 19.5l1-4 8.494-10.282a1 1 0 011.343-.197l1.273.87c.481.329.58.997.216 1.45L10.5 17.5l-4 2z"
></path></symbol
>
<symbol
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
role="img"
fill-rule="evenodd"
id="Person-inline-icon"
style="width: 24px; height: 24px;"
>
<circle cx="12" cy="7" r="3.5" stroke="currentColor"></circle>
<path
stroke="currentColor"
d="M8 16.999a4.98 4.98 0 00-.984 2.597c-.04.512.4.904.914.904h8.14c.514 0 .955-.392.914-.904A4.98 4.98 0 0016 17"
></path>
<path
stroke="currentColor"
d="M12 12.5A7.5 7.5 0 004.5 20a.5.5 0 00.5.5h14a.5.5 0 00.5-.5 7.5 7.5 0 00-7.5-7.5z"
></path></symbol
>
<symbol
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
role="img"
fill-rule="evenodd"
id="CogWheel-inline-icon"
style="width: 24px; height: 24px;"
>
<path
fill-rule="evenodd"
stroke="currentColor"
d="M14.5 12a2.5 2.5 0 10-5 0 2.5 2.5 0 005 0z"
clip-rule="evenodd"></path>
<path
fill-rule="evenodd"
stroke="currentColor"
d="M20.5 13v-2l-1.892-.434a.548.548 0 01-.364-.354 6.528 6.528 0 00-.565-1.362.548.548 0 01.008-.509l1.031-1.644-1.414-1.415-1.645 1.032a.548.548 0 01-.509.007 6.431 6.431 0 00-1.362-.565.548.548 0 01-.354-.365L13 3.5h-2l-.434 1.891a.548.548 0 01-.354.365 6.475 6.475 0 00-1.362.565.548.548 0 01-.509-.007L6.697 5.282 5.282 6.697l1.032 1.644a.548.548 0 01.007.509 6.475 6.475 0 00-.565 1.362.548.548 0 01-.365.354L3.5 11v2l1.891.434c.16.036.32.197.365.354.137.48.328.936.565 1.362.08.143.08.371-.007.509l-1.032 1.645 1.415 1.414 1.644-1.031a.548.548 0 01.509-.008c.427.237.882.427 1.362.565a.548.548 0 01.354.364L11 20.5h2l.434-1.892a.548.548 0 01.354-.364c.48-.138.936-.328 1.362-.565a.548.548 0 01.509.008l1.645 1.031 1.414-1.414-1.031-1.645a.548.548 0 01-.008-.509c.237-.426.427-.882.565-1.362a.548.548 0 01.364-.354L20.5 13z"
clip-rule="evenodd"></path>
</symbol>
<symbol
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
role="img"
fill-rule="evenodd"
id="Check-inline-icon"
style="width: 24px; height: 24px;"
><path stroke="currentColor" d="M19.5 6.5l-9 10-6-6"></path>
</symbol>
<symbol
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
role="img"
fill-rule="evenodd"
id="Cross-inline-icon"
style="width: 24px; height: 24px;"
><path stroke="currentColor" d="M18 6L6 18M6 6l12 12"></path>
</symbol>
<symbol
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
class="Icon__Icon___qSYIn___MTcuNy4w"
role="img"
fill-rule="evenodd"
id="Copy-inline-icon"
style="width: 24px; height: 24px;"
><path
fill-rule="evenodd"
stroke="currentColor"
d="M18.5 19.5h-7a1 1 0 01-1-1v-7a1 1 0 011-1h7a1 1 0 011 1v7a1 1 0 01-1 1z"
clip-rule="evenodd"></path><path
stroke="currentColor"
d="M8 13.5H5.5a1 1 0 01-1-1v-7a1 1 0 011-1h7a1 1 0 011 1V8"></path></symbol
>
2 changes: 2 additions & 0 deletions src/components/Layout/Icons/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import BadgeIcons from "./BadgeIcons.astro";
import CalloutIcons from "./CalloutIcons.astro";
import TabIcons from "./TabIcons.astro";
import UiIcons from "./UiIcons.astro";
---

<svg
Expand All @@ -26,4 +27,5 @@ import TabIcons from "./TabIcons.astro";
<BadgeIcons />
<CalloutIcons />
<TabIcons />
<UiIcons />
</svg>
26 changes: 26 additions & 0 deletions src/content/docs/en/api/_authentication.mdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Authentication {% #authentication %}

Adjust uses [Bearer tokens](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication) for authentication. You MUST include your Adjust API token in an `Authorization` header with each request you make to Adjust's APIs.

If your organization has enabled Single Sign-On (SSO), contact your Adjust representative or email [email protected] for help with finding your API token.

For non-SSO accounts, API tokens are located in a user's **profile**. To find your token, follow these steps:

1. Select the account icon ({% icon type="Person" /%}).
1. Select **Account settings**.
1. Select the **My profile** tab.

Check warning on line 11 in src/content/docs/en/api/_authentication.mdoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/en/api/_authentication.mdoc#L11

[Microsoft.FirstPerson] Use first person (such as 'My') sparingly.
Raw output
{"message": "[Microsoft.FirstPerson] Use first person (such as 'My') sparingly.", "location": {"path": "src/content/docs/en/api/_authentication.mdoc", "range": {"start": {"line": 11, "column": 17}}}, "severity": "WARNING"}
1. Your **API Token** is shown with your **User Details**. Select the copy button ({% icon type="Copy" /%}) to copy the token to your system clipboard.

### Reset your Adjust API token {% #reset-your-adjust-api-token %}

You can reset your Adjust API token at any time. Resetting your token invalidates the old token. If you reset your Adjust API token, you MUST replace your old token anywhere that you're using it. Requests made with an invalidated token are rejected by Adjust.

To reset your Adjust API token:

1. Select the account icon ({% icon type="Person" /%}).
1. Select **Account settings**.
1. Select the **My Profile** tab.

Check warning on line 22 in src/content/docs/en/api/_authentication.mdoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/en/api/_authentication.mdoc#L22

[Microsoft.FirstPerson] Use first person (such as 'My') sparingly.
Raw output
{"message": "[Microsoft.FirstPerson] Use first person (such as 'My') sparingly.", "location": {"path": "src/content/docs/en/api/_authentication.mdoc", "range": {"start": {"line": 22, "column": 17}}}, "severity": "WARNING"}
1. Your **API Token** is shown with your **User details**.
1. Select **Reset API token**.
1. Enter your account password in the modal that appears and select **Reset** to reset your API token. A confirmation appears in the top right of the screen.
1. Select the copy button ({% icon type="Copy" /%}) next to the **API Token** to copy the token to your system clipboard.
Loading