Skip to content

Instantly share code, notes, and snippets.

@gitlawr
Last active January 30, 2018 21:50
Show Gist options
  • Save gitlawr/2d58e1ae08270ff81fb511c1596acd21 to your computer and use it in GitHub Desktop.
Save gitlawr/2d58e1ae08270ff81fb511c1596acd21 to your computer and use it in GitHub Desktop.
Pipeline API SPEC

Pipeline API

API Design

Cluster level pipeline configs

ClusterPipeline(CRUD)

HTTP/1.1 POST /v3/clusters/cluster-id/clusterpipelines
Content-Type: application/json
{
  "spec": {
    "clusterName": "cluster-abc"
    "githubConfig": {
      "scheme": "https",
      "host": "github.com",
      "clientID": "xxxxxx",
      "clientSecret": "xxxxxxxxx",
    }
    //TODO gitlabConfig,bitbucketConfig, etc.
  }
}

Project level pipeline APIs

Pipeline(CRUD), action=run,export,activate,deactivate

HTTP/1.1 POST /v3/projects/cluster-id:project-id/pipelines
{
  "spec": {
    "projectName": "project-abc",
    "active": true,
    "displayName": "pipeline-test",
    "stages": [
      {
        "name": "build/test",
        "steps": [
          {
            "type": "sourcecode",
            "sourceCodeStepConfig": {
              "remoteAccountName": "somegitaccountname",
              "repository": "https://github.com/rancher/rancher.git",
              "branch": "master"
            },
            "runAScriptStepConfig": {
              "image": "golang:1.8",
              "shellScript": "echo example script",
              "entryPoint": "custom_entrypoint.sh",
              "args": "--optional args",
              "env": [
                "FOO=BAR"
              ]
            },
            "buildImageStepConfig": {
              "dockerFilePath": "./Dockerfile",
              "buildPath": ".",
              "imageTag": "reg.example.com/rancher/server:dev"
            },
            "pushImageStepConfig": {
              "imageTag": "reg.example.com/rancher/server:dev"
            }
          }
        ]
      }
    ],
    "triggers": {
      "cronTrigger": {
        "active": true,
        "timezone": "Asia/Hong_Kong",
        "expression": "* 4 * * *"
      },
      "webhookTrigger": {
        "active": true
      }
    }
    
  },
  "status": {
    
  }
}

PipelineHistory(RD), action=stop,rerun

HTTP/1.1 GET /v3/projects/cluster-id:project-id/pipelinehistories/id
{
  "spec": {
    "projectName": "project-abc",
    "displayName": "pipeline-test-1",
    "runNumber": 1,
    "triggerType": "manual",
    "pipeline": {}//pipeline
  }
}

PipelineLog(CRD)

HTTP/1.1 GET /v3/projects/cluster-id:project-id/pipelinelogs/id
{
  "spec": {
    "projectName": "project-abc",
    "pipelineHistoryName": "pipeline-test-1",
    "stageOrdinal": 1,
    "stepOrdinal": 1,
    "message": "here's the logs"
  }
}

User Level APIs

RemoteAccount(CRUD), collectionaction=login, action=refreshrepos

HTTP/1.1 GET /v3/remoteaccounts?creatorId=user-kb8l5
{
  "spec": {
    "displayName": "somename",
    "type": "github",
    "userName": "rancherusername",
    "avatarUrl": "https://example.com/avatar.png"
    "htmlUrl": "https://example.com/users/username",
    "accountName": "gitaccountname",
    "accessToken": "secret"
  }
}

GitRepoCache(CRUD)

HTTP/1.1 GET /v3/gitrepocaches?creatorId=user-kb8l5
{
  "spec": {
    "type": "github",
    "remoteAccountName": "somename",
    "repositories": [
      {
      	"name": "reponame",
      	"cloneUrl": "https://example.com/sth/repo.git",
      	"permissions": {
          "pull": true,
          "push": true,
          "admin": true
      	},
      	"language": "go"
      }
    ]
  }
}

Schemas

