Skip to content
1Claw Academy
Curriculum/Foundations3 minBeginner · Lesson 13 of 13

Lab: verify the docs against the live API

Lab

Fetch 1Claw's real, live OpenAPI spec and confirm the endpoints this course has been telling you about actually exist, with the same method used to build the course.

Every curl command in this course was checked against the live OpenAPI spec before being written down, and the check is short enough to run yourself. This is the method, not a special case of it.

  1. 1

    Fetch the real specification. It is public, current, and generated from the same code that serves the API.

    code
    curl -s https://api.1claw.co/openapi.json -o /tmp/spec.json
    python3 -c "import json; print(len(json.load(open('/tmp/spec.json'))['paths']), 'documented paths')"
  2. 2

    472 paths, give or take, and that number itself will grow as the API does.

    text
    472 documented paths
  3. 3

    Hundreds of paths. Confirm the one lesson two lessons ago actually rests on: creating a secret.

    code
    python3 -c "
    import json
    spec = json.load(open('/tmp/spec.json'))
    path = '/v1/vaults/{vault_id}/secrets/{path}'
    print(path, 'exists:', path in spec['paths'])
    print('methods:', list(spec['paths'][path].keys()))
    "
  4. 4

    Confirmed, with the exact methods available on it.

    text
    /v1/vaults/{vault_id}/secrets/{path} exists: True
    methods: ['put', 'get', 'delete']
  5. 5

    Now check something this course has not shown you yet, from a track further along.

    code
    python3 -c "
    import json
    spec = json.load(open('/tmp/spec.json'))
    hits = [p for p in spec['paths'] if 'rotate-key' in p]
    print(hits)
    "
  6. 6

    Two matches, and the agent one is exactly what the compliance track's endpoint reference names.

    text
    ['/v1/agents/{agent_id}/rotate-key', '/v1/platform/apps/{appId}/rotate-key']

You just independently confirmed a claim from a lesson you have not read yet: an endpoint exists for rotating an agent's API key, at the path the compliance track states it at. That is not a coincidence and it is not something you should take on faith either.

  • The spec is generated from the server's actual routes, not written by hand and left to drift. A path documented here is a path that exists, right now, in production.
  • This is also how you would catch a course going stale. If a future 1Claw release renamed an endpoint, this exact check would show you a missing path before you wasted an hour debugging a 404.
  • The same method scales to anything: a CLI flag, an SDK method, an MCP tool name. Whenever a course, a blog post, or a colleague states a technical fact about a live system, there is usually a primary source you can query directly.
Tip

This is the single habit that would have caught the most mistakes in early drafts of this course. Several were: a CLI subcommand that did not exist, an SDK method with the wrong argument order, a claimed endpoint that was actually two endpoints. All were found this way, not by reading more carefully.

Watch out

A spec existing is not the same as a feature being available to your account. Tier gates, feature flags, and plan limits are real and are not always visible in the schema, so treat this as confirming the shape of the API, not your access to it.

Check your understanding

3 questions
1

Why does confirming a path in the live OpenAPI spec matter more than trusting a course or a blog post?

2

What does confirming a path in the spec NOT tell you?

3

What is the practical value of being able to run this check yourself?