Skip to content

Commit

Permalink
REST API docu, changes in index, additions to endpoints and also to r…
Browse files Browse the repository at this point in the history
…aw sampless
  • Loading branch information
matusmacik committed Feb 26, 2024
1 parent c127ecb commit f52639e
Show file tree
Hide file tree
Showing 26 changed files with 1,826 additions and 155 deletions.
144 changes: 129 additions & 15 deletions docs/interfaces/rest/endpoints/access-certification-campaign-type.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,63 @@
:page-display-order: 900
:page-toc: top


== Description

Here we are describing the Access Certification Campaign object type in relation to midPoints REST API. The
Access Certification Campaign objects are a part of the REST API web resources. The Access Certification Campaign objects are a part
of the
Access Certification Campaign objects are a part of the REST API web resources.

.Endpoint
[source, http]
----
accessCertificationCampaigns/
----

== Applicable Operations
== Operations And Examples

The Access Certification Campaign web resource is a part of the Create-Read-Update-Delete (CRUD) web resources
present in midPoint. This is apparent in the operations which are available for this type of object.
The Access Certification Campaign Type endpoint operations and examples.
// === Create Access Certification Campaign Type Object
//
// include::../operations/examples/raw/create-acc.adoc[]
//
// - xref:/midpoint/reference/interfaces/rest/operations/create-op-rest/[Create Operation]

=== Get Access Certification Campaign Type Objects

-- TODO
// - xref:/midpoint/reference/interfaces/rest/operations/create-op-rest/[Create Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/get-op-rest/[Get Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/search-op-rest/[Search Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/modify-op-rest/[Modify Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/delete-op-rest/[Delete Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/generate-and-validate-concrete-op-rest/[Generate and Validate Operations]
Get operation for fetching a single specific object.

.Get Access Certification Campaign Type object with REST

include::../operations/examples/raw/get-acc.adoc[]

- xref:/midpoint/reference/interfaces/rest/operations/get-op-rest/[Get Operation]

=== Search for Access Certification Campaign Type Objects

Search operation usable for fetching the full list of objects or a list based on filter.

include::../operations/examples/raw/search-all-acc.adoc[]

include::../operations/examples/raw/search-all.adoc[]

- xref:/midpoint/reference/interfaces/rest/operations/search-op-rest/[Search Operation]

=== Modify Access Certification Campaign Type Objects

include::../operations/examples/raw/modify-attr-acc.adoc[]

- xref:/midpoint/reference/interfaces/rest/operations/modify-op-rest/[Modify Operation]

=== Delete Access Certification Campaign Type Objects

include::../operations/examples/raw/delete-acc.adoc[]

- xref:/midpoint/reference/interfaces/rest/operations/delete-op-rest/[Delete Operation]

=== Generate and Validate Operations for Access Certification Campaign Type Objects

Operations to generate or validate values.

- xref:/midpoint/reference/interfaces/rest/operations/generate-and-validate-concrete-op-rest/[Generate and Validate Operations]

== JSON Example

Expand All @@ -39,9 +69,93 @@ is usually a part of the output, yet it was removed for the purpose of the examp
.Show JSON Example
[%collapsible]
====
[source, http]
[source, json]
----
{
"accessCertificationCampaign": {
"oid": "3a0fb4a2-ffbd-4e72-bbff-47327df054c4",
"version": "0",
"name": "User's assignemnts according to the manager 1",
"description": "Certifies all users' assignments. Everything is certified by the administrator.",
"iteration": 1,
"definitionRef": {
"oid": "8f37ee15-9945-4872-8b90-8cb75f304b41",
"relation": "org:default",
"type": "c:AccessCertificationDefinitionType"
},
"ownerRef": {
"oid": "00000000-0000-0000-0000-000000000002",
"relation": "org:default",
"type": "c:UserType"
},
"handlerUri": "http://midpoint.evolveum.com/xml/ns/public/certification/handlers-3#direct-assignment",
"scopeDefinition": {
"@type": "c:AccessCertificationAssignmentReviewScopeType",
"objectType": "#UserType",
"searchFilter": {
"org": {
"@ns": "http://prism.evolveum.com/xml/ns/public/query-3",
"path": "parentOrgRef",
"orgRef": {
"oid": "7d1e7065-455c-48d5-a469-1734fd255739",
"scope": "SUBTREE"
}
}
},
"itemSelectionExpression": {
"script": [
{
"code": "\nimport com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType\nlog.info(\"####### assignment: \" + assignment)\nif (assignment.targetRef.type.localPart.equals('RoleType')) \n{log.info(\"#### not a OrgType: \" + assignment.targetRef.type.localPart)\nrole = midpoint.resolveReferenceIfExists(assignment.targetRef)\nlog.info(\"##### role: \" + role)\nlog.info(\"##### role type: \" + role.subtype)\nreturn role != null && role.requestable}\norg = midpoint.resolveReferenceIfExists(assignment.targetRef)\nlog.info(\"##### org: \" + org)\nlog.info(\"##### org type: \" + org.subtype)\nreturn org != null && org.subtype[0] == 'access'\n\n "
}
]
},
"includeRoles": true,
"includeOrgs": true,
"includeResources": false
},
"remediationDefinition": {
"style": "automated"
},
"stageDefinition": {
"@id": 1,
"number": 1,
"name": "Manager's review",
"description": "In this stage, the manager has to review all the assignments of users belonging to his org unit.",
"duration": "P14D",
"notifyBeforeDeadline": [
"PT48H",
"PT12H"
],
"notifyOnlyWhenNoDecision": true,
"reviewerSpecification": {
"useObjectManager": {
"allowSelf": false
}
},
"timedActions": {
"@id": 2,
"time": {
"value": [
"P7D"
]
},
"actions": {
"escalate": {
"approverRef": {
"oid": "00000000-0000-0000-0000-000000000002",
"relation": "org:default",
"type": "c:UserType"
},
"delegationMethod": "addAssignees",
"escalationLevelName": "Level1"
}
}
}
},
"state": "created",
"stageNumber": 0
}
}
----
====