{
   "actions":{

   },
   "baseType":"schema",
   "collectionFilters":{
      "clusterId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "creatorId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "namespaceId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "state":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioning":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioningMessage":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "uuid":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      }
   },
   "collectionMethods":[
      "POST",
      "GET"
   ],
   "id":"clusterPipeline",
   "links":{
      "collection":"https://localhost:8443/v3/clusterpipelines",
      "self":"https://localhost:8443/v3/schemas/clusterPipeline"
   },
   "pluralName":"clusterPipelines",
   "resourceFields":{
      "annotations":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "clusterId":{
         "create":true,
         "nullable":true,
         "type":"reference[cluster]",
         "update":true
      },
      "created":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "creatorId":{
         "create":false,
         "type":"reference[user]",
         "update":false
      },
      "githubConfig":{
         "create":true,
         "nullable":true,
         "type":"gibhubConfig",
         "update":true
      },
      "labels":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "name":{
         "create":true,
         "nullable":true,
         "type":"dnsLabel",
         "update":false
      },
      "namespaceId":{
         "create":true,
         "nullable":true,
         "type":"reference[namespace]",
         "update":false
      },
      "ownerReferences":{
         "create":false,
         "nullable":true,
         "type":"array[ownerReference]",
         "update":false
      },
      "removed":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "state":{
         "create":false,
         "type":"string",
         "update":false
      },
      "status":{
         "create":false,
         "nullable":true,
         "type":"clusterPipelineStatus",
         "update":false
      },
      "transitioning":{
         "create":false,
         "options":[
            "yes",
            "no",
            "error"
         ],
         "type":"enum",
         "update":false
      },
      "transitioningMessage":{
         "create":false,
         "type":"string",
         "update":false
      },
      "uuid":{
         "create":false,
         "nullable":true,
         "type":"string",
         "update":false
      }
   },
   "resourceMethods":[
      "PUT",
      "DELETE"
   ],
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"gibhubConfig",
   "links":{
      "self":"https://localhost:8443/v3/schemas/gibhubConfig"
   },
   "pluralName":"gibhubConfigs",
   "resourceFields":{
      "clientId":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "clientSecret":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "githubConfig":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "host":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "collectionFilters":{
      "active":{
         "modifiers":[
            "eq",
            "ne"
         ]
      },
      "creatorId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "displayName":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "namespaceId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "projectId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "state":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioning":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioningMessage":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "uuid":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      }
   },
   "collectionMethods":[
      "POST",
      "GET"
   ],
   "id":"pipeline",
   "links":{
      "collection":"https://localhost:8443/v3/pipelines",
      "self":"https://localhost:8443/v3/schemas/pipeline"
   },
   "pluralName":"pipelines",
   "resourceActions":{
      "activate":{

      },
      "deactivate":{

      },
      "export":{

      },
      "run":{

      }
   },
   "resourceFields":{
      "active":{
         "create":true,
         "default":"true",
         "nullable":true,
         "type":"boolean",
         "update":true
      },
      "annotations":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "created":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "creatorId":{
         "create":false,
         "type":"reference[user]",
         "update":false
      },
      "displayName":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "labels":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "name":{
         "create":true,
         "nullable":true,
         "type":"dnsLabel",
         "update":false
      },
      "namespaceId":{
         "create":true,
         "nullable":true,
         "type":"reference[namespace]",
         "update":false
      },
      "ownerReferences":{
         "create":false,
         "nullable":true,
         "type":"array[ownerReference]",
         "update":false
      },
      "projectId":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"reference[project]",
         "update":true
      },
      "removed":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "stages":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"array[stage]",
         "update":true
      },
      "state":{
         "create":false,
         "type":"string",
         "update":false
      },
      "status":{
         "create":false,
         "nullable":true,
         "type":"pipelineStatus",
         "update":false
      },
      "transitioning":{
         "create":false,
         "options":[
            "yes",
            "no",
            "error"
         ],
         "type":"enum",
         "update":false
      },
      "transitioningMessage":{
         "create":false,
         "type":"string",
         "update":false
      },
      "triggers":{
         "create":true,
         "nullable":true,
         "type":"triggers",
         "update":true
      },
      "uuid":{
         "create":false,
         "nullable":true,
         "type":"string",
         "update":false
      }
   },
   "resourceMethods":[
      "PUT",
      "DELETE"
   ],
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"triggers",
   "links":{
      "self":"https://localhost:8443/v3/schemas/triggers"
   },
   "pluralName":"triggerses",
   "resourceFields":{
      "cronTrigger":{
         "create":true,
         "nullable":true,
         "type":"cronTrigger",
         "update":true
      },
      "webhookTrigger":{
         "create":true,
         "nullable":true,
         "type":"webhookTrigger",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"cronTrigger",
   "links":{
      "self":"https://localhost:8443/v3/schemas/cronTrigger"
   },
   "pluralName":"cronTriggers",
   "resourceFields":{
      "spec":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "timezone":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"webhookTrigger",
   "links":{
      "self":"https://localhost:8443/v3/schemas/webhookTrigger"
   },
   "pluralName":"webhookTriggers",
   "resourceFields":{
      "active":{
         "create":true,
         "default":"true",
         "nullable":true,
         "type":"boolean",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"stage",
   "links":{
      "self":"https://localhost:8443/v3/schemas/stage"
   },
   "pluralName":"stages",
   "resourceFields":{
      "name":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "steps":{
         "create":true,
         "nullable":true,
         "type":"array[step]",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"step",
   "links":{
      "self":"https://localhost:8443/v3/schemas/step"
   },
   "pluralName":"steps",
   "resourceFields":{
      "buildImageStepConfig":{
         "create":true,
         "nullable":true,
         "type":"buildImageStepConfig",
         "update":true
      },
      "pushImageStepConfig":{
         "create":true,
         "nullable":true,
         "type":"pushImageStepConfig",
         "update":true
      },
      "runScriptStepConfig":{
         "create":true,
         "nullable":true,
         "type":"runScriptStepConfig",
         "update":true
      },
      "sourceCodeStepConfig":{
         "create":true,
         "nullable":true,
         "type":"sourceCodeStepConfig",
         "update":true
      },
      "timeout":{
         "create":true,
         "nullable":true,
         "type":"int",
         "update":true
      },
      "type":{
         "create":true,
         "default":"runscript",
         "nullable":true,
         "options":[
            "runscript",
            "buildimage",
            "pushimage"
         ],
         "required":true,
         "type":"enum",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"buildImageStepConfig",
   "links":{
      "self":"https://localhost:8443/v3/schemas/buildImageStepConfig"
   },
   "pluralName":"buildImageStepConfigs",
   "resourceFields":{
      "buildPath":{
         "create":true,
         "default":".",
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "dockerFilePath":{
         "create":true,
         "default":"./Dockerfile",
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "imageTag":{
         "create":true,
         "default":"${CICD_GIT_REPOSITORY_NAME}:${CICD_GIT_BRANCH}",
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"pushImageStepConfig",
   "links":{
      "self":"https://localhost:8443/v3/schemas/pushImageStepConfig"
   },
   "pluralName":"pushImageStepConfigs",
   "resourceFields":{
      "imageTag":{
         "create":true,
         "default":"${CICD_GIT_REPOSITORY_NAME}:${CICD_GIT_BRANCH}",
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"runScriptStepConfig",
   "links":{
      "self":"https://localhost:8443/v3/schemas/runScriptStepConfig"
   },
   "pluralName":"runScriptStepConfigs",
   "resourceFields":{
      "args":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "entrypoint":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "env":{
         "create":true,
         "nullable":true,
         "type":"array[string]",
         "update":true
      },
      "image":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "shellScript":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"sourceCodeStepConfig",
   "links":{
      "self":"https://localhost:8443/v3/schemas/sourceCodeStepConfig"
   },
   "pluralName":"sourceCodeStepConfigs",
   "resourceFields":{
      "branch":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "remoteAccountId":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"reference[remoteaccount]",
         "update":true
      },
      "repository":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "collectionFilters":{
      "creatorId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "displayName":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "namespaceId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "projectId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "runNumber":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "state":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioning":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioningMessage":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "triggerType":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "uuid":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      }
   },
   "collectionMethods":[
      "POST",
      "GET"
   ],
   "id":"pipelineHistory",
   "links":{
      "collection":"https://localhost:8443/v3/pipelinehistories",
      "self":"https://localhost:8443/v3/schemas/pipelineHistory"
   },
   "pluralName":"pipelineHistories",
   "resourceActions":{
      "rerun":{

      },
      "stop":{

      }
   },
   "resourceFields":{
      "annotations":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "created":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "creatorId":{
         "create":false,
         "type":"reference[user]",
         "update":false
      },
      "displayName":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "labels":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "name":{
         "create":true,
         "nullable":true,
         "type":"dnsLabel",
         "update":false
      },
      "namespaceId":{
         "create":true,
         "nullable":true,
         "type":"reference[namespace]",
         "update":false
      },
      "ownerReferences":{
         "create":false,
         "nullable":true,
         "type":"array[ownerReference]",
         "update":false
      },
      "pipeline":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"pipeline",
         "update":true
      },
      "projectId":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"reference[project]",
         "update":true
      },
      "removed":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "runNumber":{
         "create":true,
         "min":1,
         "nullable":true,
         "required":true,
         "type":"int",
         "update":true
      },
      "state":{
         "create":false,
         "type":"string",
         "update":false
      },
      "status":{
         "create":false,
         "nullable":true,
         "type":"pipelineHistoryStatus",
         "update":false
      },
      "transitioning":{
         "create":false,
         "options":[
            "yes",
            "no",
            "error"
         ],
         "type":"enum",
         "update":false
      },
      "transitioningMessage":{
         "create":false,
         "type":"string",
         "update":false
      },
      "triggerType":{
         "create":true,
         "nullable":true,
         "options":[
            "manual",
            "cron",
            "webhook"
         ],
         "required":true,
         "type":"enum",
         "update":true
      },
      "uuid":{
         "create":false,
         "nullable":true,
         "type":"string",
         "update":false
      }
   },
   "resourceMethods":[
      "PUT",
      "DELETE"
   ],
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "collectionFilters":{
      "creatorId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "message":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "namespaceId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "pipelineHistoryName":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "projectId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "stageOrdinal":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "stepOrdinal":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "uuid":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      }
   },
   "collectionMethods":[
      "POST",
      "GET"
   ],
   "id":"pipelineLog",
   "links":{
      "collection":"https://localhost:8443/v3/pipelinelogs",
      "self":"https://localhost:8443/v3/schemas/pipelineLog"
   },
   "pluralName":"pipelineLogs",
   "resourceFields":{
      "annotations":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "created":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "creatorId":{
         "create":false,
         "type":"reference[user]",
         "update":false
      },
      "labels":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "message":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "name":{
         "create":true,
         "nullable":true,
         "type":"dnsLabel",
         "update":false
      },
      "namespaceId":{
         "create":true,
         "nullable":true,
         "type":"reference[namespace]",
         "update":false
      },
      "ownerReferences":{
         "create":false,
         "nullable":true,
         "type":"array[ownerReference]",
         "update":false
      },
      "pipelineHistoryName":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "projectId":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"reference[project]",
         "update":true
      },
      "removed":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "stageOrdinal":{
         "create":true,
         "min":1,
         "nullable":true,
         "type":"int",
         "update":true
      },
      "stepOrdinal":{
         "create":true,
         "min":1,
         "nullable":true,
         "type":"int",
         "update":true
      },
      "uuid":{
         "create":false,
         "nullable":true,
         "type":"string",
         "update":false
      }
   },
   "resourceMethods":[
      "PUT",
      "DELETE"
   ],
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "collectionActions":{
      "refreshrepos":{

      }
   },
   "collectionFilters":{
      "accessToken":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "accountId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "avatarUrl":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "creatorId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "displayName":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "htmlUrl":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "namespaceId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "state":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioning":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioningMessage":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "type":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "userId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "uuid":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      }
   },
   "collectionMethods":[
      "POST",
      "GET"
   ],
   "id":"remoteAccount",
   "links":{
      "collection":"https://localhost:8443/v3/remoteaccounts",
      "self":"https://localhost:8443/v3/schemas/remoteAccount"
   },
   "pluralName":"remoteAccounts",
   "resourceFields":{
      "accessToken":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "accountId":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "annotations":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "avatarUrl":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "created":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "creatorId":{
         "create":false,
         "type":"reference[user]",
         "update":false
      },
      "displayName":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"string",
         "update":true
      },
      "htmlUrl":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "labels":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "name":{
         "create":true,
         "nullable":true,
         "type":"dnsLabel",
         "update":false
      },
      "namespaceId":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"reference[namespace]",
         "update":false
      },
      "ownerReferences":{
         "create":false,
         "nullable":true,
         "type":"array[ownerReference]",
         "update":false
      },
      "removed":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "state":{
         "create":false,
         "type":"string",
         "update":false
      },
      "status":{
         "create":false,
         "nullable":true,
         "type":"remoteAccountStatus",
         "update":false
      },
      "transitioning":{
         "create":false,
         "options":[
            "yes",
            "no",
            "error"
         ],
         "type":"enum",
         "update":false
      },
      "transitioningMessage":{
         "create":false,
         "type":"string",
         "update":false
      },
      "type":{
         "create":true,
         "nullable":true,
         "options":[
            "github"
         ],
         "required":true,
         "type":"enum",
         "update":true
      },
      "userId":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"reference[user]",
         "update":true
      },
      "uuid":{
         "create":false,
         "nullable":true,
         "type":"string",
         "update":false
      }
   },
   "resourceMethods":[
      "PUT",
      "DELETE"
   ],
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "collectionFilters":{
      "creatorId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "namespaceId":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "remoteAccountName":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "state":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioning":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "transitioningMessage":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "type":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      },
      "uuid":{
         "modifiers":[
            "eq",
            "ne",
            "in",
            "notin"
         ]
      }
   },
   "collectionMethods":[
      "POST",
      "GET"
   ],
   "id":"gitRepoCache",
   "links":{
      "collection":"https://localhost:8443/v3/gitrepocaches",
      "self":"https://localhost:8443/v3/schemas/gitRepoCache"
   },
   "pluralName":"gitRepoCaches",
   "resourceFields":{
      "annotations":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "created":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "creatorId":{
         "create":false,
         "type":"reference[user]",
         "update":false
      },
      "labels":{
         "create":true,
         "nullable":true,
         "type":"map[string]",
         "update":true
      },
      "name":{
         "create":true,
         "nullable":true,
         "type":"dnsLabel",
         "update":false
      },
      "namespaceId":{
         "create":true,
         "nullable":true,
         "required":true,
         "type":"reference[namespace]",
         "update":false
      },
      "ownerReferences":{
         "create":false,
         "nullable":true,
         "type":"array[ownerReference]",
         "update":false
      },
      "remoteAccountName":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "removed":{
         "create":false,
         "nullable":true,
         "type":"date",
         "update":false
      },
      "repositories":{
         "create":true,
         "nullable":true,
         "type":"array[gitRepository]",
         "update":true
      },
      "state":{
         "create":false,
         "type":"string",
         "update":false
      },
      "status":{
         "create":false,
         "nullable":true,
         "type":"gitRepoCacheStatus",
         "update":false
      },
      "transitioning":{
         "create":false,
         "options":[
            "yes",
            "no",
            "error"
         ],
         "type":"enum",
         "update":false
      },
      "transitioningMessage":{
         "create":false,
         "type":"string",
         "update":false
      },
      "type":{
         "create":true,
         "nullable":true,
         "options":[
            "github"
         ],
         "required":true,
         "type":"enum",
         "update":true
      },
      "uuid":{
         "create":false,
         "nullable":true,
         "type":"string",
         "update":false
      }
   },
   "resourceMethods":[
      "PUT",
      "DELETE"
   ],
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
},
{
   "actions":{

   },
   "baseType":"schema",
   "id":"gitRepository",
   "links":{
      "self":"https://localhost:8443/v3/schemas/gitRepository"
   },
   "pluralName":"gitRepositories",
   "resourceFields":{
      "cloneUrl":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "language":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "name":{
         "create":true,
         "nullable":true,
         "type":"string",
         "update":true
      },
      "permissions":{
         "create":true,
         "nullable":true,
         "type":"repoPerm",
         "update":true
      }
   },
   "type":"schema",
   "version":{
      "group":"management.cattle.io",
      "path":"/v3",
      "subContext":{
         "clusters":true
      },
      "version":"v3"
   }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment