
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@cycleplatform/cycle-api
Advanced tools
Seeking to extend the platform's functionalities? Tie into this REST-based API client and interact programmatically based on your application's needs.
For detailed documentation, please see the official Cycle API Docs
Seeking to extend the platform's functionalities? Tie into this REST-based API client and interact programmatically based on your application's needs.
All requests follow this format:
curl https://api.cycle.io/v1/<resource> \
-H "Authorization: Bearer API_KEY" \
-H "X-Hub-Id=HUB_ID"
All API responses are returned as JSON. There is also support for cross-origin resource sharing, meaning this API can be used in a client-side web application as well.
npm install @cycleplatform/cycle-api
yarn add @cycleplatform/cycle-api
Using node client with TypeScript to create a new environment.
Request:
To perform this request environment-create permissions are necessary.
import { Environments } from "@cycleplatform/cycle-api";
/* This is a visualization of the partial response object
* you receive when creating an Environment. Full response
* type is avaliable as `Environments.Environment` and can be found here
*/
type EnvironmentT = {
id: string;
name: string;
cluster: string;
about?: {
description: string;
favorite: boolean;
};
...
};
async function createEnv() {
const response: Environments.Environment = Environments.create({
// sensative keys should always be stored and an env variable
token: process.env.CYCLE_API_KEY,
hubId: process.env.HUB_ID,
value: {
name: "My New Environment",
cluster: "production",
// About is an optional field
about: {
description: "Test environment"
},
features: {
legacy_networking: false,
},
// Stacks is an optional field
stack: {
// replace with stack id
id: STACK_ID,
// replace with build id
build_id: BUILD_ID
}
}
});
if (!response.ok) {
// Do something with the error
console.log(response);
return;
}
// Do something with successful reponse
console.log(response);
return;
}
createEnv();
Successful Response:
This response has been truncated. To view the full response of creating an environment, please click here.
// console.log(response)
{
"ok": true,
"error": {},
"value": {
"data": {
"id" : "5cec602e4146380001934759",
"name": "My New Environment",
"about" : {
"description": "Test environment",
"favorite": false,
},
"cluster": "prodction",
...
}
}
}
Failed Response:
All failed API requests follow the same error response format. To view more details about the error response object, please click here.
// console.log(response)
// This error would be given if the cluster does not exist
{
"ok": false,
"error": {
"status": 422,
"code": "422.invalid_input",
"title": "Cluster is not valid"
},
"value": {}
}
Error Response Codes:
We accept issues and PRs from the community! Any and all feedback is greatly appreciated. The public repository can be found here.
FAQs
Cycle API Client
We found that @cycleplatform/cycle-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.