Skip Headers
Oracle® Healthcare Master Person Index Relationship Management REST APIs Reference Guide
Release 4.0

E71322-01
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

3 Management Resources

The management resources contain the following APIs:

3.1 GET /management

This API is used to get management REST API versioning information.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management

Request Type

HTTP GET

Response Content Type

application/json;charset=UTF-8

Response Parameters

Parameter Description
version The OHMPI RM version number
description The description of management resources
url The URL of this REST API

Response Status Code

Status Code Description
200 Success
404 Incorrect URI

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management

Sample Response Body

{
  "version": "1.0.0",
  "description": "OHMPI RM Management Resources",
  "url": "http://localhost:7001/ohmpi-rm/1.0.0/management"
}

Sample Response Code

200

3.2 GET /management/domains

This API is used to retrieve the list of domains.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/domains

Request Type

HTTP GET

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
expand all, objectxml, or fields View more details of the domain. The objectxml value displays the complete objectxml file, the fields value displays the fields present in the objectxml file, and the all value displays the complete objectxml file and the fields.
totalResults true or false View total records count

Response Parameters

Parameter Description
items An array containing domains
domain For information on the domain attributes in response, see Section A.2.3, "Domain Response Structure".
totalResults Value is set to the total number of domains based on the status filter. The value is displayed if totalResults is set to true in the request parameter. Otherwise, the value is null.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/domains?totalResults=true

Sample Response Body

