Skip to main content

Platform API: Projects

Project management operations

Create a new project​

POST /projects

Code samples


curl -X POST https://localhost:9243/api/v0.9/projects \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Creates a new project within the organization specified in the JWT token. Organization ID is automatically extracted from the token and does not need to be provided.

Payload

{
"id": "default-project",
"displayName": "Default Project",
"description": "This is the default project for development"
}

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:project:create`, `ap:project:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyCreateProjectRequesttruenone

Example responses

201 Response

{
"id": "default-project",
"displayName": "Default Project",
"description": "This is the default project for development",
"organizationId": "acme",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2023-10-12T10:30:00Z",
"updatedAt": "2023-10-12T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "The request conflicts with the current state of the resource."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
201CreatedProject created successfullyProject
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
409ConflictConflict. The request conflicts with the current state of the resource.Error
500Internal Server ErrorInternal Server Error.Error

Response Headers​

StatusHeaderTypeFormatDescription
201LocationstringuriURL of the newly created resource.

Get all projects for current user's organization​

GET /projects

Code samples


curl -X GET https://localhost:9243/api/v0.9/projects \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieves all projects belonging to the organization specified in the JWT token. Organization ID is automatically extracted from the token.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:project:read`, `ap:project:manage`

Parameters​

NameInTypeRequiredDescription
limitqueryintegerfalseMaximum number of items to return per page.
offsetqueryintegerfalseZero-based index of the first item to return.
sortByquerystringfalseField to sort the collection by. An unrecognized value falls back to the default sort (createdAt).
sortOrderquerystringfalseSort direction applied to sortBy.
queryquerystringfalseCase-insensitive substring filter matched against the resource id (handle).

Enumerated Values​

ParameterValue
sortByname
sortBycreatedAt
sortOrderasc
sortOrderdesc

Example responses

200 Response

{
"count": 2,
"list": [
{
"id": "default-project",
"displayName": "Default Project",
"description": "This is the default project for development",
"organizationId": "acme",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2023-10-12T10:30:00Z",
"updatedAt": "2023-10-12T10:30:00Z"
}
],
"pagination": {
"total": 10,
"offset": 0,
"limit": 10
}
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKProjects retrieved successfullyProjectListResponse
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Get project by ID​

GET /projects/{projectId}

Code samples


curl -X GET https://localhost:9243/api/v0.9/projects/{projectId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieves a specific project by its ID (handle). Access is validated against the organization in the JWT token to ensure users can only access projects in their organization.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:project:read`, `ap:project:manage`

Parameters​

NameInTypeRequiredDescription
projectIdpathstringtrueProject ID consisting of the handle (unique slug identifier) of the Project.

Detailed descriptions​

projectId: Project ID consisting of the handle (unique slug identifier) of the Project.

Example responses

200 Response

{
"id": "default-project",
"displayName": "Default Project",
"description": "This is the default project for development",
"organizationId": "acme",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2023-10-12T10:30:00Z",
"updatedAt": "2023-10-12T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKProject retrieved successfullyProject
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Update project​

PUT /projects/{projectId}

Code samples


curl -X PUT https://localhost:9243/api/v0.9/projects/{projectId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Updates an existing project's name. Access is validated against the organization in the JWT token.

Payload

{
"displayName": "Default Project",
"description": "This is the default project for development"
}

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:project:update`, `ap:project:manage`

Parameters​

NameInTypeRequiredDescription
projectIdpathstringtrueProject ID consisting of the handle (unique slug identifier) of the Project.
bodybodyProjecttruenone

Detailed descriptions​

projectId: Project ID consisting of the handle (unique slug identifier) of the Project.

Example responses

200 Response

{
"id": "default-project",
"displayName": "Default Project",
"description": "This is the default project for development",
"organizationId": "acme",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2023-10-12T10:30:00Z",
"updatedAt": "2023-10-12T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "The request conflicts with the current state of the resource."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKProject updated successfullyProject
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
404Not FoundNot Found. The specified resource does not exist.Error
409ConflictConflict. The request conflicts with the current state of the resource.Error
500Internal Server ErrorInternal Server Error.Error

Delete project​

DELETE /projects/{projectId}

Code samples


curl -X DELETE https://localhost:9243/api/v0.9/projects/{projectId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Deletes a specific project by its handle (unique slug identifier). Access is validated against the organization in the JWT token.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:project:delete`, `ap:project:manage`

Parameters​

NameInTypeRequiredDescription
projectIdpathstringtrueProject ID consisting of the handle (unique slug identifier) of the Project.

Detailed descriptions​

projectId: Project ID consisting of the handle (unique slug identifier) of the Project.

Example responses

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
204No ContentProject deleted successfullyNone
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Was this page helpful?