This project has moved. For the latest updates, please go here.

Search for resources

Used to perform a search against the FIM service for various resources

Request

Method URL
GET v1/resources
GET /v1/resources/?objectType={objectType}
GET /v1/resources/?objectType={objectType}&attributes={attributes}
GET /v1/resources/?filter={filter}
GET /v1/resources/?filter={filter}&attributes={attributes}

URL Parameters

This method does not have any URL parameters

Query Parameters

Parameter name Description
{objectType} Returns all objects of the specified type
{filter} A URL-encoded Xpath filter with which to query the FIM service database
{attributes} A comma-separated list of attribute names to return on the matching objects

Request Body

This request type does not require a request body

Response

Response Codes

See the topic on error handling for the response codes that this API call can return.

Response Body

This method will return an array of JSON-formatted resources and their attribute/value pairs

Examples

Get all resources

This example gets all resources of the EmailTemplate type

Request

GET /v1/resources/?objectType=EmailTemplate

Response

HTTP/1.1 200 OK

[
    {
        "ObjectType": "EmailTemplate",
        "ObjectID": "569aacf0-4899-4deb-8634-2d7df5058911",
        "CreatedTime": "2015-08-19T21:50:25.807",
        "Creator": "a2012ee3-33e4-4363-93bb-1e16c62e5694",
        "Description": "An email template created for the purpose of this demo",
        "DisplayName": "___Demo Email Template",
        "EmailBody": "<HTML>\r\n   <HEAD>\r\n      \r\n   </HEAD>\r\n<BODY>\r\n   <H1>FIM User group demo</H1>\r\n   <P>This is an example email template</P> \r\n</BODY>\r\n</HTML>",
        "EmailSubject": "Hello FIM user group",
        "EmailTemplateType": "Notification"
    },
       {
        "ObjectType": "EmailTemplate",
        "ObjectID": "727756dc-92b3-4861-8cab-4ab81ca28a3d",
        "CreatedTime": "2015-05-26T19:22:43.483",
        "DisplayName": "Default expiration notification email template",
        "EmailBody": "The [//Target/ObjectType], [//Target/DisplayName], is due to expire on [//Target/ExpirationTime].  If you do not wish the [//Target/ObjectType] to be deleted, then you should extend its expiration date.",
        "EmailSubject": "[//Target/ObjectType] Expiration",
        "EmailTemplateType": "Notification"
    },
    {
        "ObjectType": "EmailTemplate",
        "ObjectID": "0d2886d1-8c79-416e-9a50-b170145b18bf",
        "CreatedTime": "2015-05-26T09:26:25.860",
        "Creator": "e05d1f1b-3d5e-4014-baa6-94dee7d68c89",
        "DisplayName": "Default one-time password notification email template",
        "EmailBody": "Your security code is: [ONE_TIME_PASSWORD]\r\nEnter this code to reset your password.  If you did not request to reset your password, please contact your help desk or system administrator.",
        "EmailSubject": "Here is the security code to reset your password",
        "EmailTemplateType": "Notification"
        }
  ]

Get selected attributes of all resources

This example gets all resources of the EmailTemplate type, returning only the DisplayName attribute

Request

GET /v1/resources/?objectType=EmailTemplate&attributes=DisplayName

Response

HTTP/1.1 200 OK

[
    {
        "ObjectType": "EmailTemplate",
        "ObjectID": "569aacf0-4899-4deb-8634-2d7df5058911",
        "DisplayName": "___Demo Email Template"
    },
    {
        "ObjectType": "EmailTemplate",
        "ObjectID": "17da025f-496f-4be6-bcce-34e2bccffbed",
        "DisplayName": "Default completed approval email template"
    },
    {
        "ObjectType": "EmailTemplate",
        "ObjectID": "727756dc-92b3-4861-8cab-4ab81ca28a3d",
        "DisplayName": "Default expiration notification email template"
    }
]

Perform an Xpath query

This example gets all resources that match the Xpath query /ManagementPolicyRuleManagementPolicyRuleType='Request'

Request

GET /v1/resources/?filter=/ManagementPolicyRule%5BManagementPolicyRuleType%3D%27Request%27%5D

Response

HTTP/1.1 200 OK

[
    {
        "ObjectType": "ManagementPolicyRule",
        "ObjectID": "cbc83733-5370-4b9f-a34a-53b361d4a6ae",
        "Disabled": "False",
        "GrantRight": "True",
        "CreatedTime": "2015-07-07T01:53:37.570",
        "Creator": "7fb2b853-24f0-4498-9534-4e10589723c4",
        "PrincipalSet": "10000005-1111-45b5-ad13-2764d866c000",
        "ResourceCurrentSet": "31165125-9091-493d-be4b-90b516d473d4",
        "ResourceFinalSet": "31165125-9091-493d-be4b-90b516d473d4",
        "ActionParameter": "*",
        "ActionType": [
            "Add",
            "Create",
            "Delete",
            "Modify",
            "Read",
            "Remove"
        ],
        "DisplayName": "__Temp: Admins can create gate resources",
        "ManagementPolicyRuleType": "Request"
    },
    {
        "ObjectType": "ManagementPolicyRule",
        "ObjectID": "834fb270-5642-4da2-a374-c559feba8909",
        "Disabled": "False",
        "GrantRight": "True",
        "CreatedTime": "2015-07-22T01:39:14.813",
        "Creator": "a2012ee3-33e4-4363-93bb-1e16c62e5694",
        "PrincipalSet": "10000005-1111-45b5-ad13-2764d866c000",
        "ResourceCurrentSet": "5421d628-1429-44ad-84a4-a511ca0bc0d5",
        "ResourceFinalSet": "5421d628-1429-44ad-84a4-a511ca0bc0d5",
        "ActionParameter": "*",
        "ActionType": [
            "Add",
            "Create",
            "Delete",
            "Modify",
            "Read",
            "Remove"
        ],
        "DisplayName": "__Unit Testing: Administrators can control unit test objects",
        "ManagementPolicyRuleType": "Request"
    },
    {
        "ObjectType": "ManagementPolicyRule",
        "ObjectID": "9bab97de-c183-4c2d-8a4c-0b8a7ea57fce",
        "Disabled": "False",
        "GrantRight": "True",
        "CreatedTime": "2015-05-26T22:02:54.923",
        "Creator": "7fb2b853-24f0-4498-9534-4e10589723c4",
        "PrincipalSet": "10000005-1111-45b5-ad13-2764d866c000",
        "ResourceCurrentSet": "5d73e291-9c88-4126-9b13-c910e54c5328",
        "ResourceFinalSet": "5d73e291-9c88-4126-9b13-c910e54c5328",
        "ActionParameter": "*",
        "ActionType": [
            "Add",
            "Create",
            "Delete",
            "Modify",
            "Read",
            "Remove"
        ],
        "Description": "Allows administrators to read, create, modify, remove and delete Activity Configuration resources",
        "DisplayName": "_Administration: Administrators control Activity Information Configuration resources",
        "ManagementPolicyRuleType": "Request"
    }
]

Last edited Aug 24, 2015 at 4:55 AM by ryannewington, version 2