Skip to content

Commit

Permalink
[FND-3175] Preparations for embedding this into https://developer.co…
Browse files Browse the repository at this point in the history
…balt.io/` (#196)

* Remove logo

Logo won't be needed when the site is embedded because the embedding
site will have a logo.

* Remove link to the v1 docs

Because it doesn't make sense in an embedded context. The embedding site
will provide a link to the v1 docs instead.

* Update outdated hosting information in the README

* Open external links in new tab and internal links w/o full URL(for v2)

* Update API versions paragraph for v1

Update the link to v2 from the old to the new product hub link.
Remove the changelog link since it can't non-trivially be linked to now
that it's displayed in an embed.

* Re-add version interlinks to TOC

Since we're not showing v1 in the main site navigation, this will be the
only way to switch between versions.

* Disable link check to v2 from v1

* Line length fixes
  • Loading branch information
Eric Cornelissen authored Sep 21, 2023
1 parent 188be57 commit 238197b
Show file tree
Hide file tree
Showing 22 changed files with 48 additions and 49 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ Dependencies in the repository are managed with Go Modules.

## Hosting

The site uses Netlify's CD pipeline and is hosted at [docs.cobalt.io](https://docs.cobalt.io) using a Cloudflare CNAME
pointed at [cobalt-public-api.netlify.app](https://cobalt-public-api.netlify.app).
The site uses Netlify's CD pipeline and is hosted at [cobalt-public-api.netlify.app](https://cobalt-public-api.netlify.app).
## Deployment
Expand Down
Empty file.
Binary file removed static/images/logo.png
Binary file not shown.
3 changes: 1 addition & 2 deletions versions/v1/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ languages:
weight: 1
title: Cobalt API Documentation
toc_footers:
- <a href='/v2' rel='nofollow'
target='_new'>View `v2` documentation</a>
- <a href='/v2'>View `v2` documentation</a>
- <a href='https://app.cobalt.io/settings/api-token' rel='nofollow'
target='_new'>Create your personal API token</a>
- <a href='https://cobaltio.zendesk.com/hc/en-us'
Expand Down
7 changes: 4 additions & 3 deletions versions/v1/content/api-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ title: API Versions

# API Versions

<!-- markdown-link-check-disable -->
<aside class="warning">
You are currently viewing the documentation of v1 of Cobalt API. Please visit <a href="https://docs.cobalt.io/v2/">docs.cobalt.io/v2</a>
for the documentation of v2 of Cobalt API. If you've integrated with Cobalt API in the past by using v1,
you can use the <a href="https://docs.cobalt.io/v2/#changelog">Changelog</a> to migrate to v2.
You are currently viewing the documentation of v1 of Cobalt API. <a href="/v2">Click here</a>
for the documentation of v2 of Cobalt API.
</aside>
<!-- markdown-link-check-enable -->

## Background

Expand Down
4 changes: 2 additions & 2 deletions versions/v1/content/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ This endpoint retrieves a list of assets that belong to the organization specifi

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|-------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|----------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/assets?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of assets. Example: `https://api.cobalt.io/assets?limit=5` |

Expand Down
2 changes: 1 addition & 1 deletion versions/v1/content/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Authentication
# Authentication

