Projects
Use this page to manage projects. Start by listing projects in the company scope; the returned project ID is used in the update operations below.
List projects
Replace <company_id> with a company your API key can access.
List projects in a company
This generated query uses placeholders for required values. Replace them with values available to your API key before running it.
Use the returned collection[].id as <project_id> in the update operations.
- cURL
- JavaScript
- Python
curl --request POST https://api.convisoappsec.com/graphql \
--header "x-api-key: $CONVISO_API_KEY" \
--header "content-type: application/json" \
--data '{"query":"query GetProjects($page: Int, $limit: Int, $params: ProjectSearch) {\n projects(page: $page, limit: $limit, params: $params) {\n collection { id label status }\n metadata { currentPage limitValue totalCount }\n }\n}","variables":{"page":1,"limit":20,"params":{"scopeIdEq":"<company_id>"}}}'
const response = await fetch('https://api.convisoappsec.com/graphql', {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-api-key': process.env.CONVISO_API_KEY,
},
body: JSON.stringify({
query: "query GetProjects($page: Int, $limit: Int, $params: ProjectSearch) {\n projects(page: $page, limit: $limit, params: $params) {\n collection { id label status }\n metadata { currentPage limitValue totalCount }\n }\n}",
variables: {
"page": 1,
"limit": 20,
"params": {
"scopeIdEq": "<company_id>"
}
},
}),
});
const { data, errors } = await response.json();
if (errors) throw new Error(errors.map(({ message }) => message).join(', '));
console.log(data);
import json
import os
import requests
response = requests.post(
'https://api.convisoappsec.com/graphql',
headers={
'content-type': 'application/json',
'x-api-key': os.environ['CONVISO_API_KEY'],
},
json={
'query': "query GetProjects($page: Int, $limit: Int, $params: ProjectSearch) {\n projects(page: $page, limit: $limit, params: $params) {\n collection { id label status }\n metadata { currentPage limitValue totalCount }\n }\n}",
'variables': json.loads("{\"page\":1,\"limit\":20,\"params\":{\"scopeIdEq\":\"<company_id>\"}}"),
},
timeout=30,
)
response.raise_for_status()
payload = response.json()
if payload.get('errors'):
raise RuntimeError(payload['errors'])
print(payload['data'])
Create a project
typeId is the project type and companyId is the company scope. Add optional
fields only when your workflow requires them.
Create a project
This generated mutation uses placeholders for required values. Replace them with values available to your API key before running it.
- cURL
- JavaScript
- Python
curl --request POST https://api.convisoappsec.com/graphql \
--header "x-api-key: $CONVISO_API_KEY" \
--header "content-type: application/json" \
--data '{"query":"mutation CreateProject($input: CreateProjectInput!) {\n createProject(input: $input) {\n errors\n project { id label status }\n }\n}","variables":{"input":{"label":"Example project","goal":"example","scope":"example","startDate":"<ISO8601Date>","companyId":"<company_id>","typeId":1}}}'
const response = await fetch('https://api.convisoappsec.com/graphql', {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-api-key': process.env.CONVISO_API_KEY,
},
body: JSON.stringify({
query: "mutation CreateProject($input: CreateProjectInput!) {\n createProject(input: $input) {\n errors\n project { id label status }\n }\n}",
variables: {
"input": {
"label": "Example project",
"goal": "example",
"scope": "example",
"startDate": "<ISO8601Date>",
"companyId": "<company_id>",
"typeId": 1
}
},
}),
});
const { data, errors } = await response.json();
if (errors) throw new Error(errors.map(({ message }) => message).join(', '));
console.log(data);
import json
import os
import requests
response = requests.post(
'https://api.convisoappsec.com/graphql',
headers={
'content-type': 'application/json',
'x-api-key': os.environ['CONVISO_API_KEY'],
},
json={
'query': "mutation CreateProject($input: CreateProjectInput!) {\n createProject(input: $input) {\n errors\n project { id label status }\n }\n}",
'variables': json.loads("{\"input\":{\"label\":\"Example project\",\"goal\":\"example\",\"scope\":\"example\",\"startDate\":\"<ISO8601Date>\",\"companyId\":\"<company_id>\",\"typeId\":1}}"),
},
timeout=30,
)
response.raise_for_status()
payload = response.json()
if payload.get('errors'):
raise RuntimeError(payload['errors'])
print(payload['data'])
Update a project
Use the project ID returned by the list or create operation. The schema reference
has every optional field accepted by UpdateProjectInput.
Update project details
This generated mutation uses placeholders for required values. Replace them with values available to your API key before running it.
- cURL
- JavaScript
- Python
curl --request POST https://api.convisoappsec.com/graphql \
--header "x-api-key: $CONVISO_API_KEY" \
--header "content-type: application/json" \
--data '{"query":"mutation UpdateProject($input: UpdateProjectInput!) {\n updateProject(input: $input) {\n errors\n msg\n }\n}","variables":{"input":{"id":"<project_id>"}}}'
const response = await fetch('https://api.convisoappsec.com/graphql', {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-api-key': process.env.CONVISO_API_KEY,
},
body: JSON.stringify({
query: "mutation UpdateProject($input: UpdateProjectInput!) {\n updateProject(input: $input) {\n errors\n msg\n }\n}",
variables: {
"input": {
"id": "<project_id>"
}
},
}),
});
const { data, errors } = await response.json();
if (errors) throw new Error(errors.map(({ message }) => message).join(', '));
console.log(data);
import json
import os
import requests
response = requests.post(
'https://api.convisoappsec.com/graphql',
headers={
'content-type': 'application/json',
'x-api-key': os.environ['CONVISO_API_KEY'],
},
json={
'query': "mutation UpdateProject($input: UpdateProjectInput!) {\n updateProject(input: $input) {\n errors\n msg\n }\n}",
'variables': json.loads("{\"input\":{\"id\":\"<project_id>\"}}"),
},
timeout=30,
)
response.raise_for_status()
payload = response.json()
if payload.get('errors'):
raise RuntimeError(payload['errors'])
print(payload['data'])
Change project status
Set projectStatus to the next status allowed by your project workflow.
Change project status
This generated mutation uses placeholders for required values. Replace them with values available to your API key before running it.
- cURL
- JavaScript
- Python
curl --request POST https://api.convisoappsec.com/graphql \
--header "x-api-key: $CONVISO_API_KEY" \
--header "content-type: application/json" \
--data '{"query":"mutation UpdateProjectStatus($input: UpdateProjectStatusInput!) {\n updateProjectStatus(input: $input) {\n errors\n project { id label status }\n }\n}","variables":{"input":{"id":"<project_id>","projectStatus":"ANALYSIS"}}}'
const response = await fetch('https://api.convisoappsec.com/graphql', {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-api-key': process.env.CONVISO_API_KEY,
},
body: JSON.stringify({
query: "mutation UpdateProjectStatus($input: UpdateProjectStatusInput!) {\n updateProjectStatus(input: $input) {\n errors\n project { id label status }\n }\n}",
variables: {
"input": {
"id": "<project_id>",
"projectStatus": "ANALYSIS"
}
},
}),
});
const { data, errors } = await response.json();
if (errors) throw new Error(errors.map(({ message }) => message).join(', '));
console.log(data);
import json
import os
import requests
response = requests.post(
'https://api.convisoappsec.com/graphql',
headers={
'content-type': 'application/json',
'x-api-key': os.environ['CONVISO_API_KEY'],
},
json={
'query': "mutation UpdateProjectStatus($input: UpdateProjectStatusInput!) {\n updateProjectStatus(input: $input) {\n errors\n project { id label status }\n }\n}",
'variables': json.loads("{\"input\":{\"id\":\"<project_id>\",\"projectStatus\":\"ANALYSIS\"}}"),
},
timeout=30,
)
response.raise_for_status()
payload = response.json()
if payload.get('errors'):
raise RuntimeError(payload['errors'])
print(payload['data'])
For less common project operations and every available field, use the complete schema.
Contribute to the Docs
Found something outdated or missing? Help us improve the documentation with a quick suggestion or edit.
How to contribute