Welcome! (0)
Download OpenAPI specification:Download
This is the Cycloid's API Reference. It provides descriptions, syntax, and usage examples for each of the actions and data types available within our console.
Response samples
- 200
- 422
- default
{- "data": {
- "authentication": {
- "local": {
- "enabled": true
}, - "oauth": [
- {
- "provider": "azuread",
- "tenant_id": "67b96869-421d-4897-9f95-dc66aacbe915",
- "client_id": "67b96869-421d-4897-9f95-dc66aacbe915",
- "type": "AzureADAuthConfig"
}, - {
- "provider": "google",
- "client_id": "741192805913-s10ibou8065iofnb9rcir9269skiqts9.apps.googleusercontent.com",
- "type": "GoogleOAuthConfig"
}, - {
- "provider": "github",
- "client_id": "6a94210b44f4a612952e",
- "type": "GitHubOAuthConfig"
}
], - "saml2": [
]
}
}
}
Response samples
- 200
- 422
- default
{- "data": {
- "status": "Error",
- "message": "some services returned an unknown state (s1), while some other returned errors (s2, s3)",
- "checks": [
- {
- "canonical": "s0",
- "category": "internal",
- "status": "Success",
- "message": "no issue reported while connecting to s0"
}, - {
- "canonical": "s1",
- "category": "internal",
- "status": "Unknown",
- "message": "unknown state for s1 service"
}, - {
- "canonical": "s2",
- "category": "internal",
- "status": "Error",
- "message": "issue detected while connecting to s2"
}, - {
- "canonical": "s3",
- "category": "internal",
- "status": "Success",
- "message": "issue detected while connecting to s3"
}
]
}
}
getServiceStatus
Get the status of the Cycloid's service. It uses 200 and 500 to also identify the status
path Parameters
service_status_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ The canonical of the service you want to get the status from |
Responses
Response samples
- 200
- 500
{- "data": {
- "canonical": "s0",
- "category": "internal",
- "status": "Success",
- "message": "no issue reported while connecting to s0"
}
}
getEvents
Retrieve the list of events which has been registered on the organization. The events to request can be filtered using Unix timestamps in milliseconds (begin and end timestamps range), the event type and severity; when more than one are applied then they are applied with a logical AND.
- The Unix timestamps must always be specified, the rest of the filters are not mandatory.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
query Parameters
begin | integer <uint64> The unix timestamp in milliseconds, which indicate the start of the time range. |
end | integer <uint64> The unix timestamp in milliseconds, which indicate the end of the time range. |
type | Array of strings Items Enum: "Cycloid" "AWS" "Monitoring" "Custom" Specify the types of the events to be requested. The returned events must have one of the specified types. |
severity | Array of strings Items Enum: "info" "warn" "err" "crit" Specify the severities of the events to be requested. The returned events must have one of the specified severities. |
Responses
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": [
- {
- "timestamp": 123456789,
- "id": 42,
- "type": "Cycloid",
- "title": "A build has been created",
- "message": "Cyclobot created the build cleanup-deployment#42 of pipeline awesome-project-pr_1337",
- "icon": "fa-info-circle",
- "severity": "info",
- "tags": [
- {
- "key": "action",
- "value": "create"
}, - {
- "key": "entity",
- "value": "build"
}, - {
- "key": "name",
- "value": "awesome-project-pr_1337/cleanup-deployment"
}, - {
- "key": "user",
- "value": "cyclobot"
}
]
}, - {
- "timestamp": 123456795,
- "id": 2,
- "title": "Success deployment of awesome-project version 1.1.93-rc.5 on staging environment",
- "type": "Custom",
- "message": "A new deployment of awesome-project version 1.1.93-rc.5 has been done on staging environment",
- "severity": "info",
- "icon": "fa-info-circle",
- "tags": [
- {
- "key": "env",
- "value": "staging"
}, - {
- "key": "project",
- "value": "awesome-project"
}
]
}, - {
- "timestamp": 123456810,
- "id": 3,
- "type": "Monitoring",
- "title": "Nodes are overloaded",
- "message": "Kubernetes nodes of the deployment awesome-project are under heavy load",
- "severity": "warn",
- "tags": [
- {
- "key": "Name",
- "value": "my-mum-kubernetes-prod"
}, - {
- "key": "UUID",
- "value": "3ec0a46e-435e-4c5e-989b-02179efb49b5"
}, - {
- "key": "alertname",
- "value": "K8SNodeDiskPressure"
}, - {
- "key": "condition",
- "value": "DiskPressure"
}, - {
- "key": "customer",
- "value": "awesome-customer"
}, - {
- "key": "env",
- "value": "prod"
}, - {
- "key": "instance",
- "value": "172.30.12.2338080"
}, - {
- "key": "job",
- "value": "kube-state-metrics"
}, - {
- "key": "node",
- "value": "ip-127-0-0-1.eu-west-1.compute.internal"
}, - {
- "key": "project",
- "value": "kubernetes"
}, - {
- "key": "receiver",
- "value": "on_call"
}, - {
- "key": "service",
- "value": "k8s"
}, - {
- "key": "severity",
- "value": "warning"
}, - {
- "key": "status",
- "value": false
}
]
}, - {
- "timestamp": 123456823,
- "id": 5,
- "type": "AWS",
- "title": "AWS created",
- "message": "A new AWS instance has been created",
- "icon": "fa-aws",
- "severity": "info",
- "tags": [
- {
- "key": "env",
- "value": "testing"
}, - {
- "key": "project",
- "value": "awesome-project"
}
]
}, - {
- "timestamp": 123456834,
- "id": 7,
- "type": "AWS",
- "title": "AWS is ready",
- "message": "A new AWS instance is ready to accept requests",
- "icon": "fa-aws",
- "severity": "info",
- "tags": [
- {
- "key": "env",
- "value": "testing"
}, - {
- "key": "project",
- "value": "secret-project"
}
]
}
]
}
sendEvent
Send a event on the organization to be registered.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Request Body schema: required
The information associated with the event to register.
type required | string Enum: "Cycloid" "AWS" "Monitoring" "Custom" The type of the event |
title required | string non-empty The title of the event. |
message required | string non-empty The message associated to the event. |
icon | string >= 3 characters |
severity required | string Enum: "info" "warn" "err" "crit" tThe severity associated to the event. |
required | Array of objects (Key and value pair) The list of tags associated to the event. |
color | string [ 3 .. 20 ] characters [a-z]+ The HTML color associated to the event. The valid colors are the ones listed in the CSS 2 specification: https://www.w3.org/TR/CSS2/syndata.html#value-def-color. Only the keyword are accepted, the hexadecimal values are not valid. |
Responses
Request samples
- Payload
{- "type": "Cycloid",
- "title": "string",
- "message": "string",
- "icon": "string",
- "severity": "info",
- "tags": [
- {
- "key": "string",
- "value": "string"
}
], - "color": "string"
}
Response samples
- 200
- 403
- 404
- 422
{- "data": [
- {
- "timestamp": 123456789,
- "type": "Cycloid",
- "title": "New member added",
- "message": "A new member has been added to the project Website",
- "icon": "fa-info-circle",
- "severity": "info",
- "tags": [
- {
- "key": "project_canonical",
- "value": "website"
}, - {
- "key": "environment_canonical",
- "value": "development"
}, - {
- "key": "user",
- "value": "batman"
}
]
}
]
}
getEventsTags
Retrieve the list of tags and set of values for all the events of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Responses
Response samples
- 200
- 403
- 422
- default
{- "data": {
- "user": [
- "cycloidbot",
- "geralt-of-rivia"
], - "env": [
- "prod",
- "staging",
- "testing"
], - "action": [
- "create",
- "delete",
- "update"
], - "project": [
- "awesome-project",
- "pet-project",
- "secret-project"
], - "entity": [
- "build",
- "pipeline"
], - "name": [
- "awesome-project-pr_1337",
- "awesome-project-pr_42"
], - "customer": [
- "awesome-customer",
- "cycloid"
]
}
}
getAncestors
Get all the ancestors between the Organization and the User with the shortest path.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Responses
Response samples
- 200
- 401
- default
{- "data": [
- {
- "canonical": "org1",
- "id": 1,
- "name": "Organization 1",
- "ci_team_name": "asfdOPNljk",
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "blocked": [ ],
- "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": true
}, - {
- "canonical": "org2",
- "id": 2,
- "name": "Organization 2",
- "ci_team_name": "asfdOPNljk",
- "created_at": 1501131026,
- "updated_at": 1503333026,
- "blocked": [
- "require_payment"
], - "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": true
}, - {
- "canonical": "org3",
- "id": 3,
- "name": "Organization 3",
- "ci_team_name": "asfdOPNljk",
- "created_at": 1500135021,
- "updated_at": 1503332021,
- "blocked": [
- "require_payment"
], - "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": true
}
], - "pagination": {
- "total": 42,
- "index": 33,
- "size": 10
}
}
getRepoBranches
Return all the branches of repository. If the repository is empty then an empty list will be returned.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
query Parameters
credential_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A Credential canonical |
git_url required | string^((/|~)[^/]*)+.(\.git)|(([\w\]+@[\w\.]+))(:(/... Git URL to repository |
Responses
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": [
- "stacks",
- "stacks2"
]
}
canDo
Checks if the JWT can do the action
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Request Body schema: required
The information of the authorization
action required | string |
entity_canonicals required | Array of strings List of the canonicals to the Resource excluding the Organization |
Responses
Request samples
- Payload
{- "action": "string",
- "entity_canonicals": [
- "string"
]
}
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": {
- "ok": true,
- "entity_canonicals": [
- "pepito",
- "grillo"
]
}
}
getOrgs
Get the organizations that the authenticated user has access.
Authorizations:
query Parameters
page_index | integer <uint32> Default: 1 The page number to request. The first page is 1. |
page_size | integer <uint32> Default: 1000 The number of items at most which the response can have. |
organization_name | string Search by the organization's name |
organization_created_at | integer <uint64> Search by organization's creation date |
order_by | string Allows to order the list of items. Example usage: field_name:asc |
Responses
Response samples
- 200
- 422
- default
{- "data": [
- {
- "canonical": "org1",
- "id": 1,
- "name": "Organization 1",
- "ci_team_name": "asfdOPNljk",
- "ci_port": 443,
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "has_children": true,
- "blocked": [ ],
- "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": true,
- "subscription": {
- "expires_at": 1501131026,
- "members_count": 10,
- "plan": {
- "id": 5,
- "name": "Free Trial",
- "canonical": "free_trial"
}
}
}, - {
- "canonical": "org2",
- "id": 1,
- "name": "Organization 2",
- "ci_team_name": "asfdOPNljk",
- "ci_port": 443,
- "created_at": 1501131026,
- "updated_at": 1503333026,
- "has_children": false,
- "blocked": [ ],
- "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": true,
- "subscription": {
- "expires_at": 1501131026,
- "members_count": 10,
- "plan": {
- "id": 5,
- "name": "Free Trial",
- "canonical": "free_trial"
}
}
}, - {
- "canonical": "org3",
- "id": 1,
- "name": "Organization 3",
- "ci_team_name": "asfdOPNljk",
- "ci_port": 443,
- "created_at": 1500135021,
- "updated_at": 1503332021,
- "has_children": false,
- "blocked": [ ],
- "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": true,
- "subscription": {
- "expires_at": 1501131026,
- "members_count": 10,
- "plan": {
- "id": 5,
- "name": "Free Trial",
- "canonical": "free_trial"
}
}
}
], - "pagination": {
- "index": 1,
- "size": 10,
- "total": 3
}
}
createOrg
Create a new organization, making the authenticated user the owner of it.
Authorizations:
Request Body schema: required
The information of the organization to create.
canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
name required | string >= 3 characters |
Responses
Request samples
- Payload
{- "canonical": "string",
- "name": "string"
}
Response samples
- 200
- 422
- default
{- "data": {
- "id": 1,
- "canonical": "org1",
- "name": "Organization 1",
- "ci_team_name": "asfdOPNljk",
- "ci_port": 443,
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "has_children": false,
- "blocked": [ ],
- "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": false
}
}
getOrg
Get the information of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Responses
Response samples
- 200
- 403
- 404
- default
{- "data": {
- "id": 1,
- "canonical": "org3",
- "ci_team_name": "asfdOPNljk",
- "name": "Organization 3",
- "blocked": [ ],
- "has_children": false,
- "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": false,
- "created_at": 1500135021,
- "updated_at": 1503332021,
- "subscription": {
- "expires_at": 1501131026,
- "members_count": 10,
- "plan": {
- "id": 5,
- "name": "Free Trial",
- "canonical": "free_trial"
}
}
}
}
deleteOrg
Delete the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Responses
Response samples
- 403
- 404
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
updateOrg
Update the information of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Request Body schema: required
The information of the organization to update.
name required | string >= 3 characters |
quotas | boolean |
can_children_create_appearance | boolean |
mfa_enabled | boolean |
Responses
Request samples
- Payload
{- "name": "string",
- "quotas": true,
- "can_children_create_appearance": true,
- "mfa_enabled": true
}
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": {
- "id": 1,
- "canonical": "org2",
- "ci_team_name": "asfdOPNljk",
- "name": "Organization 2",
- "blocked": [ ],
- "quotas": false,
- "can_create_appearance": true,
- "can_children_create_appearance": true,
- "created_at": 1501131026,
- "updated_at": 1503333026,
- "subscription": {
- "expires_at": 1501131026,
- "members_count": 10,
- "plan": {
- "id": 5,
- "name": "Free Trial",
- "canonical": "free_trial"
}
}
}
}
getSummary
Get the summary of the organization
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Responses
Response samples
- 200
- 403
- 404
{- "data": {
- "projects": 5,
- "pipelines": 5,
- "credentials": 5,
- "service_catalog_sources": 5,
- "config_repositories": 5,
- "teams": 5,
- "users": 5,
- "roles": 5,
- "service_catalogs": 5
}
}
getTeams
Get list of teams of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
query Parameters
page_index | integer <uint32> Default: 1 The page number to request. The first page is 1. |
page_size | integer <uint32> Default: 1000 The number of items at most which the response can have. |
team_name | string Search by team's name |
team_created_at | integer <uint64> Search by team's creation date |
team_description | string Search by team's description |
member_id | integer <uint32> Search by entity's owner |
order_by | string Allows to order the list of items. Example usage: field_name:asc |
Responses
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": [
- {
- "canonical": "team1",
- "id": 1,
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "name": "Team 1",
- "owner": {
- "id": 99,
- "username": "superuser",
- "given_name": "Owen",
- "family_name": "Smith",
- "email": "superuser@company.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - "roles": [
- {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
], - "member_count": 12,
- "members_preview": [
- {
- "id": 42,
- "username": "coder",
- "given_name": "Cody",
- "family_name": "Coder",
- "email": "coder@company.com",
- "created_at": 678123
}, - {
- "id": 43,
- "username": "tester",
- "given_name": "Tony",
- "family_name": "Tester",
- "email": "tester@company.com",
- "created_at": 678123
}
]
}
], - "pagination": {
- "index": 1,
- "size": 10,
- "total": 1
}
}
createTeam
Create a new team in the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Request Body schema: required
The information of the team to create.
canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
name required | string >= 3 characters |
owner | string User canonical that owns this team. If omitted then the person creating this team will be assigned as owner. When a user is the owner of a team it has all the permissions on it. |
roles_canonical required | Array of strings[^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$] The roles to be assigned to a team. |
Responses
Request samples
- Payload
{- "canonical": "string",
- "name": "string",
- "owner": "string",
- "roles_canonical": [
- "string"
]
}
Response samples
- 200
- 404
- 422
- default
{- "data": {
- "id": 1,
- "canonical": "team1",
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "name": "Team 1",
- "owner": {
- "id": 99,
- "username": "superuser",
- "given_name": "Owen",
- "family_name": "Smith",
- "email": "superuser@company.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - "roles": [
- {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}, - {
- "id": 10,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
], - "member_count": 12,
- "members_preview": [
- {
- "id": 42,
- "username": "coder",
- "given_name": "Cody",
- "family_name": "Coder",
- "email": "coder@company.com",
- "created_at": 678123
}, - {
- "id": 43,
- "username": "tester",
- "given_name": "Tony",
- "family_name": "Tester",
- "email": "tester@company.com",
- "created_at": 678123
}
]
}
}
getTeam
Get the information of a team of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
team_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of a team. |
Responses
Response samples
- 200
- 403
- 404
- default
{- "data": {
- "id": 1,
- "canonical": "team-2",
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "name": "Team 2",
- "owner": {
- "id": 99,
- "username": "superuser",
- "given_name": "Owen",
- "family_name": "Smith",
- "email": "superuser@company.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - "roles": [
- {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
], - "member_count": 12,
- "members_preview": [
- {
- "id": 42,
- "username": "cooluser",
- "given_name": "given",
- "family_name": "family",
- "email": "cooluser@company.com",
- "created_at": 678123
}
]
}
}
deleteTeam
Delete a team of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
team_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of a team. |
Responses
Response samples
- 403
- 404
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
updateTeam
Update the information of a team of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
team_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of a team. |
Request Body schema: required
The information of the team to update.
canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
name required | string >= 3 characters |
owner | string User canonical that owns this team. Only the owner or an organization admin can update this field. When a user is the owner of a team it has all the permission on it. |
roles_canonical required | Array of strings[^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$] The roles to be re-assigned to a team. |
Responses
Request samples
- Payload
{- "canonical": "string",
- "name": "string",
- "owner": "string",
- "roles_canonical": [
- "string"
]
}
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": {
- "id": 1,
- "canonical": "team-3",
- "created_at": 1503220026,
- "updated_at": 1503335126,
- "name": "Team 3",
- "owner": {
- "id": 99,
- "username": "superuser",
- "given_name": "Owen",
- "family_name": "Smith",
- "email": "superuser@company.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - "roles": [
- {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}, - {
- "id": 10,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
], - "member_count": 12,
- "members_preview": [
- {
- "id": 42,
- "username": "coder",
- "given_name": "Cody",
- "family_name": "Coder",
- "email": "coder@company.com",
- "created_at": 678123
}, - {
- "id": 43,
- "username": "tester",
- "given_name": "Tony",
- "family_name": "Tester",
- "email": "tester@company.com",
- "created_at": 678123
}
]
}
}
getProjects
Get list of projects of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
query Parameters
page_index | integer <uint32> Default: 1 The page number to request. The first page is 1. |
page_size | integer <uint32> Default: 1000 The number of items at most which the response can have. |
project_name | string Search by project's name |
project_created_at | integer <uint64> Search by project's creation date |
project_description | string Search by project's description |
project_config_repository_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ Search by project's config repository's canonical |
service_catalog_source_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ Organization Service Catalog Sources canonical |
member_id | integer <uint32> Search by entity's owner |
order_by | string Allows to order the list of items. Example usage: field_name:asc |
favorite | boolean Flag to retrieve favorite data from the members favorite list. |
environment_canonical | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A list of environments' canonical to filter from |
Responses
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": [
- {
- "canonical": "proj-1",
- "description": "my-description1",
- "id": 1,
- "cloud_provider": {
- "id": 4,
- "canonical": "aws",
- "abbreviation": "AWS",
- "name": "Amazon Web Services",
- "created_at": 1503225026,
- "updated_at": 1503335026
}, - "owner": {
- "username": "user-1",
- "id": 1,
- "given_name": "Mariano",
- "family_name": "Jimenez",
- "email": "mariano.jimenez@fakeemail.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - "environments": [
- "dev",
- "staging",
- "production"
], - "service_catalog_name": "Magento Stack",
- "service_catalog_ref": "cycloidio:stack-magento",
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "name": "Project 1",
- "favorite": true
}, - {
- "canonical": "proj2",
- "description": "my-description2",
- "id": 1,
- "cloud_provider": {
- "id": 2,
- "canonical": "google",
- "abbreviation": "GCP",
- "name": "Google Cloud Platform",
- "created_at": 1503225026,
- "updated_at": 1503335026
}, - "environments": [
- "dev",
- "staging"
], - "service_catalog_name": "Magento Stack 2",
- "service_catalog_ref": "cycloidio:stack-magento2",
- "created_at": 1501131026,
- "updated_at": 1503333026,
- "name": "Project 2",
- "favorite": true
}, - {
- "canonical": "proj3",
- "description": "my-description3",
- "id": 1,
- "environments": [ ],
- "service_catalog_name": "Some other stack",
- "service_catalog_ref": "cycloidio:stack-something",
- "created_at": 1500135021,
- "updated_at": 1503332021,
- "name": "Project 3",
- "favorite": true
}, - {
- "canonical": "proj-4",
- "description": "my-description4",
- "id": 1,
- "owner": {
- "username": "user-2",
- "id": 10,
- "given_name": "Mariana",
- "family_name": "Jimenezo",
- "email": "mariana.jimenezo@fakeemail.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - "environments": [
- "dev",
- "staging",
- "production"
], - "service_catalog_name": "Magento Stack 3",
- "service_catalog_ref": "cycloidio:stack-magento3",
- "created_at": 1500035021,
- "updated_at": 1502332021,
- "name": "Project 4",
- "favorite": false
}
], - "pagination": {
- "index": 1,
- "size": 10,
- "total": 4
}
}
createProject
Create a new project with envs and pipelines in the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Request Body schema: required
The information of the project to create and optionally its configuration inputs. If the configuration inputs are not sent the project configuration is not generated and should be generated separately.
canonical | string [ 1 .. 100 ] characters (^[a-z0-9]+(([a-z0-9\-_]+)?[a-z0-9]+)?$) |
name required | string non-empty |
service_catalog_ref required | string It's the ref of the Service Catalog, like 'cycloidio:stack-magento' |
description | string A description regarding the project to help identify/remember details, implementation, purpose, etc. |
owner | string User canonical that owns this project. If omitted then the person creating this project will be assigned as owner. When a user is the owner of a project it has all the permissions on it. |
Array of objects (Create Pipeline) non-empty Each instance should include passed_config if no inputs are sent on project creation, otherwise it will be inferred internally. | |
config_repository_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
team_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ Is only required when the using Quotas, it'll link the Project to the Team |
Array of objects (Forms input) The variables set within a form with the corresponding environment canonical and use case |
Responses
Request samples
- Payload
{- "canonical": "string",
- "name": "string",
- "service_catalog_ref": "string",
- "description": "string",
- "owner": "string",
- "pipelines": [
- {
- "pipeline_name": "string",
- "passed_config": "string",
- "yaml_vars": "string",
- "check_credentials": true,
- "environment": {
- "canonical": "string",
- "use_case": "string",
- "cloud_provider_canonical": "string",
- "pipelines": [
- { }
], - "inputs": [
- {
- "use_case": "string",
- "environment_canonical": "string",
- "resource_pool_canonical": "string",
- "vars": { }
}
], - "color": "string",
- "icon": "string"
}, - "use_case": "string"
}
], - "config_repository_canonical": "string",
- "team_canonical": "string",
- "inputs": [
- {
- "use_case": "string",
- "environment_canonical": "string",
- "resource_pool_canonical": "string",
- "vars": { }
}
]
}
Response samples
- 200
- 404
- 422
- default
{- "data": {
- "id": 1,
- "canonical": "proj3",
- "description": "the-description",
- "created_at": 1500135021,
- "updated_at": 1503332021,
- "name": "Project 3",
- "environments": [
- {
- "id": 1,
- "canonical": "prod",
- "created_at": 1503225026,
- "updated_at": 1503335026
}, - {
- "id": 2,
- "canonical": "staging",
- "created_at": 1503225026,
- "updated_at": 1503335026
}, - {
- "id": 3,
- "canonical": "dev",
- "created_at": 1503225026,
- "updated_at": 1503335026
}
], - "service_catalog": {
- "id": 1,
- "name": "foo",
- "canonical": "stack-foo",
- "author": "Cycloid CI",
- "description": "CI sample",
- "keywords": [
- "ci"
], - "ref": "cycloid:stack-foo",
- "directory": "/config",
- "service_catalog_source_id": 1,
- "trusted": true
}, - "owner": {
- "username": "user-1",
- "id": 1,
- "given_name": "Mariano",
- "family_name": "Jimenez",
- "email": "mariano.jimenez@fakeemail.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}
}
}
createEnvironment
Create a new environment with provider, icon and color in a project
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
Request Body schema: required
The canonical of the environment to create and its configuration.
canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:[\da-zA-Z\-._]+[\da-zA-Z]|[\da... |
use_case | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
cloud_provider_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
Array of objects (Create Pipeline) non-empty Each instance should include passed_config if no inputs are sent on environment creation, otherwise it will be inferred internally. | |
Array of objects (Forms input) The variables set within a form with the corresponding environment canonical and use case | |
color | string <= 64 characters |
icon | string <= 64 characters |
Responses
Request samples
- Payload
{- "canonical": "string",
- "use_case": "string",
- "cloud_provider_canonical": "string",
- "pipelines": [
- {
- "pipeline_name": "string",
- "passed_config": "string",
- "yaml_vars": "string",
- "check_credentials": true,
- "environment": { },
- "use_case": "string"
}
], - "inputs": [
- {
- "use_case": "string",
- "environment_canonical": "string",
- "resource_pool_canonical": "string",
- "vars": { }
}
], - "color": "string",
- "icon": "string"
}
Response samples
- 200
- 404
- 422
- default
{- "data": {
- "id": 1,
- "canonical": "env",
- "created_at": 1500135021,
- "updated_at": 1503332021,
- "use_case": "prod",
- "color": "lime",
- "icon": "world",
- "cloud_provider_canonical": "aws"
}
}
deleteEnvironment
Delete a project environment.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
environment_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... The environment canonical to use as part of a path |
Responses
Response samples
- 403
- 404
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
updateEnvironment
Update a project environment of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
environment_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... The environment canonical to use as part of a path |
Request Body schema: required
The canonical of the environment to update and its configuration.
use_case | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
cloud_provider_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
Array of objects (Forms input) The variables set within a form with the corresponding environment canonical and use case | |
color | string <= 64 characters |
icon | string <= 64 characters |
Responses
Request samples
- Payload
{- "use_case": "string",
- "cloud_provider_canonical": "string",
- "inputs": [
- {
- "use_case": "string",
- "environment_canonical": "string",
- "resource_pool_canonical": "string",
- "vars": { }
}
], - "color": "string",
- "icon": "string"
}
Response samples
- 200
- 403
- 404
- default
{- "data": {
- "use_case": "prod",
- "color": "lime",
- "icon": "world",
- "cloud_provider_canonical": "aws"
}
}
getProjectConfig
Fetch the current project's environment's configuration.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
environment_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... The environment canonical to use as part of a path |
Responses
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": {
- "use_case": "prod",
- "resource_pool_canonical": "prcan",
- "forms": {
- "prod": {
- "ansible": {
- "database": [
- {
- "widget": "radios",
- "default": {
- "foo": "bar"
}, - "unit": "($, GHz, GB)",
- "type": "map",
- "values": [
- {
- "foo": "bar"
}, - {
- "bar": "foo"
}
], - "description": "",
- "key": "key-one",
- "name": "map variable",
- "current": {
- "foo": "bar"
}
}, - {
- "widget": "dropdown",
- "required": false,
- "default": [
- "bar",
- "foo"
], - "values": [
- [
- "foo",
- "bar"
], - [
- "bar",
- "foo"
]
], - "unit": "($, GHz, GB)",
- "type": "array",
- "description": "something k2",
- "key": "key-two",
- "name": "array variable",
- "current": [
- "bar",
- "foo"
]
}, - {
- "widget": "number",
- "required": true,
- "unit": "something",
- "type": "integer",
- "description": "something k3",
- "key": "key-three",
- "name": "required variable without default",
- "current": null
}
]
}, - "terraform": {
- "database": [
- {
- "widget": "slider_range",
- "required": false,
- "default": 2,
- "unit": "($, GHz, GB)",
- "type": "integer",
- "description": "something k1",
- "values": [
- 1,
- 10
], - "key": "key-one",
- "name": "integer variable",
- "current": 10
}, - {
- "widget": "dropdown",
- "required": true,
- "default": 20,
- "unit": "($, GHz, GB)",
- "type": "integer",
- "description": "something k2",
- "values": [
- 10,
- 20,
- 30
], - "key": "key-two",
- "name": "required with default",
- "current": null
}, - {
- "widget": "slider_list",
- "required": false,
- "values": [
- 1,
- 5
], - "unit": "($, GHz, GB)",
- "type": "integer",
- "description": "something k3",
- "key": "key-three",
- "name": "not required no default",
- "current": 1
}
]
}, - "pipeline": {
- "database": [
- {
- "widget": "cy_cred",
- "default": "t2.micro",
- "unit": "($, GHz, GB)",
- "type": "string",
- "description": "something",
- "values": [
- "t2.micro",
- "t2.medium",
- "t2.large"
], - "key": "key-four",
- "name": "string with values and default"
}, - {
- "widget": "dropdown",
- "required": false,
- "unit": "($, GHz, GB)",
- "type": "integer",
- "description": "something k5",
- "key": "key-five",
- "values": [
- 100,
- 200
], - "name": "not required no default, but values",
- "current": 152
}, - {
- "widget": "dropdown",
- "required": false,
- "unit": "($, GHz, GB)",
- "type": "integer",
- "description": "something k6",
- "key": "key-six",
- "name": "not required no default, but values",
- "current": 10,
- "values": [
- 10,
- 40,
- 80
]
}
]
}
}
}
}
}
createProjectFavorite
Add a new project in the user favorites list.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
Responses
Response samples
- 403
- 404
- 422
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
deleteProjectFavorite
Remove a project from the user favorites list.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
Responses
Response samples
- 403
- 404
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
getProject
Get a project of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
Responses
Response samples
- 200
- 403
- 404
- default
{- "data": {
- "id": 1,
- "canonical": "proj2",
- "environments": [
- {
- "id": 2,
- "canonical": "staging",
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "use_case": "uc"
}, - {
- "id": 3,
- "canonical": "dev",
- "created_at": 1503225026,
- "updated_at": 1503335026,
- "use_case": "uc2"
}
], - "created_at": 1501131026,
- "updated_at": 1503333026,
- "name": "Project 2",
- "service_catalog": {
- "id": 1,
- "name": "foo",
- "canonical": "stack-foo",
- "author": "Cycloid CI",
- "description": "CI sample",
- "keywords": [
- "ci"
], - "ref": "cycloid:stack-foo",
- "directory": "/config",
- "service_catalog_source_id": 1,
- "trusted": true
}, - "owner": {
- "username": "user-1",
- "id": 1,
- "given_name": "Mariano",
- "family_name": "Jimenez",
- "email": "mariano.jimenez@fakeemail.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}
}
}
deleteProject
Delete a project of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
Responses
Response samples
- 403
- 404
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
updateProject
Update the information of a project of the organization. If the project has some information on the fields which aren't required and they are not sent or set to their default values, which depend of their types, the information will be removed.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
project_canonical required | string [ 1 .. 100 ] characters ^[\da-zA-Z]+(?:(?:[\da-zA-Z\-._]+)?[\da-zA-Z]... A canonical of a project. |
Request Body schema: required
The information of the project to update.
name required | string non-empty |
description | string |
Array of objects (NewEnvironment) >= 0 items | |
service_catalog_ref required | string^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+:[a-z0-9]+[a-z... It's the ref of the Service Catalog, like 'cycloidio:stack-magento' |
owner | string User canonical that owns this project. Only the owner or an organization admin can update such a field. When a user is the owner of a project it has all the permission on it. |
cloud_provider | string Enum: "aws" "google" "azurerm" "flexibleengine" "openstack" The cloud provider canonical that this project is using - between the supported ones. |
config_repository_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ The config_repository_canonical points to new Config Repository the project will be using. If this value is filled and it's different from the current one, the whole project will be migrated to new CR, meaning configuration files will also be moved. If the project didn't have config_repository_canonical set, this action will only attach the project to the CR, it won't create/move any files. In order to be sure everything works, make sure the config_repository_canonical is pointing at the CR with the same git repository that was used during project creation. Although the config_repository_canonical is not marked as required, it's actually required for projects that are already using CR. This field not being required is only for compatibility with older projects, which are not having CR yet. |
Array of objects (Forms input) The variables set within a form with the corresponding environment canonical and use case | |
updated_at required | integer <uint64> >= 0 This will be used to assert that the Project is in it's last updated form because if not we could have inconsistencies with the environments. The format is in seconds, basically UNIX format. |
Responses
Request samples
- Payload
{- "name": "string",
- "description": "string",
- "environments": [
- {
- "canonical": "string",
- "use_case": "string",
- "cloud_provider_canonical": "string",
- "pipelines": [
- {
- "pipeline_name": "string",
- "passed_config": "string",
- "yaml_vars": "string",
- "check_credentials": true,
- "environment": { },
- "use_case": "string"
}
], - "inputs": [
- {
- "use_case": "string",
- "environment_canonical": "string",
- "resource_pool_canonical": "string",
- "vars": { }
}
], - "color": "string",
- "icon": "string"
}
], - "service_catalog_ref": "string",
- "owner": "string",
- "cloud_provider": "aws",
- "config_repository_canonical": "string",
- "inputs": [
- {
- "use_case": "string",
- "environment_canonical": "string",
- "resource_pool_canonical": "string",
- "vars": { }
}
], - "updated_at": 0
}
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": {
- "id": 1,
- "canonical": "proj-1",
- "service_catalog": {
- "id": 1,
- "name": "foo",
- "canonical": "stack-foo",
- "author": "Cycloid CI",
- "description": "CI sample",
- "keywords": [
- "ci"
], - "ref": "cycloid:stack-foo",
- "directory": "/config",
- "service_catalog_source_id": 1,
- "trusted": true
}, - "owner": {
- "username": "user-1",
- "id": 10,
- "given_name": "Mariano",
- "family_name": "Jimenez",
- "email": "mariano.jimenez@fakeemail.com",
- "created_at": 1503225026,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - "created_at": 1503225026,
- "updated_at": 1503335026,
- "name": "Project 1",
- "environments": [
- {
- "id": 1,
- "canonical": "prod",
- "created_at": 1503225026,
- "updated_at": 1503335026
}, - {
- "id": 2,
- "canonical": "staging",
- "created_at": 1503225026,
- "updated_at": 1503335026
}, - {
- "id": 3,
- "canonical": "dev",
- "created_at": 1503225026,
- "updated_at": 1503335026
}
], - "service_catalog_ref": "cycloidio:stack-magento",
- "config_repository_canonical": "stack-magento-cr"
}
}
getOrgMembers
Get the members of an organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
query Parameters
page_index | integer <uint32> Default: 1 The page number to request. The first page is 1. |
page_size | integer <uint32> Default: 1000 The number of items at most which the response can have. |
invitation_state | string Enum: "accepted" "pending" "declined" Search by Invitation's state |
user_given_name | string Search by the user's given name |
user_family_name | string Search by the user's family name |
role_name | string Search by the role's name |
user_canonical | string Search by the user canonical |
user_created_at | integer <uint64> Search by user creation date |
member_created_at | integer <uint64> Search by member joining date |
order_by | string Allows to order the list of items. Example usage: field_name:asc |
Responses
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": [
- {
- "username": "user-1",
- "id": 1,
- "given_name": "Mariano",
- "family_name": "Jimenez",
- "invitation_email": "jordi.capdevila@fakeemail.com",
- "email": "mariano.jimenez@fakeemail.com",
- "created_at": 1503225026,
- "invitation_state": "accepted",
- "last_login_at": 1503225576,
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - {
- "username": "user2",
- "id": 1,
- "given_name": "Jordi",
- "family_name": "Capdevila",
- "invitation_email": "jordi.capdevila@fakeemail.com",
- "email": "jordi.capdevila@fakeemail.com",
- "created_at": 1503281026,
- "last_login_at": 1503225576,
- "invitation_state": "accepted",
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}, - {
- "username": "user-3",
- "id": 1,
- "given_name": "Ivan",
- "family_name": "Drago",
- "invitation_email": "jordi.capdevila@fakeemail.com",
- "email": "ivan.drago@fakeemail.com",
- "created_at": 1502225026,
- "last_login_at": 1503225576,
- "invitation_state": "accepted",
- "role": {
- "id": 17,
- "name": "existing",
- "description": "Organization existing role",
- "canonical": "role-can",
- "rules": [
- {
- "id": 1,
- "effect": "allow",
- "action": "organization:delete",
- "resources": [
- "organization:org-can",
- "organization:org-can2"
]
}, - {
- "id": 20,
- "effect": "allow",
- "action": "organization:team:create",
- "resources": [ ]
}, - {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
]
}
}
], - "pagination": {
- "index": 1,
- "size": 10,
- "total": 3
}
}
inviteUserToOrgMember
Invite a user to be a member of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
Request Body schema: required
The user's member invitation.
email required | string <email> Invite user by email |
role_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ The role of the member. |
Responses
Request samples
- Payload
{- "email": "user@example.com",
- "role_canonical": "string"
}
Response samples
- 200
- 404
- 422
- default
{- "data": {
- "id": 1,
- "username": "user2",
- "given_name": "Jordi",
- "family_name": "Capdevila",
- "invitation_email": "jordi.capdevila@fakeemail.com",
- "email": "jordi.capdevila@fakeemail.com",
- "created_at": 1503281026,
- "invitation_state": "accepted",
- "role": {
- "id": 2,
- "name": "project manager",
- "description": "A project manager",
- "policies": [
- {
- "id": 21,
- "code": "team:read",
- "entities": [ ],
- "description": "Grant the access to read the teams of an organization"
}, - {
- "id": 22,
- "code": "team:edit",
- "entities": [ ],
- "description": "Grant the access to edit teams"
}, - {
- "id": 60,
- "code": "project:read",
- "entities": [ ],
- "description": "Grant the access to projects"
}, - {
- "id": 61,
- "code": "project:create",
- "entities": [ ],
- "description": "Grant the access to create a project in the organization"
}, - {
- "id": 62,
- "code": "project:edit",
- "entities": [ ],
- "description": "Grant the access to edit projects"
}
]
}
}
}
getOrgMember
Get the information of a member of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
member_id required | integer <uint32> A member id |
Responses
Response samples
- 200
- 403
- 404
- default
{- "data": {
- "id": 1,
- "username": "user2",
- "given_name": "Jordi",
- "family_name": "Capdevila",
- "invitation_email": "jordi.capdevila@fakeemail.com",
- "email": "jordi.capdevila@fakeemail.com",
- "created_at": 1503281026,
- "invitation_state": "accepted",
- "role": {
- "id": 2,
- "name": "project manager",
- "description": "A project manager",
- "policies": [
- {
- "id": 21,
- "code": "team:read",
- "entities": [ ],
- "description": "Grant the access to read the teams of an organization"
}, - {
- "id": 22,
- "code": "team:edit",
- "entities": [ ],
- "description": "Grant the access to edit teams"
}, - {
- "id": 60,
- "code": "project:read",
- "entities": [ ],
- "description": "Grant the access to projects"
}, - {
- "id": 61,
- "code": "project:create",
- "entities": [ ],
- "description": "Grant the access to create a project in the organization"
}, - {
- "id": 62,
- "code": "project:edit",
- "entities": [ ],
- "description": "Grant the access to edit projects"
}
]
}
}
}
updateOrgMember
Update member of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
member_id required | integer <uint32> A member id |
Request Body schema: required
The member information to be updated.
role_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ The role of the member. |
Responses
Request samples
- Payload
{- "role_canonical": "string"
}
Response samples
- 200
- 403
- 404
- 422
- default
{- "data": {
- "id": 1,
- "username": "user2",
- "given_name": "Jordi",
- "family_name": "Capdevila",
- "invitation_email": "jordi.capdevila@fakeemail.com",
- "email": "jordi.capdevila@fakeemail.com",
- "created_at": 1503281026,
- "invitation_state": "accepted",
- "role": {
- "id": 2,
- "name": "project manager",
- "description": "A project manager",
- "policies": [
- {
- "id": 21,
- "code": "team:read",
- "entities": [ ],
- "description": "Grant the access to read the teams of an organization"
}, - {
- "id": 22,
- "code": "team:edit",
- "entities": [ ],
- "description": "Grant the access to edit teams"
}, - {
- "id": 60,
- "code": "project:read",
- "entities": [ ],
- "description": "Grant the access to projects"
}, - {
- "id": 61,
- "code": "project:create",
- "entities": [ ],
- "description": "Grant the access to create a project in the organization"
}, - {
- "id": 62,
- "code": "project:edit",
- "entities": [ ],
- "description": "Grant the access to edit projects"
}
]
}
}
}
removeOrgMember
Remove a member of the organization.
Authorizations:
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
member_id required | integer <uint32> A member id |
Responses
Response samples
- 403
- 404
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
resendMemberInvitation
Resend the email containing the verification token to accept the member Invitation.
path Parameters
organization_canonical required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ A canonical of an organization. |
member_id required | integer <uint32> A member id |
Responses
Response samples
- 403
- 404
- default
{- "errors": [
- {
- "message": "Not enough permissions to perform the operation",
- "code": "Unauthorized"
}
]
}
getPendingMemberInvitation
Get the email address used for the pending member invitation
path Parameters
verification_token required | string >= 5 characters A token for verifying emails, invitations, etc. |
Responses
Response samples
- 200
- 404
- default
{- "data": {
- "email": "user@user.com"
}
}
emailVerificationResend
Re-send the verification user's email to the indicated address.
Request Body schema: required
The email address to re-send the verification email. This endpoint doesn't return any error status code if the email doesn't exist nor it's already verified for avoiding that an attacker could find registered users email address.
email required | string <email> |
Responses
Request samples
- Payload
{- "email": "user@example.com"
}
Response samples
- 422
- default
{- "errors": [
- {
- "message": "some error",
- "code": "SomeCode"
}
]
}
emailVerification
Verify that the email address is own by the user.
path Parameters
verification_token required | string >= 5 characters A token for verifying emails, invitations, etc. |
Responses
Response samples
- 404
- 422
- default
{- "errors": [
- {
- "message": "Entity not found",
- "code": "NotFoundEntity"
}
]
}
emailAuthenticationVerification
Verify that the email address is own by the user.
path Parameters
authentication_token required | string >= 5 characters A token for authenticating login vie email |
Responses
Response samples
- 200
- 401
- 422
- default
{- "data": {
- "owns": [
- "organization:seraf:team:teamcan"
], - "permissions": {
- "organization:team:create": {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
}, - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImY0YjdiZjZlLTE1NmYtNDYxMy05NmFiLWIwMzg5NzdiMWRkMSJ9.eyJpc3MiOiJodHRwczovL2N5Y2xvaWQuaW8iLCJzdWIiOiJodHRwczovL2N5Y2xvaWQuaW8iLCJhdWQiOiJjdXN0b21lciIsIm5iZiI6MTUwMzQ3NDg2NywiaWF0IjoxNTAzNDc0ODY3LCJqdGkiOiJjNDU5ODgwMS04YWQzLTRhMDctODIwZC02MzRmN2RkMWQ2MDgiLCJjeWNsb2lkIjp7InVzZXIiOnsiaWQiOjEsInVzZXJuYW1lIjoidXNlci0xIiwiZ2l2ZW5fbmFtZSI6Ik1hcmlhbm8iLCJmYW1pbHlfbmFtZSI6IkppbWVuZXoiLCJwaWN0dXJlX3VybCI6Imh0dHBzOi8vYXZhdGFyczIuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3UvMTQ1NzkyMTAiLCJsb2NhbGUiOiJlbiJ9fX0.v6BuWwO6vN6PNW9d-Eqdoy7GHfUXKQ7byRbqwKRwHlA"
}
}
updateUserGuide
Update user's guide progress.
Request Body schema:
The guide's progress JSON schema
The user's guide progress JSON schema
Responses
Request samples
- Payload
{ }
Response samples
- 404
- 422
- default
{- "errors": [
- {
- "message": "Entity not found",
- "code": "NotFoundEntity"
}
]
}
login
Authenticate a user and return a new JWT token.
Request Body schema: required
The user content
string <email> | |
username | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
password required | string <password> >= 8 characters |
organization_canonical | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
Responses
Request samples
- Payload
{- "password": "pa$$word",
- "email": "user@example.com",
- "username": "string"
}
Response samples
- 200
- 401
- 422
- default
{- "data": {
- "owns": [
- "organization:seraf:team:teamcan"
], - "permissions": {
- "organization:team:create": {
- "id": 21,
- "effect": "allow",
- "action": "organization:team:read",
- "resources": [
- "organization:org-can:team:team-can"
]
}
}, - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImY0YjdiZjZlLTE1NmYtNDYxMy05NmFiLWIwMzg5NzdiMWRkMSJ9.eyJpc3MiOiJodHRwczovL2N5Y2xvaWQuaW8iLCJzdWIiOiJodHRwczovL2N5Y2xvaWQuaW8iLCJhdWQiOiJjdXN0b21lciIsIm5iZiI6MTUwMzQ3NDg2NywiaWF0IjoxNTAzNDc0ODY3LCJqdGkiOiJjNDU5ODgwMS04YWQzLTRhMDctODIwZC02MzRmN2RkMWQ2MDgiLCJjeWNsb2lkIjp7InVzZXIiOnsiaWQiOjEsInVzZXJuYW1lIjoidXNlci0xIiwiZ2l2ZW5fbmFtZSI6Ik1hcmlhbm8iLCJmYW1pbHlfbmFtZSI6IkppbWVuZXoiLCJwaWN0dXJlX3VybCI6Imh0dHBzOi8vYXZhdGFyczIuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3UvMTQ1NzkyMTAiLCJsb2NhbGUiOiJlbiJ9fX0.v6BuWwO6vN6PNW9d-Eqdoy7GHfUXKQ7byRbqwKRwHlA"
}
}
getOAuthUser
Used to know if a user from the platform exists on that 'social_type'. If it exists we'll return the JWT 'token', if it does not we'll return the data of that user on the 'user' so it can be confirmed and created
path Parameters
social_type required | string Enum: "azuread" "saml2" "google" "github" The OAuth Social type |
query Parameters
oauth_code required | string The OAuth code returned form the Social Provider |
Responses
Response samples
- 200
- 401
- default
{- "data": {
- "user": {
- "email": "some@email.com",
- "given_name": "some name",
- "username": "some-name",
- "social_id": "some-random-id"
}
}
}
createOAuthUser
Create a user from the OAuth 'social_type'
path Parameters
social_type required | string Enum: "azuread" "saml2" "google" "github" The OAuth Social type |
Request Body schema: required
The user content
given_name required | string |
family_name | string |
email required | string <email> |
username required | string [ 3 .. 100 ] characters ^[a-z0-9]+[a-z0-9\-_]+[a-z0-9]+$ |
picture_url | string <uri> |
social_id required | string |
invitation_token | string >= 5 characters The field is used when a user signup from an invitation to an organization. Giving the token, the created user will be automatically added to the organization. |
country_code | string^[A-Z]{2}$ Code of a country the user is from |
locale | string Enum: "en" "fr" "es" User's preferred language |
Responses
Request samples
- Payload
{- "given_name": "string",
- "family_name": "string",
- "email": "user@example.com",
- "username": "string",
- "social_id": "string",
- "invitation_token": "string",
- "country_code": "string",
- "locale": "en"
}
Response samples
- 200
- 401
- default
{- "data": {
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImY0YjdiZjZlLTE1NmYtNDYxMy05NmFiLWIwMzg5NzdiMWRkMSJ9.eyJpc3MiOiJodHRwczovL2N5Y2xvaWQuaW8iLCJzdWIiOiJodHRwczovL2N5Y2xvaWQuaW8iLCJhdWQiOiJjdXN0b21lciIsIm5iZiI6MTUwMzQ3NDg2NywiaWF0IjoxNTAzNDc0ODY3LCJqdGkiOiJjNDU5ODgwMS04YWQzLTRhMDctODIwZC02MzRmN2RkMWQ2MDgiLCJjeWNsb2lkIjp7InVzZXIiOnsiaWQiOjEsInVzZXJuYW1lIjoidXNlci0xIiwiZ2l2ZW5fbmFtZSI6Ik1hcmlhbm8iLCJmYW1pbHlfbmFtZSI6IkppbWVuZXoiLCJwaWN0dXJlX3VybCI6Imh0dHBzOi8vYXZhdGFyczIuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3UvMTQ1NzkyMTAiLCJsb2NhbGUiOiJlbiJ9LCJvcmdhbml6YXRpb24iOnsiaWQiOjIsImNhbm9uaWNhbCI6Im9yZzIiLCJuYW1lIjoiT3JnIDIifSwicGVybWlzc2lvbnMiOnsib3JnYW5pemF0aW9uOmRlbGV0ZSI6WyIxIl0sIm9yZ2FuaXphdGlvbjp1cGRhdGUiOltdLCJvcmdhbml6YXRpb246dGVhbTpjcmVhdGUiOltdLCJvcmdhbml6YXRpb246dGVhbTpyZWFkIjpbXSwib3JnYW5pemF0aW9uOnRlYW06ZGVsZXRlIjpbIjIiXSwib3JnYW5pemF0aW9uOm1lbWJlcjpjcmVhdGUiOltdLCJvcmdhbml6YXRpb246bWVtYmVyOnJlYWQiOltdLCJvcmdhbml6YXRpb246bWVtYmVyOmRlbGV0ZSI6W10sIm9yZ2FuaXphdGlvbjpwcm9qZWN0OnJlYWQiOltdfX19.CHA3146UEHwVW6nYkDgYeSukGeZIH55mi