Expand Down
118 changes: 105 additions & 13 deletions docs/interfaces/rest/endpoints/access-certification-definition-type.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,39 @@ Access Certification Definition objects are a part of the REST API web resources
accessCertificationDefinitions/
----

== Applicable Operations
== Operations And Examples

The Access Certification Definition web resource is a part of the Create-Read-Update-Delete (CRUD) web resources
present in midPoint. This is apparent in the operations which are available for this type of object.
The Access Certification Definition Type endpoint operations and examples.

-- TODO
=== Create Access Certification Definition Type Object

// - xref:/midpoint/reference/interfaces/rest/operations/create-op-rest/[Create Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/get-op-rest/[Get Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/search-op-rest/[Search Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/modify-op-rest/[Modify Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/delete-op-rest/[Delete Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/generate-and-validate-concrete-op-rest.adoc/[Generate and
// Validate Operations]
- xref:/midpoint/reference/interfaces/rest/operations/create-op-rest/[Create Operation]

=== Get Access Certification Definition Type Objects

Get operation for fetching a single specific object.

- xref:/midpoint/reference/interfaces/rest/operations/get-op-rest/[Get Operation]

=== Search for Access Certification Definition Type Objects

Search operation usable for fetching the full list of objects or a list based on filter.

- xref:/midpoint/reference/interfaces/rest/operations/search-op-rest/[Search Operation]

=== ModifyAccess Certification Definition Type Objects

- xref:/midpoint/reference/interfaces/rest/operations/modify-op-rest/[Modify Operation]

=== Delete Access Certification Definition Type Objects

- xref:/midpoint/reference/interfaces/rest/operations/delete-op-rest/[Delete Operation]

=== Generate and Validate Operations for Access Certification Definition Type Objects

Operations to generate or validate values.

- xref:/midpoint/reference/interfaces/rest/operations/generate-and-validate-concrete-op-rest/[Generate and Validate Operations]

== JSON Example

Expand All @@ -37,9 +56,82 @@ is usually a part of the output, yet it was removed for the purpose of the examp
.Show JSON Example
[%collapsible]
====
[source, http]
[source, json]
----
{
"accessCertificationDefinition": {
"oid": "8f37ee15-9945-4872-8b90-8cb75f304b41",
"version": "2",
"name": "User's assignemnts according to the manager",
"description": "Certifies all users' assignments. Everything is certified by the administrator.",
"operationExecution": {},
"iteration": 0,
"iterationToken": "",
"handlerUri": "http://midpoint.evolveum.com/xml/ns/public/certification/handlers-3#direct-assignment",
"scopeDefinition": {
"@type": "c:AccessCertificationAssignmentReviewScopeType",
"objectType": "#UserType",
"searchFilter": {
"org": {
"@ns": "http://prism.evolveum.com/xml/ns/public/query-3",
"path": "parentOrgRef",
"orgRef": {
"oid": "7d1e7065-455c-48d5-a469-1734fd255739",
"scope": "SUBTREE"
}
}
},
"itemSelectionExpression": {
"script": [
{}
]
},
"includeRoles": true,
"includeOrgs": true,
"includeResources": false
},
"remediationDefinition": {
"style": "automated"
},
"stageDefinition": {
"@id": 1,
"number": 1,
"name": "Manager's review",
"description": "In this stage, the manager has to review all the assignments of users belonging to his org unit.",
"duration": "P14D",
"notifyBeforeDeadline": [
"PT48H",
"PT12H"
],
"notifyOnlyWhenNoDecision": true,
"reviewerSpecification": {
"useObjectManager": {
"allowSelf": false
}
},
"timedActions": {
"@id": 2,
"time": {
"value": [
"P7D"
]
},
"actions": {
"escalate": {
"approverRef": {
"oid": "00000000-0000-0000-0000-000000000002",
"relation": "org:default",
"type": "c:UserType"
},
"delegationMethod": "addAssignees",
"escalationLevelName": "Level1"
}
}
}
},
"lastCampaignIdUsed": 1
}
}
----
====

Expand Down

0 comments on commit f52639e

Please sign in to comment.