Skip to content

Latest commit

 

History

History
261 lines (187 loc) · 6.96 KB

ProjectsApi.md

File metadata and controls

261 lines (187 loc) · 6.96 KB

ProjectsApi

All URIs are relative to http://localhost

Method HTTP request Description
createProject POST /v2/projects Create Project
deleteProject DELETE /v2/projects/{proj_id} Delete Project
getProject GET /v2/projects/{proj_id} Get Project
listProjects GET /v2/projects List Projects
updateProject PATCH /v2/projects/{proj_id} Update Project

createProject

ProjectRead createProject(projectCreate)

Create Project

Creates a new project under the active organization.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ProjectsApi()
val projectCreate : ProjectCreate =  // ProjectCreate | 
try {
    val result : ProjectRead = apiInstance.createProject(projectCreate)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ProjectsApi#createProject")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ProjectsApi#createProject")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projectCreate ProjectCreate

Return type

ProjectRead

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteProject

deleteProject(projId)

Delete Project

Deletes the project and all its related data.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ProjectsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
try {
    apiInstance.deleteProject(projId)
} catch (e: ClientException) {
    println("4xx response calling ProjectsApi#deleteProject")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ProjectsApi#deleteProject")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

Return type

null (empty response body)

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getProject

ProjectRead getProject(projId)

Get Project

Gets a single project matching the given proj_id, if such project exists.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ProjectsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
try {
    val result : ProjectRead = apiInstance.getProject(projId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ProjectsApi#getProject")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ProjectsApi#getProject")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

Return type

ProjectRead

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listProjects

kotlin.collections.List<ProjectRead> listProjects(page, perPage)

List Projects

Lists all the projects under the active organization.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ProjectsApi()
val page : kotlin.Int = 56 // kotlin.Int | Page number of the results to fetch, starting at 1.
val perPage : kotlin.Int = 56 // kotlin.Int | The number of results per page (max 100).
try {
    val result : kotlin.collections.List<ProjectRead> = apiInstance.listProjects(page, perPage)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ProjectsApi#listProjects")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ProjectsApi#listProjects")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
page kotlin.Int Page number of the results to fetch, starting at 1. [optional] [default to 1]
perPage kotlin.Int The number of results per page (max 100). [optional] [default to 30]

Return type

kotlin.collections.List<ProjectRead>

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateProject

ProjectRead updateProject(projId, projectUpdate)

Update Project

Updates the project.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ProjectsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val projectUpdate : ProjectUpdate =  // ProjectUpdate | 
try {
    val result : ProjectRead = apiInstance.updateProject(projId, projectUpdate)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ProjectsApi#updateProject")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ProjectsApi#updateProject")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
projectUpdate ProjectUpdate

Return type

ProjectRead

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json