Create project versions
post
https://{your_site_interface}/opa-hub/api/12.2.35/projects/{project-name}/versions
This operation will create project versions.
Request
Path Parameters
-
project-name(required): string
The name of the project.
Supported Media Types
- application/json
Nested Schema : projectVersionPost
Type:
Show Source
object
-
definition(required): object
definition
The definition of the decision service, which must conform to the Decision Service project format.
-
description: string
The description of this version, if the project kind is "policy-model".
-
importedFlag: boolean
Default Value:
false
If true, the version is the result of a JSON project import. -
isDraft(required): boolean
If true, the version is a draft and may be overwritten on the next save.
-
lastDefinitionHash: string
Required on POST unless the version is for a new project. This must be the hash of the existing unpublished definition if one exists, otherwise the latest published definition hash. Not returned on GET.
Nested Schema : definition
Type:
object
The definition of the decision service, which must conform to the Decision Service project format.
Security
-
Authorization: apiKey
Type:
apiKey
Description:Obtain a bearer token from https://{your_site_interface}/opa-hub/api/12.2.17/auth and use it in the Authorization header as: Bearer {token}.
-
oauth2_opa: oauth2
Type:
oauth2
Description:POST the OAuth2 Client Credentials parameters to https://{your_site_interface}/opa-hub/api/12.2.17/auth and use the access token from the response in the Authorization header.
Response
Supported Media Types
- application/json
201 Response
The request has been fulfilled and resulted in a new resource being created.
Nested Schema : projectVersion
Type:
Show Source
object
-
author: string
Read Only:
true
The author of this version. -
createTimestamp: string
(date-time)
Read Only:
true
The date and time the version was created -
definition: object
definition
The definition of the decision service, which must conform to the Decision Service project format.
-
definitionHash: string
Read Only:
true
The hash of the definition. -
description: string
The description of this version, if the project kind is "policy-model".
-
descriptionAuthor: string
If the description has been updated, the author of the updated description.
-
descriptionUpdatedAt: string
(date-time)
If the description has been updated, the date and time of its last update.
-
inclusions-report: object
projectVersionInclusionsReport
-
isDraft: boolean
If true, the version is a draft and may be overwritten on the next save.
-
lastDefinitionHash: string
Required on POST unless the version is for a new project. This must be the hash of the existing unpublished definition if one exists, otherwise the latest published definition hash. Not returned on GET.
-
snapshot: string
(byte)
The base-64 data, if the project kind is "policy-model".Example:
QmFzZS02NCBkYXRhLg==
-
version: integer
(int64)
Read Only:
true
The automatically assigned version number
Nested Schema : definition
Type:
object
The definition of the decision service, which must conform to the Decision Service project format.
Nested Schema : projectVersionInclusionsReport
Type:
Show Source
object
-
inclusions: array
inclusions
Read Only:
true
Contains a flat array of all the project names and versions included by this project version.
Nested Schema : inclusions
Type:
array
Read Only:
true
Contains a flat array of all the project names and versions included by this project version.
Show Source
Nested Schema : projectVersionInclusionsReportInclusion
Type:
Show Source
object
-
inclusionLatestVersion: integer
(int64)
The latest version of the included project.
-
inclusionName(required): string
The name of the included project.
-
inclusionVersion(required): integer
(int64)
The version of the included project.
-
projectName(required): string
The name of the including project.
-
projectVersion(required): integer
(int64)
The version of the including project.
-
upToDateFlag(required): boolean
A flag indicating whether the included project is the latest version.
400 Response
The request could not be processed because it contains missing or invalid information.