Cobalt uses API tokens to allow access to various endpoints. You can create a new Cobalt API token from within your
[Cobalt profile](https://app.cobalt.io/settings/api-token).
<a href='https://app.cobalt.io/settings/api-token' rel='nofollow' target='_new'>Cobalt profile</a>.

Cobalt expects the API token to be included in all API requests to the server in a header that looks like the following:

Expand Down
4 changes: 2 additions & 2 deletions versions/v1/content/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This endpoint retrieves a list of all events for your account.

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|-------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|----------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/events?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of events. Example: `https://api.cobalt.io/events?limit=5` |
4 changes: 2 additions & 2 deletions versions/v1/content/findings.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ Cobalt Risk Classification (`severity`, a.k.a. `criticality`):

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|---------------------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|------------------------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/findings?cursor=a1b2c3d4` |
| `limit` | `1000` | If specified, returns only a specified amount of findings. Example: `https://api.cobalt.io/findings?limit=5` |
| `pentest` | N/A | If specified, returns findings scoped to this pentest id. Example: `https://api.cobalt.io/findings?pentest=pt_9Ig1234` |
Expand Down
10 changes: 5 additions & 5 deletions versions/v1/content/idempotency.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ title: Idempotency

# Idempotency

The API supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without
accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and
you do not receive a response. For example, if a request to create an asset does not respond due to a network
connection error, you can retry the request with the same idempotency key to guarantee that no more than one
asset is created.
The API supports <a href='https://en.wikipedia.org/wiki/Idempotence' rel='nofollow' target='_new'>idempotency</a>
for safely retrying requests without accidentally performing the same operation twice. This is useful when an API
call is disrupted in transit and you do not receive a response. For example, if a request to create an asset does
not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee
that no more than one asset is created.

To perform an idempotent request, provide an additional `Idempotency-Key: <key>` header to the request. The
header name `Mutation-Check` is also supported for backwards compatibility with previous versions of the API.
Expand Down
3 changes: 2 additions & 1 deletion versions/v1/content/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ title: Introduction

# Introduction

The [Cobalt](https://cobalt.io) API gives you REST access to Organizations, Assets, Pentests, Findings, and Events.
The <a href='https://cobalt.io' rel='nofollow' target='_new'>Cobalt</a> API gives you REST access to Organizations,
Assets, Pentests, Findings, and Events.

<aside class="notice">
We are actively working to improve the usability of our API and welcome your feedback: <strong>integrations@cobalt.io</strong>
Expand Down
4 changes: 2 additions & 2 deletions versions/v1/content/orgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ organization.

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|------------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|---------------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/orgs?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of organizations. Example: `https://api.cobalt.io/orgs?limit=5` |

Expand Down
4 changes: 2 additions & 2 deletions versions/v1/content/pentests.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ This endpoint retrieves a list of all pentests that belong to the organization s

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|-----------------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|--------------------------------------------------------------------------------------------------------------------|
| `asset` | N/A | If specified, returns pentests scoped to this asset id. Example: `https://api.cobalt.io/pentests?asset=as_rvZRC5Y` |
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/pentests?cursor=a1b2c3d4` |
| `limit` | `1000` | If specified, returns only a specified amount of pentests. Example: `https://api.cobalt.io/pentests?limit=5` |
Expand Down
8 changes: 4 additions & 4 deletions versions/v1/content/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ This endpoint retrieves a list of all tokens that belong to you.

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|-------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|----------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/tokens?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of tokens. Example: `https://api.cobalt.io/tokens?limit=5` |

Expand Down Expand Up @@ -86,8 +86,8 @@ Process:
work.

If you've forgotten your token, you can always re-authenticate in the Cobalt web app.
Go to your [profile](https://app.cobalt.io/settings/api-token), revoke the old token you've forgotten, and generate a
new token.
Go to your <a href='https://app.cobalt.io/settings/api-token' rel='nofollow' target='_new'>profile</a>,
revoke the old token you've forgotten, and generate a new token.

### HTTP Request

Expand Down
3 changes: 1 addition & 2 deletions versions/v2/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ languages:
weight: 1
title: Cobalt API Documentation
toc_footers:
- <a href='/v1' rel='nofollow'
target='_new'>View `v1` documentation</a>
- <a href='/v1'>View `v1` documentation</a>
- <a href='https://app.cobalt.io/settings/api-token' rel='nofollow'
target='_new'>Create your personal API token</a>
- <a href='https://cobaltio.zendesk.com/hc/en-us'
Expand Down
4 changes: 2 additions & 2 deletions versions/v2/content/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Authentication
# Authentication

Cobalt uses API tokens to allow access to various endpoints. You can create a new Cobalt API token from within your
[Cobalt profile](https://app.cobalt.io/settings/api-token).
<a href='https://app.cobalt.io/settings/api-token' rel='nofollow' target='_new'>Cobalt profile</a>.

Cobalt expects the API token to be included in all API requests to the server in a header that looks like the following:

Expand All @@ -21,7 +21,7 @@ in our API calls.

To see which organizations you belong to:

- [Send a GET request](https://docs.cobalt.io/v2/#get-all-organizations) to the `/orgs` endpoint.
- [Send a GET request](./#get-all-organizations) to the `/orgs` endpoint.
- Copy the `token` attribute associated with your target organization from response.
- Include it as a header (`X-Org-Token`) to your requests when required.

Expand Down
4 changes: 2 additions & 2 deletions versions/v2/content/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This endpoint retrieves a list of all events for your account.

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|-------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|----------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/events?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of events. Example: `https://api.cobalt.io/events?limit=5` |
10 changes: 5 additions & 5 deletions versions/v2/content/idempotency.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ title: Idempotency

# Idempotency

The API supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without
accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and
you do not receive a response. For example, if a request to create an asset does not respond due to a network
connection error, you can retry the request with the same idempotency key to guarantee that no more than one
asset is created.
The API supports <a href='https://en.wikipedia.org/wiki/Idempotence' rel='nofollow' target='_new'>idempotency</a>
for safely retrying requests without accidentally performing the same operation twice. This is useful when an API
call is disrupted in transit and you do not receive a response. For example, if a request to create an asset does
not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee
that no more than one asset is created.

To perform an idempotent request, provide an additional `Idempotency-Key: <key>` header to the request. The
header name `Mutation-Check` is also supported for backwards compatibility with previous versions of the API.
Expand Down
4 changes: 2 additions & 2 deletions versions/v2/content/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ title: Introduction

# Introduction

The [Cobalt](https://cobalt.io) API gives you REST access to Organizations, Assets, Pentests, Findings, and
Events.
The <a href='https://cobalt.io' rel='nofollow' target='_new'>Cobalt</a> API gives you REST access to Organizations,
Assets, Pentests, Findings, and Events.

<aside class="notice">
We are actively working to improve the usability of our API and welcome your feedback: <strong>integrations@cobalt.io</strong>
Expand Down
4 changes: 2 additions & 2 deletions versions/v2/content/orgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ organization.

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|------------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|---------------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/orgs?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of organizations. Example: `https://api.cobalt.io/orgs?limit=5` |

Expand Down
8 changes: 4 additions & 4 deletions versions/v2/content/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ This endpoint retrieves a list of all tokens that belong to you.

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|-------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|----------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/tokens?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of tokens. Example: `https://api.cobalt.io/tokens?limit=5` |

Expand Down Expand Up @@ -88,8 +88,8 @@ Process:
work.

If you've forgotten your token, you can always re-authenticate in the Cobalt web app.
Go to your [profile](https://app.cobalt.io/settings/api-token), revoke the old token you've forgotten, and generate a
new token.
Go to your <a href='https://app.cobalt.io/settings/api-token' rel='nofollow' target='_new'>profile</a>,
revoke the old token you've forgotten, and generate a new token.

### HTTP Request

Expand Down
4 changes: 2 additions & 2 deletions versions/v2/content/webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ This endpoint retrieves a list of all webhooks that belong to your organization.

### URL Parameters

| Parameter | Default | Description |
|-----------|---------|-----------------------------------------------------------------------------------------------------------------|
| Parameter | Default | Description |
|-----------|---------|--------------------------------------------------------------------------------------------------------------|
| `cursor` | N/A | Used for [pagination](./#pagination). Example: `https://api.cobalt.io/webhooks?cursor=a1b2c3d4` |
| `limit` | `10` | If specified, returns only a specified amount of webhooks. Example: `https://api.cobalt.io/webhooks?limit=5` |

Expand Down

0 comments on commit 238197b

Please sign in to comment.