shiftlabs Start free
Menu Workspace and roles

Workspace and roles

A workspace holds your workflows, their runs and everything they use. Members act in it with one of four roles, and API keys with one of three.

What a workspace holds

Everything you deploy and run belongs to one workspace. Every /v1 call acts on the workspace of the API key or session that makes it. Another workspace's run or trigger answers 404.

  • Workflows and runs

    Workflows with their versions, triggers, schedules and releases, and the runs they start. See Runs and steps and Projects.

  • Credentials and settings

    Secrets, connections and vars, with each workflow's overrides and links.

  • People and keys

    Members, API keys and the audit log, which admins read.

  • Plan and limits

    The workspace's plan and the limits that come with it. GET /v1/me returns them with the workspace. See Limits.

  • After you sign up, you create your workspace and become its first admin. You can create up to 5 workspaces and switch between them from the workspace menu. See Workspaces.
  • You give it a name and an id. The name is 1 to 64 characters, and an admin can rename it on the Workspace screen or with PATCH /v1/workspace.
  • The id is 1 to 63 lowercase letters, digits or hyphens, starting with a letter or digit, and stays the same after a rename. Another workspace's id is refused, and so are the ids our own tests use, such as smoke- or sdk- followed by letters and digits, and ci-sdk.
  • A deleted workspace's id can be taken again. The workspace made with it shares nothing with the deleted one: its workflows load anew, its first upgrade opens its own billing account, and none of the deleted workspace's card checks count for it.

Roles

Every member has one role: viewer, approver, developer or admin, from least to most, and every API key one of viewer, developer or admin. Each role can do everything the roles below it can, but approving: only approvers and admins answer approval requests.

  • viewer

    Reads workflows, runs, logs, vars, secret names and connections. Trigger URLs stay hidden.

  • approver

    Reads what a viewer reads, and approves or denies approval requests. Can't edit, deploy or run anything.

  • developer

    Deploys, runs, re-runs, cancels and pauses workflows, manages triggers, and sets vars and a workflow's connections. Doesn't answer approval requests.

  • admin

    Also answers approval requests, sets secrets and connections, terminates runs, manages members, API keys, billing and alerts, and reads the audit log.

Each route needs one capability, and each role holds a set of them. A caller without the route's capability gets 403 with the role it needs. GET /v1/me lists the caller's role and capabilities. See Roles for every capability.

Members and invitations

Admins invite people by email, each with a role, from Invite on the Workspace screen or with POST /v1/members/invitations {"email", "role"}. The invitation is sent by email, and the answer gives its expires_at.

  • Members are listed with their role and status, active or pending, on the Workspace screen and at GET /v1/members. Only admins see the list.
  • An admin changes a member's role with PATCH /v1/members/:id {"role"}. The member's next request uses the new role.
  • Removing a member with DELETE /v1/members/:id also ends their sessions in this workspace. The same call takes back an invitation not yet accepted.
  • The last active admin can't be demoted or removed: 409. Keep a second admin.
  • A role change is written to the audit log as member_role_set, with the old and new role and who changed it, and a removal as member_remove, with the role, status pending for an invitation, and who removed them. If that entry can't be written, the change is still made and the answer is 502.
  • Invitations per 24 hours depend on the plan. See Limits.
  • Each member and each invitation not yet accepted, revoked or expired takes a seat, and the plan sets how many. See Seats.
  • An admin can end a member's dashboard sessions without removing them. See Sessions.

Seats

Every active member takes a seat, and so does every invitation until it is accepted, revoked or expires. A builder is a developer or an admin. See Roles for what each role can do.

  • Free

    2 seats: one builder, its owner, and one approver.

  • Pro

    1 builder and 1 approver, then up to 2 more builders at $15 a month each.

  • Team

    10 seats of any role, viewers included. Team isn't in Settings → Plan and billing yet: email sales@shiftlabs.org with your workspace to move to it.

  • Business and Enterprise

    No seat limit. Email sales@shiftlabs.org.

  • Free and Pro have no seat for a viewer.
  • An invitation, or a role change into another kind of seat, that the plan has no seat for returns 403 {"error": "plan_required", "reason", "limit", "max", "needs", "plans"}. reason names the limit and the plan that allows more, needs that plan, and plans every plan that does, cheapest first.
  • Accepting an invitation is refused while the plan's seats are taken, for example after a move to a plan with fewer. So is a first sign-in through single sign-on, which takes a seat as a viewer or with the person's invitation's role.
  • A workspace with more members than its plan's seats keeps them all. Only a new seat, or a role change into a full kind of seat, is refused.
  • On Pro, an invitation or role change that adds a paid builder seat first returns 409 {"error": "seat_confirmation_required", "detail", "cents"}, the price it adds a month. Send it again with "confirmPaidSeat": true and "confirmCents" set to cents to add the seat; the dashboard asks you to confirm the price. The seat is billed, prorated, until it's freed.
  • GET /v1/me returns the plan's seats as entitlements.seats.

API keys

An API key belongs to one workspace and has one role. Admins create and revoke keys, and a key is shown only once.

  • capabilities narrows a key to part of what its role allows, such as ["workflow.deploy"] for CI. scope limits it to named workflows or agents.
  • A key never reaches further than the person or key that created it.
  • A key lasts 1 to 365 days, 90 by default. A workspace holds at most 20 active keys.
  • See API keys for the full rules.

Reference

  • Roles

    Every capability and the role that holds it.

  • API keys

    Creating, narrowing, scoping and revoking keys.

  • Sessions

    How long a dashboard session lasts, and how to end one.

  • Plans and billing

    Free and Pro, and who manages billing.