Skip to content

Commit 3cc1f07

Browse files
authored
Merge pull request #410 from smallstep/carl/clarity
Update API docs for new schema
2 parents 1baaa61 + 59e58b5 commit 3cc1f07

File tree

2 files changed

+22
-31
lines changed

2 files changed

+22
-31
lines changed

platform/smallstep-api.mdx

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
---
2+
updated_at: June 18, 2025
23
title: Smallstep API
34
html_title: Smallstep API
45
description: The Smallstep platform is used across security, IT, and DevOps teams to enable end-to-end network encryption, privileged access management, passwordless authentication, and much more.
56
---
67

7-
With the Smallstep API, you can:
8+
With the Smallstep API, you can manage:
89

9-
- Register new devices in your Smallstep inventory
10-
- Manage your high-level protected resources, such as Wi-Fi or VPN configurations
11-
- Manage low-level resources like X.509 CAs, Attestation authorities, and provisioners
12-
- Manage hosts, host grants, and tags for [Smallstep SSH](../ssh/README.mdx)
10+
- Devices in your Smallstep inventory
11+
- High-level protected resources, such as Wi-Fi or VPN configurations
12+
- Lower-level PKI resources like X.509 CAs and provisioners
13+
- [Smallstep SSH](../ssh/README.mdx) hosts, host grants, and tags (use the [2023-11-01](https://gateway.smallstep.com/v2023-11-01) API version for this)
1314
- And more!
1415

1516
The Smallstep API is [OpenAPI conformant](https://www.openapis.org/), with JSON requests and responses.
1617

1718
### Smallstep API Setup and Usage
1819

19-
👉 [Smallstep API Specification and Playground](https://gateway.smallstep.com)
20+
👉 [Smallstep API Specification and Playground](https://gateway.smallstep.com/v2025-01-01)
2021

2122
You can get an API token in two ways:
22-
- **Long-term token**: In your [Smallstep settings](https://smallstep.com/app?next=/settings). Under **API Tokens**, choose **+ Add Token.** This token has a 10 year validity period and will only be displayed once. Please store it in a safe place!
23-
- **Short-term token**: On the command line, using the [`step` CLI](../step-cli/README.mdx). The [`step api token create`](../step-cli/reference/api/token/create/README.mdx) command accepts a client certificate and private key to authenticate with Smallstep and issue a temporary API token with a 1 hour validity period.
24-
To use this option, you must configure a trusted root CA in your [Smallstep settings](https://smallstep.com/app?next=/settings). The trusted root can be a Smallstep CA or an external CA. Only one trusted root CA may be configured.
23+
- **Smallstep UI**: [Add a token in Smallstep settings](https://smallstep.com/app/?next=/settings/api/tokens/add). You can choose the validity period and scopes here.
24+
- **Command Line**: On the command line, using the [`step` CLI](../step-cli/README.mdx). The [`step api token create`](../step-cli/reference/api/token/create/README.mdx) command accepts a client certificate and private key to authenticate with Smallstep and issue a temporary API token with a 1 hour validity period.
25+
To use this option, you must [configure one or more trusted root CAs in the Smallstep UI](https://smallstep.com/app/?next=/settings/api/trusted-roots/edit). Trusted roots can be Smallstep CAs or external CAs.
2526

2627
### API Clients
2728

@@ -36,34 +37,24 @@ Devices added via API are automatically approved.
3637
but they will not be marked as high-assurance
3738
until Smallstep receives an attestation from the device.
3839

39-
For each device, use the [Save Collection Instance](https://gateway.smallstep.com/v2023-11-01/operations/PutCollectionInstance) endpoint to create a device.
40-
- For the `collectionSlug`, use `default`
41-
- For Apple devices, the `instanceID` must be the device's serial number.
42-
- For TPM 2.0 devices, the `instanceID` must be the TPM Endorsement Key URI, in the format `urn:ek:sha256:ul3sYf6uQ6jVEXAMPLEXoAuHI10U8gTvEJ6bMj95LXI=`. (You can retrieve the EK URI by running `step agent tpm --fingerprint` on the device.)
43-
44-
For the body of the request,
45-
create a user using the following value
46-
(replacing `[email protected]` with the device owner's email address):
47-
48-
```
49-
{
50-
"data": {
51-
"name": "Carl's MacBook Pro",
52-
"smallstep:identity": "[email protected]"
53-
}
54-
}
55-
```
40+
Use the [Add Device](https://gateway.smallstep.com/v2025-01-01/operations/PostDevices) endpoint to create a device.
41+
- For Apple devices, the `permanentIdentifier` must be the device's 9-character serial number.
42+
- For TPM 2.0 devices, the `permanentIdentifier` must be the TPM Endorsement Key URI, in the format `urn:ek:sha256:ul3sYf6uQ6jVEXAMPLEXoAuHI10U8gTvEJ6bMj95LXI=`. (You can retrieve the EK URI by running `step agent tpm --fingerprint` on the device.)
43+
- To create and assign a user to a device, fill in the `user` fields.
5644

5745
Once added,
5846
the devices will be automatically approved.
5947

60-
You can see the device using the [ListCollectionInstances](https://gateway.smallstep.com/v2023-11-01/operations/ListCollectionInstances) endpoint:
48+
You can see the device using the [List Devices](https://gateway.smallstep.com/v2025-01-01/operations/ListDevices) endpoint:
6149

6250
```bash
6351
set +o history
64-
echo "Authorization: Bearer [your token]" > api_headers
52+
echo "Authorization: Bearer [your API token]" > api_headers
6553
set -o history
66-
curl -sH @api_headers https://gateway.smallstep.com/api/collections/default/items | jq
54+
curl -sH @api_headers --request GET \
55+
--url https://gateway.smallstep.com/api/devices \
56+
--header 'Accept: application/json' \
57+
--header 'x-smallstep-api-version: 2025-01-01' | jq
6758
```
6859

6960
Or, in your Smallstep dashboard,

tutorials/connect-jamf-pro-to-smallstep.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
updated_at: April 15, 2025
2+
updated_at: May 07, 2025
33
title: Connect Jamf Pro to Smallstep
44
html_title: Connect Jamf Pro to Smallstep
55
description: Configure Jamf Pro to deploy the Smallstep Agent and distribute certificates and configuration to Mac clients.
@@ -142,7 +142,7 @@ Next, we’ll configure the Script we just created to run on your client devices
142142

143143
### Configure an Agent Enrollment Profile
144144

145-
In this step, we’ll tie everything together by configuring Jamf to distribute the Smallstep Agent.
145+
In this step, we’ll tie everything together by creating a managed policy to enroll devices using the Smallstep Agent.
146146

147147
1. In the Smallstep dashboard, choose **Certificate Manager**
148148
1. Select [Authorities](https://smallstep.com/app/?next=/cm/authorities)

0 commit comments

Comments
 (0)