Skip to content

Projects

Projects, their environments and their services.

GET/v1/orgs/{org}/projects

listProjectsRole: viewer or higher

An organization's projects. Rules, environments and services all belong to a project.

Parameters

NameInTypeDescription
orgrequiredpathstringThe organization's slug, as in its URL in the app. Example: "snugghome".
limitqueryintegerHow many items to return, 1 to 200. Default 100.
cursorquerystringA previous page's next_cursor, to fetch the page after it. Omit for the first page.

Example request

Terminal window
curl https://api.spanslice.com/v1/orgs/snugghome/projects \
-H "Authorization: Bearer $SPANSLICE_TOKEN"

Response 200

ListProjectsResponse

Example response
{
"data": [
{
"slug": "snugghome-app",
"name": "SnuggHome App",
"organization": "snugghome",
"created_at": "2026-09-18T12:00:00.000Z"
}
],
"next_cursor": null
}

Errors

StatusCodeWhen
400invalid_requestThe request is invalid; errors says where.
401unauthorizedThe access token is missing, unknown, expired or revoked.
404not_foundIt doesn't exist, or this token can't reach it.

GET/v1/orgs/{org}/projects/{project}

getProjectRole: viewer or higher

One project. A slug the project or its organization had before a rename still finds it.

Parameters

NameInTypeDescription
orgrequiredpathstringThe organization's slug, as in its URL in the app. Example: "snugghome".
projectrequiredpathstringThe project's slug, as in its URL in the app. Example: "snugghome-app".

Example request

Terminal window
curl https://api.spanslice.com/v1/orgs/snugghome/projects/snugghome-app \
-H "Authorization: Bearer $SPANSLICE_TOKEN"

Response 200

Project

Example response
{
"slug": "snugghome-app",
"name": "SnuggHome App",
"organization": "snugghome",
"created_at": "2026-09-18T12:00:00.000Z"
}

Errors

StatusCodeWhen
400invalid_requestThe request is invalid; errors says where.
401unauthorizedThe access token is missing, unknown, expired or revoked.
404not_foundIt doesn't exist, or this token can't reach it.

GET/v1/orgs/{org}/projects/{project}/environments

listEnvironmentsRole: viewer or higher

A project's runtime environments in order. Check requires_commit before changing rules: in an environment that requires commit, changes wait for a commit before its SDKs see them.

Parameters

NameInTypeDescription
orgrequiredpathstringThe organization's slug, as in its URL in the app. Example: "snugghome".
projectrequiredpathstringThe project's slug, as in its URL in the app. Example: "snugghome-app".
limitqueryintegerHow many items to return, 1 to 200. Default 100.
cursorquerystringA previous page's next_cursor, to fetch the page after it. Omit for the first page.

Example request

Terminal window
curl https://api.spanslice.com/v1/orgs/snugghome/projects/snugghome-app/environments \
-H "Authorization: Bearer $SPANSLICE_TOKEN"

Response 200

ListEnvironmentsResponse

Example response
{
"data": [
{
"slug": "staging",
"name": "Staging",
"description": null,
"requires_commit": false,
"position": 0
},
{
"slug": "production",
"name": "Production",
"description": null,
"requires_commit": true,
"position": 1
}
],
"next_cursor": null
}

Errors

StatusCodeWhen
400invalid_requestThe request is invalid; errors says where.
401unauthorizedThe access token is missing, unknown, expired or revoked.
404not_foundIt doesn't exist, or this token can't reach it.

GET/v1/orgs/{org}/projects/{project}/environments/{environment}

getEnvironmentRole: viewer or higher

One runtime environment of a project: whether it requires commit, and so whether changes reach its SDKs at once or wait as pending changes.

Parameters

NameInTypeDescription
orgrequiredpathstringThe organization's slug, as in its URL in the app. Example: "snugghome".
projectrequiredpathstringThe project's slug, as in its URL in the app. Example: "snugghome-app".
environmentrequiredpathstringThe environment's slug, as in its URL in the app. Example: "production".

Example request

Terminal window
curl https://api.spanslice.com/v1/orgs/snugghome/projects/snugghome-app/environments/production \
-H "Authorization: Bearer $SPANSLICE_TOKEN"

Response 200

Environment

Example response
{
"slug": "production",
"name": "Production",
"description": null,
"requires_commit": true,
"position": 1
}

Errors

StatusCodeWhen
400invalid_requestThe request is invalid; errors says where.
401unauthorizedThe access token is missing, unknown, expired or revoked.
404not_foundIt doesn't exist, or this token can't reach it.

GET/v1/orgs/{org}/projects/{project}/services

listServicesRole: viewer or higher

A project's services, by name, with the environments each is deployed to. A rule can apply to the whole project or to one service.

Parameters

NameInTypeDescription
orgrequiredpathstringThe organization's slug, as in its URL in the app. Example: "snugghome".
projectrequiredpathstringThe project's slug, as in its URL in the app. Example: "snugghome-app".
limitqueryintegerHow many items to return, 1 to 200. Default 100.
cursorquerystringA previous page's next_cursor, to fetch the page after it. Omit for the first page.

Example request

Terminal window
curl https://api.spanslice.com/v1/orgs/snugghome/projects/snugghome-app/services \
-H "Authorization: Bearer $SPANSLICE_TOKEN"

Response 200

ListServicesResponse

Example response
{
"data": [
{
"slug": "api",
"name": "Api",
"description": null,
"language": "nodejs",
"repository_url": "https://github.com/acme/api",
"environments": [
"staging",
"production"
]
},
{
"slug": "worker",
"name": "Worker",
"description": null,
"language": "ruby",
"repository_url": null,
"environments": [
"staging"
]
}
],
"next_cursor": null
}

Errors

StatusCodeWhen
400invalid_requestThe request is invalid; errors says where.
401unauthorizedThe access token is missing, unknown, expired or revoked.
404not_foundIt doesn't exist, or this token can't reach it.