Networks

API reference for Networks on CUDO Compute.

Reference
GET
/v1/projects/{projectId}/networks

List networks

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    pageNumber
    Type
    integer
    Description
  • Name
    pageSize
    Type
    integer
    Description
Request
GET
/v1/projects/{projectId}/networks
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "networks": [
    {
      "projectId": "string",
      "id": "string",
      "dataCenterId": "string",
      "ipRange": "string",
      "gateway": "string",
      "priceHr": {
        "value": "string"
      },
      "externalIpAddress": "string",
      "internalIpAddress": "string",
      "vmState": "string",
      "createTime": "string",
      "state": "string"
    }
  ],
  "totalCount": "integer",
  "pageNumber": "integer",
  "pageSize": "integer"
}

    
  

POST
/v1/projects/{projectId}/networks

Create network

Body attributes

  • Name
    id
    Type
    string
    Description
  • Name
    dataCenterId
    Type
    string
    Description
  • Name
    ipRange
    Type
    string
    Description

Path attributes

  • Name
    projectId
    Type
    string
    Description
Request
POST
/v1/projects/{projectId}/networks
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
    "id": "string",
    "dataCenterId": "string",
    "ipRange": "string"
}'

    
  
Response
    
    {
  "projectId": "string",
  "id": "string",
  "dataCenterId": "string",
  "ipRange": "string",
  "gateway": "string",
  "priceHr": {
    "value": "string"
  },
  "externalIpAddress": "string",
  "internalIpAddress": "string",
  "vmState": "string",
  "createTime": "string",
  "state": "string"
}

    
  

GET
/v1/projects/{projectId}/networks/security-groups

List security groups

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    dataCenterId
    Type
    string
    Description
  • Name
    pageNumber
    Type
    integer
    Description
  • Name
    pageSize
    Type
    integer
    Description
Request
GET
/v1/projects/{projectId}/networks/security-groups
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/security-groups' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "securityGroups": [
    {
      "projectId": "string",
      "dataCenterId": "string",
      "id": "string",
      "description": "string",
      "rules": [
        {
          "id": "string",
          "protocol": "string",
          "ports": "string",
          "ruleType": "string",
          "ipRangeCidr": "string",
          "icmpType": "string"
        }
      ]
    }
  ],
  "totalCount": "integer",
  "pageNumber": "integer",
  "pageSize": "integer"
}

    
  

POST
/v1/projects/{projectId}/networks/security-groups

Create security group

Body attributes

  • Name
    dataCenterId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
  • Name
    description
    Type
    string
    Description
  • Name
    rules
    Type
    array
    Description

Path attributes

  • Name
    projectId
    Type
    string
    Description
Request
POST
/v1/projects/{projectId}/networks/security-groups
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/security-groups' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
    "dataCenterId": "string",
    "id": "string",
    "description": "string",
    "rules": "array"
}'

    
  
Response
    
    {
  "projectId": "string",
  "dataCenterId": "string",
  "id": "string",
  "description": "string",
  "rules": [
    {
      "id": "string",
      "protocol": "string",
      "ports": "string",
      "ruleType": "string",
      "ipRangeCidr": "string",
      "icmpType": "string"
    }
  ]
}

    
  

GET
/v1/projects/{projectId}/networks/security-groups/{id}

Get a security group

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
GET
/v1/projects/{projectId}/networks/security-groups/{id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/security-groups/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "projectId": "string",
  "dataCenterId": "string",
  "id": "string",
  "description": "string",
  "rules": [
    {
      "id": "string",
      "protocol": "string",
      "ports": "string",
      "ruleType": "string",
      "ipRangeCidr": "string",
      "icmpType": "string"
    }
  ]
}

    
  

DELETE
/v1/projects/{projectId}/networks/security-groups/{id}

Delete security group

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
DELETE
/v1/projects/{projectId}/networks/security-groups/{id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/security-groups/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}

    
  

PATCH
/v1/projects/{projectId}/networks/security-groups/{id}

Update security group

Body attributes

  • Name
    dataCenterId
    Type
    string
    Description
  • Name
    description
    Type
    string
    Description
  • Name
    rules
    Type
    array
    Description

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
PATCH
/v1/projects/{projectId}/networks/security-groups/{id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/security-groups/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
    "dataCenterId": "string",
    "description": "string",
    "rules": "array"
}'

    
  
Response
    
    {
  "projectId": "string",
  "dataCenterId": "string",
  "id": "string",
  "description": "string",
  "rules": [
    {
      "id": "string",
      "protocol": "string",
      "ports": "string",
      "ruleType": "string",
      "ipRangeCidr": "string",
      "icmpType": "string"
    }
  ]
}

    
  

GET
/v1/projects/{projectId}/networks/{id}

Get network

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
GET
/v1/projects/{projectId}/networks/{id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "projectId": "string",
  "id": "string",
  "dataCenterId": "string",
  "ipRange": "string",
  "gateway": "string",
  "priceHr": {
    "value": "string"
  },
  "externalIpAddress": "string",
  "internalIpAddress": "string",
  "vmState": "string",
  "createTime": "string",
  "state": "string"
}

    
  

DELETE
/v1/projects/{projectId}/networks/{id}

Delete network

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
DELETE
/v1/projects/{projectId}/networks/{id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}

    
  

POST
/v1/projects/{projectId}/networks/{id}/start

Start network

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
POST
/v1/projects/{projectId}/networks/{id}/start
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/{id}/start' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}

    
  

POST
/v1/projects/{projectId}/networks/{id}/stop

Stop network

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
POST
/v1/projects/{projectId}/networks/{id}/stop
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/networks/{id}/stop' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}