Ressurs
Project template
De gjenbrukbare definisjonene prosjekter — oppdrag — opprettes fra: en prosjektmal fastsetter det nye prosjektets type og hvilke klassifiseringer det kan få, bærer pris- og timeprismodellen, og gir standardverdiene og reglene per selskap som prosjektet arver. Skrivebeskyttet gjennom API-et: liste og oppslag.
Endepunktreferansen under står på engelsk i begge språktrærne. Den gjengir API-kontrakten ordrett, og det finnes ingen generator å bygge den på nytt fra, så en oversatt kopi ville drevet fra API-et første gang et endepunkt endres.
Endepunkter
To skrivebeskyttede endepunkter, i samme rekkefølge som de er dokumentert nedenfor.
- GET
/project-template— List project templates (offset-paginated) - GET
/project-template/{templateId}— Get a project template
Alle endepunktene på denne siden kan i tillegg svare med fellesfeilene — 401, 403, 404 (ukjent instans) og 500. De er dokumentert én gang, under Feil og feilsøking.
List project templates (offset-paginated)
GET /{instanceName}/api/v1/{locale}/project-template
Offset/limit paging with a real total, ordered by name. Optional filters: isActive, templateTypeId. RFC 8288 navigation links are in the body.
Parametere
| Parameter | Plassering | Type | Beskrivelse |
|---|---|---|---|
offset |
query | integerdefault 0 |
Zero-based item offset. |
limit |
query | integer |
Maximum items to return per page. |
isActive |
query | boolean |
Filter on active state. |
templateTypeId |
query | string |
Svar
| Status | Beskrivelse |
|---|---|
| 200 | A page of project templates with totals and navigation links. ProjectTemplateOffsetListResponse · application/json |
| 400 | Invalid paging parameter, or a filter id is not a valid id. |
Eksempel
curl "https://api.visena.example/acme/api/v1/en/project-template?offset=0&limit=20" \
-H "Authorization: Bearer $TOKEN"
Get a project template
GET /{instanceName}/api/v1/{locale}/project-template/{templateId}
Returns the full template. 404 if unknown; 400 if the id cannot be unmasked.
Parametere
| Parameter | Plassering | Type | Beskrivelse |
|---|---|---|---|
templateId required |
path | string |
Masked template id. |
Svar
| Status | Beskrivelse |
|---|---|
| 200 | The project template. ProjectTemplateDto · application/json |
| 400 | The id is not a valid id. |
| 404 | No project template with that id. |
Eksempel
curl "https://api.visena.example/acme/api/v1/en/project-template/tM2qL6" \
-H "Authorization: Bearer $TOKEN"
Objektstrukturer
Svarkroppene som brukes over, i den rekkefølgen de først refereres.
ProjectTemplateOffsetListResponse
| Felt | Type | Beskrivelse |
|---|---|---|
totalItems |
integer |
Total number of matching project templates. |
totalPages |
integer |
Total number of pages at the current page size. |
page |
integer |
Zero-based index of the current page. |
size |
object |
Page size actually applied. |
items |
array of ProjectTemplateListItemDto | The project templates on this page. |
links |
ProjectTemplateListLinks |
ProjectTemplateListItemDto
The project templates on this page.
| Felt | Type | Beskrivelse |
|---|---|---|
id |
string (masked id) |
|
name |
string |
|
description |
string |
Free-text description, if any. |
projectType |
string, one of PROJECT_TYPE_PROJECT PROJECT_TYPE_ASSIGNMENT |
|
templateTypeId |
string (masked id) |
|
templateTypeName |
string |
Template type display name. |
isActive |
boolean |
|
year |
object |
Default project year, if set. |
numProjects |
integer |
Number of projects created from this template. |
isGlobalProjectsAllowed |
boolean |
|
isMultipleActiveProjectsPerYearForCompanyAllowed |
boolean |
ProjectTemplateListLinks
RFC 8288 navigation links.
| Felt | Type | Beskrivelse |
|---|---|---|
self |
string |
URL of the current page. |
first |
string |
URL of the first page. |
prev |
string |
URL of the previous page, if any. |
next |
string |
URL of the next page, if any. |
last |
string |
URL of the last page. |
ProjectTemplateDto
| Felt | Type | Beskrivelse |
|---|---|---|
id |
string (masked id) |
|
name |
string |
|
suggestedName |
string |
Suggested project name pattern, if any. |
description |
string |
Free-text description, if any. |
templateTypeId |
string (masked id) |
|
templateTypeName |
string |
Template type display name. |
projectType |
string, one of PROJECT_TYPE_PROJECT PROJECT_TYPE_ASSIGNMENT |
|
isActive |
boolean |
|
year |
object |
Default project year, if set. |
isGlobalProjectsAllowed |
boolean |
Whether projects without a company (global projects) are allowed. |
isMultipleActiveProjectsPerYearForCompanyAllowed |
boolean |
Whether more than one active project per year per company is allowed. |
isDefaultPublicAccess |
boolean |
Whether projects default to public access. |
priceModel |
string, one of PRICE_MODEL_FIXED_PRICE PRICE_MODEL_HOURLY_RATE |
|
hourlyRateModel |
string, one of HOURLY_RATE_MODEL_FIXED HOURLY_RATE_MODEL_PROJECT_SPECIFIC |
|
isChargable |
boolean |
|
externalReference |
string |