{
  "items":
  [
    {
      "domainId": 2,
      "fields": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=fields}",
      "jndiname": "ejb/IndProviderMasterController",
      "links":
      [
        {
          "href": "/ohmpi-rm/1.0.0/management/domains/IndProvider",
          "mediaType": "application/json",
          "rel": "canonical"
        }
      ],
      "name": "IndProvider",
      "objectXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=objectxml}",
      "url": "t3://localhost:7001",
      "usercode": "********",
      "userid": "mpiAdmin"
    }
  ],
  "links":
  [
    {
      "href": "/ohmpi-rm/1.0.0/management/domains",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "totalResults": 1
}

Sample Response Code

200

3.3 GET /management/domains/{domain}

This API is used to retrieve the details of an existing domain.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/domains/{domain}

Request Type

HTTP GET

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
domain Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Domain Name of the domain to be searched
expand all, objectxml, or fields View more details of the domain. The objectxml value displays the complete objectxml file, the fields value displays the fields present in the objectxml file, and the all value displays the complete objectxml file and the fields.

Response Parameters

Parameter Description
domain For information on the domain attributes in response, see Section A.2.3, "Domain Response Structure".

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/domains/IndProvider

Sample Response Body

{
  "domainId": 2,
  "fields": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=fields}",
  "jndiname": "ejb/IndProviderMasterController",
  "links":
  [
    {
      "href": "/ohmpi-rm/1.0.0/management/domains/IndProvider",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "IndProvider",
  "objectXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=objectxml}",
  "url": "t3://localhost:7001",
  "usercode": "********",
  "userid": "mpiAdmin"
}

Sample Response Code

200

3.4 POST /management/domains/{domain}

This API is used to register a new domain.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/domains/{domain}

Request Content Type

application/json

Request Type

HTTP POST

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
domain Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Domain Name of the domain to be registered
domainResource - Details of the domain to be registered. For details on the fields for the domain request body, see Section A.1.3, "Domain Resource".

Response Parameters

Parameter Description
domain For information on the domain attributes in response, see Section A.2.3, "Domain Response Structure". To display all the attributes of the domain, use the GET /management/domains/{domain} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/domains/IndProvider

Sample Request Body

{
  "name": "IndProvider",
  "jndiname": "ejb/IndProviderMasterController ",
  "usercode": "d2VsY29tZTE=",
  "url": "t3://localhost:7001",
  "userid": "mpiAdmin"
}

Sample Response Body

{
  "domainId": 2,
  "fields": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=fields}",
  "jndiname": "ejb/IndProviderMasterController",
  "links":
  [
    {
      "href": "/ohmpi-rm/1.0.0/management/domains/IndProvider",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "IndProvider",
  "objectXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=objectxml}",
  "url": "t3://localhost:7001",
  "usercode": "********",
  "userid": "mpiAdmin"
}

Sample Response Code

200

3.5 PUT /management/domains/{domain}

This API is used to update an existing domain.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/domains/{domain}

Request Content Type

application/json

Request Type

HTTP PUT

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
domain Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Domain Name of the domain to be updated
domainResource - Details of the domain to be updated. For details on the fields for the domain request body, see Section A.1.3, "Domain Resource".

Response Parameters

Parameter Description
domain For information on the domain attributes in response, see Section A.2.3, "Domain Response Structure". To display all the attributes of the domain, use the GET /management/domains/{domain} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/domains/IndProvider

Sample Request Body

{
  "name": "IndProvider",
  "jndiname": "ejb/IndProviderMasterController ",
  "usercode": "d2VsY29tZTE=",
  "url": "t3://localhost:7011",
  "userid": "mpiAdminNew"
}

Sample Response Body

{
  "domainId": 2,
  "fields": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=fields}",
  "jndiname": "ejb/IndProviderMasterController",
  "links":
  [
    {
      "href": "/ohmpi-rm/1.0.0/management/domains/IndProvider",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "IndProvider",
  "objectXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=objectxml}",
  "url": "t3://localhost:7011",
  "usercode": "********",
  "userid": "mpiAdminNew"
}

Sample Response Code

200

3.6 PUT /management/domains/{domain}/files

This API is used to upload object definition xml file for a domain.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/domains/{domain}/files

Request Content Type

multipart/form-data

Request Type

HTTP PUT

Response Content Type

application/json;charset=UTF-8

Request Parameters

Parameter Description
domain Domain Name of the domain whose object.xml file needs to be uploaded
objectFile The XML file to be uploaded
contentDisposition MIME content-disposition header which contains name of the uploaded file.

Response Parameters

Parameter Description
domain For information on the domain attributes in response, see Section A.2.3, "Domain Response Structure". To display all the attributes of the domain, use the GET /management/domains/{domain} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/domains/IndProvider/files

Sample Response Body

{
  "domainId": 2,
  "fields": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=fields}",
  "jndiname": "ejb/IndProviderMasterController",
  "links":
  [
    {
      "href": "/ohmpi-rm/1.0.0/management/domains/IndProvider",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "IndProvider",
  "objectXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/domains/IndProvider?expand=objectxml}",
  "url": "t3://localhost:7011",
  "usercode": "********",
  "userid": "mpiAdminNew"
}

Sample Response Code

200

3.7 GET /management/rulesets

This API is used to retrieve the list of rulesets.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/rulesets

Request Type

HTTP GET

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
expand all or rulexml View more details of the ruleset. The all or rulexml value displays the complete xml file of the ruleset.
totalResults true or false View total records count

Response Parameters

Parameter Description
items An array containing rulesets
ruleset For information on the ruleset attributes in response, see Section A.2.4, "Ruleset Response Structure".
totalResults Value is set to the total number of rulesets based on the status filter. The value is displayed if totalResults is set to true in the request parameter. Otherwise, the value is null.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/rulesets?totalResults=true

Sample Response Body

{
  "items": [
  {
    "createdBy": "rmAdmin",
    "createdDate": "01/08/2016",
    "description": "Relationship ruleset between Patient and IndProvider",
    "links": [
      {
        "href": "/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset",
        "mediaType": "application/json",
        "rel": "canonical"
      }
    ],
    "modifiedBy": "rmAdmin",
    "modifiedDate": "01/08/2016",
    "name": "CreateRelationshipRuleset",
    "rulesetId": 1,
    "ruleXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset?expand=ruleXml}",
    "source": "Patient",
    "status": "Active",
    "target": "IndProvider"
  }
  ],
    "links": [
      {
        "href": "/ohmpi-rm/1.0.0/management/rulesets",
        "mediaType": "application/json",
        "rel": "canonical"
      }
    ],
  "totalResults": 1
}

Sample Response Code

200

3.8 GET /management/rulesets/{ruleset}

This API is used to retrieve the details of an existing ruleset.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/rulesets/{ruleset}

Request Type

HTTP GET

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
ruleset Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Ruleset Name of the ruleset to be searched
expand all or rulexml View more details of the ruleset. The all or rulexml value displays the complete xml file of the ruleset.

Response Parameters

Parameter Description
domain For information on the ruleset attributes in response, see Section A.2.4, "Ruleset Response Structure".

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset

Sample Response Body

{
  "createdBy": "rmAdmin",
  "createdDate": "01/08/2016",
  "description": "Relationship ruleset between Patient and IndProvider",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "modifiedBy": "rmAdmin",
  "modifiedDate": "01/08/2016",
  "name": "CreateRelationshipRuleset",
  "rulesetId": 1,
  "ruleXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset?expand=ruleXml}",
  "source": "Patient",
  "status": "Active",
  "target": "IndProvider"
}

Sample Response Code

200

3.9 POST /management/rulesets/{ruleset}

This API is used to register a new ruleset.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/rulesets/{ruleset}

Request Content Type

application/json

Request Type

HTTP POST

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
ruleset Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Ruleset Name of the ruleset to be registered
rmRuleSetResource - Details of the ruleset to be registered. For details on the fields for the ruleset request body, see Section A.1.4, "RmRuleset Resource".

Response Parameters

Parameter Description
ruleset For information on the ruleset attributes in response, see Section A.2.4, "Ruleset Response Structure". To display all the attributes of the domain, use the GET /management/rulesets/{ruleset} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset

Sample Request Body

{
  "name": "CreateRelationshipRuleset",
  "description": "Relationship ruleset between Patient and IndProvider",
  "source": "Patient",
  "target": "IndProvider",
  "status": "Active"
}

Sample Response Body

{
  "createdBy": "rmAdmin",
  "createdDate": "01/08/2016",
  "description": "Relationship ruleset between Patient and IndProvider",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "modifiedBy": "rmAdmin",
  "modifiedDate": "01/08/2016",
  "name": "CreateRelationshipRuleset",
  "rulesetId": 1,
  "ruleXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset?expand=ruleXml}",
  "source": "Patient",
  "status": "Active",
  "target": "IndProvider"
}

Sample Response Code

200

3.10 PUT /management/rulesets/{ruleset}

This API is used to update an existing ruleset.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/rulesets/{ruleset}

Request Content Type

application/json

Request Type

HTTP PUT

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
ruleset Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Ruleset Name of the ruleset to be updated
rmRuleSetResource - Details of the ruleset to be updated. For details on the fields for the ruleset request body, see Section A.1.4, "RmRuleset Resource".

Response Parameters

Parameter Description
ruleset For information on the ruleset attributes in response, see Section A.2.4, "Ruleset Response Structure". To display all the attributes of the ruleset, use the GET /management/rulesets/{ruleset} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset

Sample Request Body

{
  "name": "CreateRelationshipRuleset",
  "description": "Relationship ruleset between OrgProvider and IndProvider",
  "source": "OrgProvider"
}

Sample Response Body

{
  "createdBy": "rmAdmin",
  "createdDate": "01/08/2016",
  "description": "Relationship ruleset between OrgProvider and IndProvider",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "modifiedBy": "rmAdmin",
  "modifiedDate": "01/08/2016",
  "name": "CreateRelationshipRuleset",
  "rulesetId": 1,
  "ruleXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset?expand=ruleXml}",
  "source": "OrgProvider ",
  "status": "Active",
  "target": "IndProvider"
}

Sample Response Code

200

3.11 PUT /management/rulesets/{ruleset}/files

This API is used to upload ruleset xml file.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/rulesets/{ruleset}/files

Request Content Type

multipart/form-data

Request Type

HTTP PUT

Response Content Type

application/json;charset=UTF-8

Request Parameters

Parameter Description
ruleset Ruleset Name of ruleset whose xml file needs to be uploaded
ruleSetFile The XML file to be uploaded
contentDisposition MIME content-disposition header which contains name of the uploaded file.

Response Parameters

Parameter Description
ruleset For information on the ruleset attributes in response, see Section A.2.4, "Ruleset Response Structure". To display all the attributes of the ruleset, use the GET /management/rulesets/{ruleset} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset/files

Sample Response Body

{
  "createdBy": "rmAdmin",
  "createdDate": "01/08/2016",
  "description": "Relationship ruleset between Patient and IndProvider",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "modifiedBy": "rmAdmin",
  "modifiedDate": "01/08/2016",
  "name": "CreateRelationshipRuleset",
  "rulesetId": 1,
  "ruleXml": "{canonicalLink: /ohmpi-rm/1.0.0/management/rulesets/CreateRelationshipRuleset?expand=ruleXml}",
  "source": "Patient",
  "status": "Active",
  "target": "IndProvider"
}

Sample Response Code

200

3.12 GET /management/tasks

This API is used to retrieve the list of tasks.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/tasks

Request Type

HTTP GET

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
expand all or script View more details of the task. The all or script value displays the complete groovy script file of the task.
totalResults true or false View total records count

Response Parameters

Parameter Description
items An array containing tasks
task For information on the task attributes in response, see Section A.2.5, "Task Response Structure".
totalResults Value is set to the total number of tasks based on the status filter. The value is displayed if totalResults is set to true in the request parameter. Otherwise, the value is null.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/tasks?totalResults=true

Sample Response Body

{
  "items": [
  {
  {
    "description": "Task to create relationship",
    "links": [
      {
        "href": "/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask",
        "mediaType": "application/json",
        "rel": "canonical"
      }
    ],
    "name": "CreateRelationshipTask ",
    "script": "{canonicalLink: /ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask?expand=script}",
    "status": "Active",
    "taskId": 1
  }
  ],
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/tasks",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "totalResults": 1
}

Sample Response Code

200

3.13 GET /management/tasks/{task}

This API is used to retrieve the details of an existing task.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/tasks/{task}

Request Type

HTTP GET

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
task Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Task Name of the task to be searched
expand all or script View more details of the task. The all or script value displays the complete groovy script file of the task.

Response Parameters

Parameter Description
task For information on the task attributes in response, see Section A.2.5, "Task Response Structure".

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask

Sample Response Body

{
  "description": "Task to create relationship",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "CreateRelationshipTask ",
  "script": "{canonicalLink: /ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask?expand=script}",
  "status": "Active",
  "taskId": 1
}

Sample Response Code

200

3.14 POST /management/tasks/{task}

This API is used to register a new task.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/tasks/{task}

Request Content Type

application/json

Request Type

HTTP POST

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
task Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Task Name of the task to be registered
rmTaskResource - Details of the task to be registered. For details on the fields for the task request body, see Section A.1.5, "RmTask Resource".

Response Parameters

Parameter Description
task For information on the task attributes in response, see Section A.2.5, "Task Response Structure". To display all the attributes of the task, use the GET /management/tasks/{task} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/tasks/CreateRelationship

Sample Request Body

{
  "name": "CreateRelationshipTask",
  "description": "Task to create relationship",
  "status": "Active"
}

Sample Response Body

{
  "description": "Task to create relationship",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "CreateRelationshipTask ",
  "script": "{canonicalLink: /ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask?expand=script}",
  "status": "Active",
  "taskId": 1
}

Sample Response Code

200

3.15 PUT /management/tasks/{task}

This API is used to update an existing task.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/tasks/{task}

Request Content Type

application/json

Request Type

HTTP PUT

Response Content Type

application/json;charset=UTF-8

Request Query Parameters

Parameter Value Description
task Matching the regex [a-zA-Z][a-zA-Z_0-9]+ Task Name of the task to be updated
rmTaskResource - Details of the task to be updated. For details on the fields for the task request body, see Section A.1.5, "RmTask Resource".

Response Parameters

Parameter Description
task For information on the task attributes in response, see Section A.2.5, "Task Response Structure". To display all the attributes of the task, use the GET /management/tasks/{task} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask

Sample Request Body

{
  "name": "CreateRelationshipTask",
  "description": "Task to create relationship in RM Database"
}

Sample Response Body

{
  "description": "Task to create relationship in RM Database ",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "CreateRelationshipTask ",
  "script": "{canonicalLink: /ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask?expand=script}",
  "status": "Active",
  "taskId": 1
}

Sample Response Code

200

3.16 PUT /management/tasks/{task}/files

This API is used to upload script file for a task.

Request URI

http(s)://<server>:<port>/ohmpi-rm/1.0.0/management/tasks/{task}/files

Request Content Type

multipart/form-data

Request Type

HTTP PUT

Response Content Type

application/json;charset=UTF-8

Request Parameters

Parameter Description
task Task Name of task whose groovy script file needs to be uploaded
rmTaskFile Groovy script file to be uploaded
contentDisposition MIME content-disposition header which contains name of the uploaded file.

Response Parameters

Parameter Description
task For information on the task attributes in response, see Section A.2.5, "Task Response Structure". To display all the attributes of the task, use the GET /management/tasks/{task} API with expand=all.

Response Status Code

Status Code Description
200 Success
404 Incorrect URI
400 Invalid argument/Resource Not Exists
500 Error while processing

Sample Request URI

http://localhost:7001/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask/files

Sample Response Body

{
  "description": "Task to create relationship",
  "links": [
    {
      "href": "/ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask",
      "mediaType": "application/json",
      "rel": "canonical"
    }
  ],
  "name": "CreateRelationshipTask ",
  "script": "{canonicalLink: /ohmpi-rm/1.0.0/management/tasks/CreateRelationshipTask?expand=script}",
  "status": "Active",
  "taskId": 1
}

Sample Response Code

200