API Explorer 1 endpoints

Get Dynamic Resource Doc (with provenance)

GET /obp/v7.0.0/management/dynamic-resource-docs/DYNAMIC_RESOURCE_DOC_ID

OBPv7.0.0-getDynamicResourceDocProvenance Roles: CanGetDynamicResourceDoc Dynamic-Resource-Doc

Returns the Dynamic Resource Doc specified by DYNAMIC_RESOURCE_DOC_ID, wrapped with a provenance object (created_by_user_id, updated_by_user_id, method_body_hash, created_at, updated_at).

This is the v7.0.0 read view of the v4.0.0 Dynamic Resource Doc; create / update / delete remain on v4.0.0.

User Authentication is Required. The User must be logged in. The Application must also be authenticated.

URL Parameters:

DYNAMIC_RESOURCE_DOC_ID: vce035ca-9a0f-4bfa-b30b-9003aa467f51

JSON response body fields (10)
description
Description of the object. Maximum length is 2000. It can be any characters here.
dynamic_resource_doc
dynamic_resource_doc
provenance
provenance
roles
CanCreateMyUser
summary
tags
Create-My-User
created_at
created_at
created_by_user_id
method_body_hash
method_body_hash
updated_at
updated_at
Example success response
{
  "dynamic_resource_doc": {
    "request_url": "/my_user/MY_USER_ID",
    "success_response_body": {
      "my_user_id": "some_id_value",
      "name": "Jhon",
      "age": 12,
      "hobby": [
        "coding"
      ],
      "_optional_fields_": [
        "hobby"
      ]
    },
    "example_request_body": {
      "name": "Jhon",
      "age": 12,
      "hobby": [
        "coding"
      ],
      "_optional_fields_": [
        "hobby"
      ]
    },
    "programming_lang": "Scala",
    "bank_id": "gh.29.uk",
    "roles": "CanCreateMyUser",
    "summary": "Create My User",
    "error_response_bodies": "OBP-50000: Unknown Error.,OBP-20001: User not logged in. Authentication is required!,OBP-20006: User is missing one or more roles: ,OBP-10001: Incorrect json format.",
    "request_verb": "POST",
    "description": "Create one User",
    "tags": "Create-My-User",
    "method_body": "%20%20%20%20val%20Some(resourceDoc)%20%3D%20callContext.resourceDocument%0A%20%20%20%20val%20hasRequestBody%20%3D%20callContext.httpBody.exists(_.nonEmpty)%0A%0A%20%20%20%20%2F%2F%20get%20Path%20Parameters%2C%20example%3A%0A%20%20%20%20%2F%2F%20if%20the%20requestUrl%20of%20resourceDoc%20is%20%2Fhello%2Fbanks%2FBANK_ID%2Fworld%0A%20%20%20%20%2F%2F%20the%20request%20path%20is%20%2Fhello%2Fbanks%2Fbank_x%2Fworld%0A%20%20%20%20%2F%2FpathParams.get(%22BANK_ID%22)%20will%20get%20Option(%22bank_x%22)%20value%0A%0A%20%20%20%20val%20myUserId%20%3D%20pathParams(%22MY_USER_ID%22)%0A%0A%0A%20%20%20%20val%20requestEntity%20%3D%20callContext.httpBody.filter(_.nonEmpty)%20match%20%7B%0A%20%20%20%20%20%20case%20Some(rawBody)%20%3D%3E%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20com.openbankproject.commons.util.JsonAliases.parse(rawBody).extract%5BRequestRootJsonClass%5D%0A%20%20%20%20%20%20%20%20%7D%20catch%20%7B%0A%20%20%20%20%20%20%20%20%20%20case%20e%3A%20MappingException%20%3D%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20errorResponse(s%22%24InvalidJsonFormat%20%24%7Be.msg%7D%22)%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20case%20None%20%3D%3E%0A%20%20%20%20%20%20%20%20return%20errorResponse(s%22%24InvalidRequestPayload%20Current%20request%20has%20no%20payload%22)%0A%20%20%20%20%7D%0A%0A%0A%20%20%20%20%2F%2F%20please%20add%20business%20logic%20here%0A%20%20%20%20val%20responseBody%3AResponseRootJsonClass%20%3D%20ResponseRootJsonClass(s%22%24%7BmyUserId%7D_from_path%22%2C%20requestEntity.name%2C%20requestEntity.age%2C%20requestEntity.hobby)%0A%20%20%20%20Future.successful%20%7B%0A%20%20%20%20%20%20(responseBody%2C%20HttpCode.%60200%60(callContext.callContext))%0A%20%20%20%20%7D",
    "dynamic_resource_doc_id": "vce035ca-9a0f-4bfa-b30b-9003aa467f51",
    "partial_function_name": "createUser"
  },
  "provenance": {
    "created_by_user_id": "9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1",
    "method_body_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "created_at": "1100-01-01T01:01:01.000Z",
    "updated_at": "1100-01-01T01:01:01.000Z"
  }
}
Possible errors (4)
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-40040: DynamicResourceDoc not found, please specify valid DYNAMIC_RESOURCE_DOC_ID.
  • OBP-50000: Unknown Error.
Implemented by OBPv7.0.0 getDynamicResourceDocProvenance