-
Notifications
You must be signed in to change notification settings - Fork 6
Search for resources (v2)
Used to perform a search against the FIM service for various resources
Method | URL |
---|---|
GET | /v2/resources |
GET | /v2/resources/?objectType={objectType} |
GET | /v2/resources/?objectType={objectType}&locale={locale} |
GET | /v2/resources/?objectType={objectType}&attributes={attributes} |
GET | /v2/resources/?objectType={objectType}&attributes={attributes}&locale={locale} |
GET | /v2/resources/?filter={objectType}&pageSize={pageSize} |
GET | /v2/resources/?filter={filter} |
GET | /v2/resources/?filter={filter}&locale={locale} |
GET | /v2/resources/?filter={filter}&attributes={attributes} |
GET | /v2/resources/?filter={filter}&attributes={attributes}&locale={locale} |
GET | /v2/resources/?filter={filter}&pageSize={pageSize} |
This method does not have any URL 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 |
{locale} | Specifies the language code of the culture to localize the representation of the resource in. This requires the appropriate language packs to be installed on the FIM/MIM Service. e.g en-US, de-de, ja-jp, es-es, it-it. |
{pageSize} | Optional. Specifies the number of results to return per page. The default is 100 |
This API call also supports the advanced resource rendering options
This request type does not require a request body
See the topic on error handling for the response codes that this API call can return.
This method will return an page of results, including links to follow to get the subsequent or previous pages of results (if available).
Applications must use the link provided in the NextPage
field to get the next page of results. when the NextPage
field is null, or HasMoreItems
is false, the end of the result set has been reached.
This example gets all resources of the EmailTemplate type
GET /v2/resources/?objectType=EmailTemplate
HTTP/1.1 200 OK
{
"HasMoreItems": true,
"NextPage": "http://localhost:63207/v2/resources/?token=d22fcd64-3db2-405b-91bb-07f7fbb09d91&pageSize=10&index=10",
"PreviousPage": null,
"Results": [{
"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"
}],
"TotalCount": 27
}
This example gets all resources of the ObjectTypeDescription type in Italian
GET /v2/resources/?objectType=ObjectTypeDescription&locale=it-IT
HTTP/1.1 200 OK
{
"HasMoreItems": true,
"NextPage": "http://localhost:63207/v2/resources/?token=29ca6313-2652-402e-84b5-cc0eb3d9683c&pageSize=3&index=3",
"PreviousPage": null,
"Results": [
{
"ObjectType": "ObjectTypeDescription",
"ObjectID": "38cc7e06-2530-4a77-8bb3-d8a9e1061a94",
"CreatedTime": "2015-07-22T00:00:43.830",
"DisplayName": "_unitTestObject",
"Name": "_unitTestObject"
},
{
"ObjectType": "ObjectTypeDescription",
"ObjectID": "e1a42ced-6968-457c-b5c8-3f9a573295a6",
"CreatedTime": "2015-05-26T19:22:43.483",
"Description": "Risorsa che stabilisce l'aspetto di un'attività nel portale di FIM.",
"DisplayName": "Configurazione informazioni sulle attività",
"Name": "ActivityInformationConfiguration",
"UsageKeyword": "Microsoft.ResourceManagement.WebServices"
},
{
"ObjectType": "ObjectTypeDescription",
"ObjectID": "c51c9ef3-2de0-4d4e-b30b-c1a18e79c56e",
"CreatedTime": "2015-05-26T19:22:43.483",
"DisplayName": "Approvazione",
"Name": "Approval",
"UsageKeyword": "Microsoft.ResourceManagement.WebServices"
}
],
"TotalCount": 47
}
This example gets all resources of the EmailTemplate type, returning only the DisplayName attribute
GET /v2/resources/?objectType=EmailTemplate&attributes=DisplayName
HTTP/1.1 200 OK
{
"HasMoreItems": true,
"NextPage": "http://localhost:63207/v2/resources/?token=b1c1855c-a1d2-428d-b41e-d670c1d52f5c&pageSize=3&index=3",
"PreviousPage": null,
"Results": [
{
"ObjectType": "EmailTemplate",
"ObjectID": "569aacf0-4899-4deb-8634-2d7df5058911",
"DisplayName": "___Demo Email Template"
},
{
"ObjectType": "EmailTemplate",
"ObjectID": "b9fc1f26-0357-4c47-8c6b-3e8f5a11d26a",
"DisplayName": "_Account activation email to account owner"
},
{
"ObjectType": "EmailTemplate",
"ObjectID": "076a910f-98b3-49fa-b39a-a54f640313c8",
"DisplayName": "_Account creation notification to administrative department"
}
],
"TotalCount": 27
}
This example gets all resources that match the Xpath query /ManagementPolicyRule[ManagementPolicyRuleType='Request']
GET /v2/resources/?filter=/ManagementPolicyRule%5BManagementPolicyRuleType%3D%27Request%27%5D
HTTP/1.1 200 OK
{
"HasMoreItems": true,
"NextPage": "http://localhost:63207/v2/resources/?token=cb89a1f5-0d3d-420d-993b-0ebfc54cf6c0&pageSize=3&index=3",
"PreviousPage": null,
"Results": [
{
"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": "8483af32-a131-4b04-9947-c7e74e74d158",
"Disabled": false,
"GrantRight": true,
"CreatedTime": "2015-09-17T04:00:12.593",
"PrincipalSet": "8887df8e-6e84-49f2-a794-f9e9802077e0",
"ResourceCurrentSet": "aae6e21f-b1a1-4278-8e8a-0439b4e12241",
"ResourceFinalSet": "aae6e21f-b1a1-4278-8e8a-0439b4e12241",
"ActionParameter": "*",
"ActionType": [
"Add",
"Create",
"Modify",
"Remove"
],
"DisplayName": "__test groups 1",
"ManagementPolicyRuleType": "Request"
},
{
"ObjectType": "ManagementPolicyRule",
"ObjectID": "834fb270-5642-4da2-a374-c559feba8909",
"Disabled": false,
"GrantRight": true,
"CreatedTime": "2015-07-22T01:39:14.813",
"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"
}
],
"TotalCount": 116
}