15 matching sections
Getting started
Choose an endpoint in the API Playground, edit the sample request, and send it. The response is generated from fictional data in this browser.
Authentication concepts
Authentication would usually establish a request identity. This sandbox accepts no credentials. Its example headers describe the response format only.
Error handling
A 400 indicates invalid input. A 404 means the selected fictional record is absent, including after removal. A successful DELETE returns 204 and an empty body.
Rate limits
The sandbox allows 20 submitted requests per reset. After that it returns 429. The x-ratelimit-remaining response header shows the remaining allowance. Clearing history leaves that allowance unchanged.
Pagination
List projects supports limit (1–25, default 10) and a zero-based offset (default 0). A null nextOffset signals the final page.
SDK examples
The playground generates cURL, JavaScript fetch and Python requests examples from the current request. They use the reserved .example hostname and are illustrative.
const response = await fetch("https://api.devline.example/v1/projects?limit=10&offset=0", {
method: "GET",
headers: { Accept: "application/json" },
});
console.log(await response.json());List projects
/v1/projectsRead the current sandbox project collection.
Parameters
- limit · Query
- Page size from 1 through 25.
- offset · Query
- Zero-based record offset.
Example request
curl -X GET 'https://api.devline.example/v1/projects?limit=10&offset=0' \
-H 'Accept: application/json'Example response · 200
{
"items": [
{
"id": "prj_atlas",
"name": "Atlas Console"
},
{
"id": "prj_north",
"name": "Northstar Build"
},
{
"id": "prj_river",
"name": "River Internal"
}
],
"total": 3,
"nextOffset": null
}200 OK · 400 Bad Request · 429 Too Many Requests
Retrieve a project
/v1/projects/{projectId}Read one project by its fictional identifier.
Parameters
- projectId · Path
- Fictional project identifier.
Example request
curl -X GET 'https://api.devline.example/v1/projects/prj_atlas' \
-H 'Accept: application/json'Example response · 200
{
"id": "prj_atlas",
"name": "Atlas Console"
}200 OK · 400 Bad Request · 404 Not Found · 429 Too Many Requests
Create a project
/v1/projectsCreate a project in the in-memory sandbox. Name must contain 2–60 characters.
Parameters
JSON body with a name field.
Example request
curl -X POST 'https://api.devline.example/v1/projects' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"name": "Beacon Studio"
}'Example response · 201
{
"id": "prj_demo_1",
"name": "Beacon Studio"
}201 Created · 400 Bad Request · 429 Too Many Requests
Update a project
/v1/projects/{projectId}Replace a project name with a name of 2–60 characters.
Parameters
- projectId · Path
- Fictional project identifier.
Example request
curl -X PATCH 'https://api.devline.example/v1/projects/prj_atlas' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"name": "Atlas Next"
}'Example response · 200
{
"id": "prj_atlas",
"name": "Atlas Next"
}200 OK · 400 Bad Request · 404 Not Found · 429 Too Many Requests
Delete a project
/v1/projects/{projectId}Remove one local project and its example deployment and environment records.
Parameters
- projectId · Path
- Fictional project identifier.
Example request
curl -X DELETE 'https://api.devline.example/v1/projects/prj_atlas' \
-H 'Accept: application/json'Example response · 204
This response has no body.
204 No Content · 400 Bad Request · 404 Not Found · 429 Too Many Requests
List deployments
/v1/deploymentsRead fictional deployment summaries. Empty project IDs include every project.
Parameters
- projectId · Query
- Fictional project identifier.
Example request
curl -X GET 'https://api.devline.example/v1/deployments?projectId=prj_atlas' \
-H 'Accept: application/json'Example response · 200
{
"items": [
{
"id": "dep_201",
"projectId": "prj_atlas",
"environment": "preview",
"status": "ready"
},
{
"id": "dep_202",
"projectId": "prj_atlas",
"environment": "production",
"status": "ready"
}
]
}200 OK · 404 Not Found · 429 Too Many Requests
Retrieve a deployment
/v1/deployments/{deploymentId}Read a fictional deployment and its recorded state.
Parameters
- deploymentId · Path
- Fictional deployment identifier.
Example request
curl -X GET 'https://api.devline.example/v1/deployments/dep_201' \
-H 'Accept: application/json'Example response · 200
{
"id": "dep_201",
"projectId": "prj_atlas",
"environment": "preview",
"status": "ready"
}200 OK · 400 Bad Request · 404 Not Found · 429 Too Many Requests
List environments
/v1/environmentsRead sample environments for a project. Empty project IDs include every project.
Parameters
- projectId · Query
- Fictional project identifier.
Example request
curl -X GET 'https://api.devline.example/v1/environments?projectId=prj_atlas' \
-H 'Accept: application/json'Example response · 200
{
"items": [
{
"id": "env_101",
"projectId": "prj_atlas",
"name": "preview"
},
{
"id": "env_102",
"projectId": "prj_atlas",
"name": "production"
}
]
}200 OK · 404 Not Found · 429 Too Many Requests
Get usage summary
/v1/usageRead a fixed usage fixture for a supported reporting window.
Parameters
- period · Query
- Use 7d or 30d.
Example request
curl -X GET 'https://api.devline.example/v1/usage?period=7d' \
-H 'Accept: application/json'Example response · 200
{
"period": "7d",
"requests": 18240,
"unit": "requests",
"dataset": "fictional"
}200 OK · 400 Bad Request · 429 Too Many Requests