
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@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
The npm package @cycleplatform/cycle-api receives a total of 12 weekly downloads. As such, @cycleplatform/cycle-api popularity was classified as not popular.
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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.