-
Notifications
You must be signed in to change notification settings - Fork 6
Search for resources (v1)
Ryan Newington edited this page Jan 11, 2017
·
3 revisions
Used to perform a search against the FIM service for various resources
New implementations should use the v2 API call
Method | URL |
---|---|
GET | /v1/resources |
GET | /v1/resources/?objectType={objectType} |
GET | /v1/resources/?objectType={objectType}&locale={locale} |
GET | /v1/resources/?objectType={objectType}&attributes={attributes} |
GET | /v1/resources/?objectType={objectType}&attributes={attributes}&locale={locale} |
GET | /v1/resources/?filter={filter} |
GET | /v1/resources/?filter={filter}&locale={locale} |
GET | /v1/resources/?filter={filter}&attributes={attributes} |
GET | /v1/resources/?filter={filter}&attributes={attributes}&locale={locale} |
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. |
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 array of JSON-formatted resources and their attribute/value pairs
This example gets all resources of the EmailTemplate type
GET /v1/resources/?objectType=EmailTemplate
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"
}
]
This example gets all resources of the ObjectTypeDescription type in Italian
GET /v1/resources/?objectType=ObjectTypeDescription&locale=it-IT
HTTP/1.1 200 OK
[{
"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"
}, {
"ObjectType": "ObjectTypeDescription",
"ObjectID": "81d41a1e-567c-4146-bf17-2a83a97f2972",
"CreatedTime": "2015-05-26T19:22:43.483",
"Description": "Risposta a un'approvazione.",
"DisplayName": "Risposta di approvazione",
"Name": "ApprovalResponse",
"UsageKeyword": "Microsoft.ResourceManagement.WebServices"
}]
This example gets all resources of the EmailTemplate type, returning only the DisplayName attribute
GET /v1/resources/?objectType=EmailTemplate&attributes=DisplayName
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"
}
]
This example gets all resources that match the Xpath query /ManagementPolicyRule[ManagementPolicyRuleType='Request']
GET /v1/resources/?filter=/ManagementPolicyRule%5BManagementPolicyRuleType%3D%27Request%27%5D
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"
}
]