REST API |
/api/action
DELETE |
/api/action/{id} | Deletes and stops the specified action. |
Request: URL is all that is required. Using my RESTAPI.cs file in c#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/action/51", "username", "password");
|
|
|
Permalink: https://bigfix.me/restapi/?id=262
|
3/20/2013 3:34:14 PM
|
GET |
/api/action/{id} | Fetch the BES XML representation of the specified action. |
Request: URL is all that is required. Response:
<?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <SingleAction> <Title>Updated Windows Relay - IBM Endpoint Manager version 9.0.586.0 Now Available!</Title> <Relevance><![CDATA["|7950711|" contains "|" & computer id as string & "|"]]></Relevance> <ActionScript MIMEType="application/x-Fixlet-Windows-Shell"><![CDATA[prefetch BESRelayUpgrade.exe sha1:6102c4871f470fe57325b2f9514ac94cca0a2f6a size:7678744 http://software.bigfix.com/download/bes/90/BigFix-BES-Relay-9.0.586.0.exe delete __Local\Get\BESRelayUpgrade.exe delete __Local\Get\BESClientUpgrade.exe // If the next line fails, there is not enough free space to complete this action continue if {10360960 < free space of drive of client folder of current site} move __Download\BESRelayUpgrade.exe __Local\Get\BESRelayUpgrade.exe parameter "RunningRelay"="{exists running service "BESRelay"}" wait __Local\Get\BESRelayUpgrade.exe /s /v"/l*voicewarmup \"{if exists (location of regapp "BESRelay.exe") then location of regapp "BESRelay.exe" else location of client}\besrelayupgrade.log\" RESTARTBESCLIENT=0 REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable /qn" delete __Local\Get\BESRelayUpgrade.exe if {"True" = parameter "RunningRelay"} parameter "startTime" = "{apparent registration server time}" pause while {(apparent registration server time - time(parameter "startTime")) < (30 * second)} relay select // Fails here if a previously running relay did not start up continue if {exists running service "BESRelay"} endif continue if {((it = "9.0.586.0") of (if (version of client >= "8.0") then version of relay service else version of file ((if (character 0 of it = "%22") then (substring between "%22" of it) else it) of image path of relay service)))} if {version of client < "9.0.586.0"} if {5 = major version of operating system} parameter "BlackList"="{if(exists setting "_BESClient_Inspector_Blacklist" whose(exist value of it)of client) then value of setting "_BESClient_Inspector_Blacklist" of client else ""}" setting "_BESClient_Inspector_Blacklist"="{"socket of <network>;" & parameter "BlackList"}" on "{parameter "action issue date" of action}" for client endif prefetch BESClientUpgrade.exe sha1:d0b44516479d6546202deb9bb86339227f343d31 size:10360960 http://software.bigfix.com/download/bes/90/BigFix-BES-Client-9.0.586.0.exe move __Download\BESClientUpgrade.exe __Local\Get\BESClientUpgrade.exe // The following line may show as Failed if the command executes a restart of the client - This is normal behaviour on success wait __Local\Get\BESClientUpgrade.exe /s /v"/l*voicewarmup \"{location of client}\besclientupgrade.log\" REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable /qn" endif]]></ActionScript> <SuccessCriteria Option="CustomRelevance"><![CDATA[(not exists relay service) OR ((it < "9.0.586.0") of (if (version of client >= "8.0") then version of relay service else version of file ((if (character 0 of it = "%22") then (substring between "%22" of it) else it) of image path of relay service))) OR (version of client < "9.0.586.0")]]></SuccessCriteria> <Settings> <PreActionShowUI>false</PreActionShowUI> <HasRunningMessage>false</HasRunningMessage> <HasTimeRange>false</HasTimeRange> <HasStartTime>false</HasStartTime> <HasEndTime>true</HasEndTime> <EndDateTimeLocalOffset>P2D</EndDateTimeLocalOffset> <HasDayOfWeekConstraint>false</HasDayOfWeekConstraint> <UseUTCTime>false</UseUTCTime> <ActiveUserRequirement>NoRequirement</ActiveUserRequirement> <ActiveUserType>AllUsers</ActiveUserType> <HasWhose>false</HasWhose> <PreActionCacheDownload>false</PreActionCacheDownload> <Reapply>false</Reapply> <HasReapplyLimit>true</HasReapplyLimit> <ReapplyLimit>3</ReapplyLimit> <HasReapplyInterval>false</HasReapplyInterval> <HasRetry>false</HasRetry> <HasTemporalDistribution>false</HasTemporalDistribution> <ContinueOnErrors>true</ContinueOnErrors> <PostActionBehavior Behavior="Nothing"></PostActionBehavior> <IsOffer>false</IsOffer> </Settings> <SettingsLocks> <ActionUITitle>false</ActionUITitle> <PreActionShowUI>false</PreActionShowUI> <PreAction> <Text>false</Text> <AskToSaveWork>false</AskToSaveWork> <ShowActionButton>false</ShowActionButton> <ShowCancelButton>false</ShowCancelButton> <DeadlineBehavior>false</DeadlineBehavior> <ShowConfirmation>false</ShowConfirmation> </PreAction> <HasRunningMessage>false</HasRunningMessage> <RunningMessage> <Text>false</Text> </RunningMessage> <TimeRange>false</TimeRange> <StartDateTimeOffset>false</StartDateTimeOffset> <EndDateTimeOffset>false</EndDateTimeOffset> <DayOfWeekConstraint>false</DayOfWeekConstraint> <ActiveUserRequirement>false</ActiveUserRequirement> <ActiveUserType>false</ActiveUserType> <Whose>false</Whose> <PreActionCacheDownload>false</PreActionCacheDownload> <Reapply>false</Reapply> <ReapplyLimit>false</ReapplyLimit> <RetryCount>false</RetryCount> <RetryWait>false</RetryWait> <TemporalDistribution>false</TemporalDistribution> <ContinueOnErrors>false</ContinueOnErrors> <PostActionBehavior> <Behavior>false</Behavior> <AllowCancel>false</AllowCancel> <Deadline>false</Deadline> <Title>false</Title> <Text>false</Text> </PostActionBehavior> <IsOffer>false</IsOffer> <AnnounceOffer>false</AnnounceOffer> <OfferCategory>false</OfferCategory> <OfferDescriptionHTML>false</OfferDescriptionHTML> </SettingsLocks> <IsUrgent>false</IsUrgent> <Target> <ComputerID>7950711</ComputerID> </Target> </SingleAction> </BES> Schema: BES.XSD Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/action/44", "username", "password"); rr.bes contains the BES object you requested. rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=271
|
3/20/2013 4:38:05 PM
|
GET |
/api/action/{id}/status | Get the status of an action against it's targets. |
Request: URL is all that is required. Response: Example: https://lab.bigfix.me:52311/api/action/44/status <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ActionResults Resource="http://lab.bigfix.me:52311/api/action/44/status"> <ActionID>44</ActionID> <Status>Open</Status> </ActionResults> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/action/44/status", "username", "password"); rr.bes null rr.besapi contains the BESAPI object you requested. rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=272
|
3/20/2013 4:38:51 PM
|
POST |
/api/action/{id}/stop | This will stop the specified action. |
Request: URL is all that is required. POSTing with 0 byte data is sufficient to stop the specified action. Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C# you can do the following: RESTResult rr = RESTAPI.postREST("https://lab.bigfix.me:52311/api/action/51/stop", "username", "password", null);
|
|
|
Permalink: https://bigfix.me/restapi/?id=260
|
3/20/2013 3:32:47 PM
|
/api/actions
GET |
/api/actions | Return a list of actions. |
Response: URL is all that is required Example: https://lab.bigfix.me:52311/api/actions <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Action Resource="http://lab.bigfix.me:52311/api/action/44" LastModified="Tue, 19 Mar 2013 21:23:10 +0000"> <Name>Updated Windows Relay - IBM Endpoint Manager version 9.0.586.0 Now Available!</Name> <ID>44</ID> </Action> <Action Resource="http://lab.bigfix.me:52311/api/action/45" LastModified="Tue, 19 Mar 2013 21:23:57 +0000"> <Name>POLICY: Updated Windows Client - IBM Endpoint Manager version 9.0.586.0 Now Available!</Name> <ID>45</ID> </Action> </BESAPI> Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/actions", "username", "password"); rr.bes null rr.besapi contains the BESAPI object you requested. rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=274
|
3/20/2013 4:48:02 PM
|
POST |
/api/actions | BES XML for the action. |
Creates a new action. Example: File below was POSTed to https://lab.bigfix.me:52311/api/actions <?xml version="1.0" encoding="utf-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SkipUI="true"> <SingleAction> <Title>test action</Title> <Relevance>true</Relevance> <ActionScript>setting "test action"="{now as string}" on "{now}" for client</ActionScript> <SuccessCriteria /> <Settings /> <SettingsLocks /> <Target> <AllComputers>true</AllComputers> </Target> </SingleAction> </BES> Using my RESTAPI.cs in a C# application, you can use the following code to start a SingleAction: //Create SingleAction Object
SingleAction a = new SingleAction(); a.Title = "test action"; a.ActionScript = new ActionScript(); a.ActionScript.Value = "//put actionscript here"; a.ActionScript.MIMEType = "application/x-Fixlet-Windows-Shell"; //BES Action Script a.Relevance = new RelevanceString(); a.Relevance.Value = "true"; a.Target = new BESActionTarget(); a.Target.Items = new object[] { true }; a.Target.ItemsElementName = new ItemsChoiceType[]{ ItemsChoiceType.AllComputers }; //Create BES Object and add above objects BES bes = new BES(); bes.Items = new object[]{ a }; bes.ItemsElementName = new ItemsChoiceType2[]{ ItemsChoiceType2.SingleAction }; bes.SkipUI = true; bes.SkipUISpecified = true; RESTResult rr = RESTAPI.postREST("https://lab.bigfix.me:52311/api/actions", "username", "password", bes); |
|
|
Permalink: https://bigfix.me/restapi/?id=261
|
3/20/2013 3:33:04 PM
|
/api/admin
DELETE |
/api/admin/field/{field} | Deletes the specified admin field. |
Deletes the specified admin field. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/admin/field/usePre70ClientCompatibleMIME", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=321
|
3/21/2013 12:33:23 PM
|
GET |
/api/admin/field/{field} | Fetch specific admin field value. |
Response: XML results Example: https://lab.bigfix.me:52311/api/admin/field/usePre70ClientCompatibleMIME <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <AdminField Resource="http://lab.bigfix.me:52311/api/admin/field/usePre70ClientCompatibleMIME"> <Name>usePre70ClientCompatibleMIME</Name> <Value>false</Value> </AdminField> </BESAPI> Request: /api/admin/field/usePre70ClientCompatibleMIME Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/admin/field/usePre70ClientCompatibleMIME", "username", "password"); rr.bes null rr.besapi contains the BESAPI object you requested. rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=270
|
3/20/2013 4:37:23 PM
|
POST |
/api/admin/field/{field} | Set a specific admin field. |
Response: Details of the admin field after update. Response Shema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=21
|
3/19/2013 10:35:27 AM
|
PUT |
/api/admin/field/{field} | Set a specific admin field. |
Request: Send BESAPI xml with the admin field value. Response: Details of the admin field after update. Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=19
|
3/19/2013 10:35:01 AM
|
GET |
/api/admin/fields | Returns list of admin fields. |
Response: XML results Example: https://lab.bigfix.me:52311/api/admin/fields <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <AdminField Resource="http://lab.bigfix.me:52311/api/admin/field/usePre70ClientCompatibleMIME"> <Name>usePre70ClientCompatibleMIME</Name> <Value>false</Value> </AdminField> </BESAPI> Request: /api/admin/fields Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/admin/fields", "username", "password"); rr.bes would be null rr.besapi would contain the besapi result object rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=269
|
3/20/2013 3:49:07 PM
|
POST |
/api/admin/fields | Set one or more admin fields. |
Request: One or more admin fields in a BESAPI XML document. Response: Details of all admin fields after update. Response Shema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=22
|
3/19/2013 9:44:36 AM
|
DELETE |
/api/admin/icon | Deletes current client icon. |
Deletes current client icon. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/admin/icon", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=322
|
3/21/2013 12:35:27 PM
|
GET |
/api/admin/icon | Exports the current client icon. |
Response: Icon file. Content-type: image/bmp |
|
|
Permalink: https://bigfix.me/restapi/?id=12
|
3/19/2013 10:37:15 AM
|
POST |
/api/admin/icon | Updates/sets client icon. |
Request: Icon in post body. Response: HTTP 200 on success. |
|
|
Permalink: https://bigfix.me/restapi/?id=23
|
3/19/2013 10:37:33 AM
|
PUT |
/api/admin/icon |
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=20
|
3/19/2013 12:02:09 AM
|
GET |
/api/admin/masthead | Exports the current masthead. |
Response: Masthead file. Example: https://lab.bigfix.me:52311/api/admin/masthead This is the same as http://lab.bigfix.me:52311/masthead/masthead.afxm Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/admin/masthead", "username", "password"); rr.bes null rr.besapi null rr.result contains the masthead file as a string rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=275
|
3/20/2013 4:51:35 PM
|
POST |
/api/admin/masthead | Updates masthead in the database. |
Request: Masthead file in body of post. Response: HTTP 200 on success. Notes: If FIPS setting is changed, the server will need to be restarted. |
|
|
Permalink: https://bigfix.me/restapi/?id=24
|
3/19/2013 10:36:34 AM
|
GET |
/api/admin/masthead/parameters | Returns configured parameters from the masthead. |
Request: URL is all that is required Response: BESAPI MastheadParameters. Example: https://lab.bigfix.me:52311/api/admin/masthead/parameters <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <MastheadParameters Resource="http://lab.bigfix.me:52311/api/admin/masthead/parameters"> <PortNumber>52311</PortNumber> <GatherInterval>Half Day</GatherInterval> <Controller>console</Controller> <InitialLockState>Unlocked</InitialLockState> <RequireFIPSCompliantCrypto>false</RequireFIPSCompliantCrypto> </MastheadParameters> </BESAPI> Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/admin/masthead/parameters", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=279
|
3/20/2013 5:15:54 PM
|
GET |
/api/admin/options | Displays the current admin options for the server. |
Request: URL Only Response: HTTP 200, BESAPI XML of admin options. Example: https://lab.bigfix.me:52311/api/admin/options <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <SystemOptions Resource="http://lab.bigfix.me:52311/api/admin/options"> <MinimumRefreshSeconds>15</MinimumRefreshSeconds> <DefaultFixletVisibility>Visible</DefaultFixletVisibility> </SystemOptions> </BESAPI> Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/admin/options", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=278
|
3/20/2013 5:15:25 PM
|
POST |
/api/admin/options | Updates the admin options from the provided BES XML. |
Request: BESAPI representation of 1 or more admin options. Response: HTTP 200 on success. |
|
|
Permalink: https://bigfix.me/restapi/?id=25
|
3/19/2013 10:41:02 AM
|
POST |
/api/admin/propagate/actionsite | Propagates the master action site. |
Request: URL Only. Response: HTTP 200 on success. |
|
|
Permalink: https://bigfix.me/restapi/?id=26
|
3/19/2013 10:39:43 AM
|
POST |
/api/admin/propagate/operator/* | Propagates the specified operator site. |
Request: URL Only. If you specify "operators" as the operator name it will propagate all operator sites. Response: HTTP 200 on success. |
|
|
Permalink: https://bigfix.me/restapi/?id=27
|
3/19/2013 10:38:31 AM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=28
|
3/19/2013 12:02:09 AM
|
GET |
/api/admin/reports | Returns Client Reports settings. |
Request: URL is all that is required Response: Example: https://lab.bigfix.me:52311/api/admin/reports <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ClientReports Resource="http://lab.bigfix.me:52311/api/admin/reports"> <EncryptionStatus>Disabled</EncryptionStatus> <Details>Report encryption is currently DISABLED.</Details> </ClientReports> </BESAPI> Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/admin/reports", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=280
|
3/20/2013 5:16:25 PM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=17
|
3/19/2013 12:02:09 AM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=18
|
3/19/2013 12:02:09 AM
|
POST |
/api/admin/resetepoch | Resets the database epoch forcing Console's to refresh their cache. |
Request: URL Only. Response: HTTP 200 on success. |
|
|
Permalink: https://bigfix.me/restapi/?id=29
|
3/19/2013 10:40:12 AM
|
/api/analyses
GET |
/api/analyses/{site} | Fetch a list of analyses in the specified site. |
Request: URL is all that is required Example:
Example: https://lab.bigfix.me:52311/api/analyses/master <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Analysis Resource="http://lab.bigfix.me:52311/api/analysis/master/40" LastModified="Tue, 19 Mar 2013 20:41:59 +0000"> <Name>Custom Analysis</Name> <ID>40</ID> </Analysis> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/analyses/master", "username", "password"); rr.bes null rr.besapi contains the BESAPI object you requested. rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=348
|
4/16/2013 1:56:25 PM
|
POST |
/api/analyses/{site} | Create an analysis in the specified site. |
Request: Complete XML for the objects in the body of the request. Response Schema: BES.xsd Request Schema: BESAPI.xsd NOTE: I'm tracking a bug which activates all new imports regardless of if it is set to NOT activate. Ok, more Info... you HAVE to specify the following: analysis.AutoActivate = false;
analysis.AutoActivateSpecified = true; |
|
|
Permalink: https://bigfix.me/restapi/?id=346
|
4/16/2013 11:42:14 AM
|
/api/analysis
DELETE |
/api/analysis/{site}/{id} | Delete and deactivate an analysis. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/analysis/master/40", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=323
|
3/21/2013 12:36:02 PM
|
GET |
/api/analysis/{site}/{id} | Get the XML for a specific analysis |
Request: URL is all that is required. Response: BES XML of Object Example: https://lab.bigfix.me:52311/api/analysis/master/40 <?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <Analysis> <Title>Custom Analysis</Title> <Description><![CDATA[<enter a description of the analysis here> ]]></Description> <Relevance>true</Relevance> <Source>Internal</Source> <SourceReleaseDate>2013-03-19</SourceReleaseDate> <MIMEField> <Name>x-fixlet-modification-time</Name> <Value>Tue, 19 Mar 2013 20:41:59 +0000</Value> </MIMEField> <Domain>BESC</Domain> <Property Name="Computer ID" ID="1" EvaluationPeriod="P30D">computer id</Property> </Analysis> </BES> Response Schema: BES.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/analysis/master/40", "username", "password"); rr.bes contains BES object requested rr.besapi null rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=281
|
3/20/2013 5:21:10 PM
|
POST |
/api/analysis/{site}/{id} | Replace an analysis with the supplied XML. |
Request: Complete XML for the object in the body of the request. Response Schema: BES.xsd Request Schema: BES.xsd NOTE THIS DOES NOT WORK... instead what it does is just add another analysis next to the one your trying to update. If you're trying to "update" the analysis, then use the PUT method instead. |
|
|
Permalink: https://bigfix.me/restapi/?id=358
|
7/29/2013 12:38:07 PM
|
PUT |
/api/analysis/{site}/{id} | Update an analysis. |
Request: Complete XML for the object in the body of the request. Response Schema: BES.xsd Not sure on this reponse... it appears to be returning the ID number of the analysis that was updated. Request Schema: BES.xsd Using my RESTAPI.cs file for C#, you can update an analysis as follows: //Retrieve an existing analysis
RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/analysis/master/40", "username", "password"); //pull it out so our code is simplier Analysis a = (Analysis)rr.bes.Items[0]; //create a new property AnalysisProperty ap = new AnalysisProperty(); ap.ID = "3"; ap.Name = "Operating System"; ap.EvaluationPeriod = ActionReapplyInterval.P30D.ToString(); ap.Value = "name of operating system"; //append to this Analysis' Properties list a.Property = RESTAPI.AddItemToArray(a.Property, ap); //make call to update analysis rr = RESTAPI.putREST(("https://lab.bigfix.me:52311api/analysis/master/40", "username", "password", rr.bes); |
|
|
Permalink: https://bigfix.me/restapi/?id=320
|
3/20/2013 6:40:49 PM
|
DELETE |
/api/analysis/{site}/{id}/activation/{id} | Deactivate a specific analysis activation. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/analysis/master/40/activation/46", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=324
|
3/21/2013 12:36:36 PM
|
GET |
/api/analysis/{site}/{id}/activation/{id} | Get analysis activation details. |
Request: URL is all that is required. Response: Activation details. Example: https://lab.bigfix.me:52311/api/analysis/master/40/activation/46 Although it has the last {id}, i'm not entire sure that is used... any number will return the same data. <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <AnalysisActivation Resource="http://lab.bigfix.me:52311/api/analysis/master/40/activation/46" LastModified="Tue, 19 Mar 2013 22:10:43 +0000"> <Name>Custom Analysis</Name> <ID>46</ID> </AnalysisActivation> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/analysis/master/40/activation/46", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=282
|
3/20/2013 5:22:05 PM
|
DELETE |
/api/analysis/{site}/{id}/activations | Delete all activations for the specified analysis. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/analysis/master/40/activations", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=325
|
3/21/2013 12:37:28 PM
|
GET |
/api/analysis/{site}/{id}/activations | List of analysis activations. |
Request: URL is all that is required. Response: XML for list of activations. Example: https://lab.bigfix.me:52311/api/analysis/master/40/activations <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <AnalysisActivation Resource="http://lab.bigfix.me:52311/api/analysis/master/40/activation/46" LastModified="Tue, 19 Mar 2013 22:10:43 +0000"> <Name>Custom Analysis</Name> <ID>46</ID> </AnalysisActivation> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/analysis/master/40/activations", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=283
|
3/20/2013 5:22:50 PM
|
POST |
/api/analysis/{site}/{id}/activations | Create a new activation for the current operator. |
Request: No body is required, the activation will be created as the operator making the request. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=41
|
3/19/2013 9:04:12 AM
|
/api/computer
GET |
/api/computer/{id} | Get a computer's core properties. |
Request: URL is all that is required. Response: Lists all of a computer's properties. Example: https://lab.bigfix.me:52311/api/computer/269021 <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Computer Resource="http://lab.bigfix.me:52311/api/computer/269021"> <Property Name="Computer Name">Daniel-XP</Property> <Property Name="OS">WinXP 5.1.2600</Property> <Property Name="Client Settings">__Relay_Control_Server1=http://lab.bigfix.me:52311<Property> </Computer> </BESAPI> Note: Removed majority of information to keep example short. each type of property is displayed though. Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computer/269021", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. Note: If the computer id in question is not present in the system any more, but once was, it appears to return a 403 forbidden type response, rather than the 404 it returns on truly unknown ids. |
|
|
Permalink: https://bigfix.me/restapi/?id=364
|
1/18/2016 2:47:55 PM
|
GET |
/api/computer/{id}/fixlets | Get list of relevant Fixlets. |
Request: URL is all that is required. Response: List of relevant Fixlets and their ID. Example: https://lab.bigfix.me:52311/api/computer/269021/fixlets <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Fixlet Resource="http://lab.bigfix.me:52311/api/fixlet/master/39"></Fixlet> <Fixlet Resource="http://lab.bigfix.me:52311/api/fixlet/external/BES Support/137"></Fixlet> </BESAPI> Note: Removed most of the data to keep example short. Request: XML for setting. Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computer/269021/fixlets", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=285
|
3/20/2013 5:24:24 PM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=48
|
3/19/2013 12:02:09 AM
|
DELETE |
/api/computer/{id}/setting/* | Delete computer setting. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/computer/269021/setting/__RelayServer1", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=326
|
3/21/2013 12:37:58 PM
|
GET |
/api/computer/{id}/setting/* | Get the setting value. |
Request: URL is all that is required. Response: Returns setting value. Example: https://lab.bigfix.me:52311/api/computer/269021/setting/__RelayServer1 <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ComputerSettings Resource="http://lab.bigfix.me:52311/api/computer/269021/setting/__RelayServer1"> <Setting Resource="http://lab.bigfix.me:52311/api/computer/269021/setting/__RelayServer1"> <Name>__RelayServer1</Name> <Value>http://lab.bigfix.me:52311/bfmirror/downloads/</Value> </Setting> </ComputerSettings> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computer/269021/setting/__RelayServer1", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=286
|
3/20/2013 5:28:50 PM
|
POST |
/api/computer/{id}/setting/* | Update or create setting value |
Request: XML for setting. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd Example: Using the API in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computer/269021/setting/__RelayServer1" , cred); ComputerSetting prop = null; if ( ( (BESAPIComputerSettings)rr.besapi.Items[0]).Setting == null) { //property does not exist? prop = new ComputerSetting(); prop.Name = key; prop.Value = value; ((BESAPIComputerSettings)rr.besapi.Items[0]).Setting = new ComputerSetting[] { prop }; } else { prop = (ComputerSetting)((BESAPIComputerSettings)rr.besapi.Items[0]).Setting[0]; prop.Value = value; ((BESAPIComputerSettings)rr.besapi.Items[0]).Setting[0] = prop; } ((BESAPIComputerSettings)rr.besapi.Items[0]).TargetComputers = new string[]{getSetting(computer,"ID")};//add the computer as a target RESTResult sr = RESTAPI.postREST("https://lab.bigfix.me:52311/api/computer/269021/setting/__RelayServer1" ,cred, rr.besapi); if ( sr.isError ) // print the error Console.WriteLine("update failed: " + sr.ErrorMessage); Note: this will create an action without an end date. |
|
|
Permalink: https://bigfix.me/restapi/?id=366
|
4/5/2016 8:04:41 AM
|
PUT |
/api/computer/{id}/setting/* | Update the setting value. |
Request: XML for setting. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=52
|
3/19/2013 9:17:36 AM
|
GET |
/api/computer/{id}/settings | Get a computer's settings. |
Request: URL is all that is required. Response: Lists client settings for a computer. Example: https://lab.bigfix.me:52311/api/computer/269021/settings <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ComputerSettings Resource="http://lab.bigfix.me:52311/api/computer/269021/settings"> <Setting Resource="api/computer/269021/setting/__RelayServer1"> <Name>__RelayServer1</Name> <Value>http://lab.bigfix.me:52311/bfmirror/downloads/</Value> </Setting> </ComputerSettings> </BESAPI> Note: removed most data to keep example short. Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computer/269021/settings", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=287
|
3/20/2013 5:29:38 PM
|
POST |
/api/computer/{id}/settings | Update or create setting value |
Request: XML for setting. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=54
|
3/19/2013 9:13:52 AM
|
PUT |
/api/computer/{id}/settings | Update setting value |
Request: XML for setting. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd NOTE: This is not listed in the /api/help/computer listing. |
|
|
Permalink: https://bigfix.me/restapi/?id=180
|
3/19/2013 9:16:16 AM
|
GET |
/api/computer/{id}/tasks | Get list of relevant Tasks. |
Request: URL is all that is required. Response: List of relevant Tasks and their ID. Example: https://lab.bigfix.me:52311/api/computer/269021/tasks <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Task Resource="http://lab.bigfix.me:52311/api/fixlet/master/39"></Task> <Task Resource="http://lab.bigfix.me:52311/api/fixlet/external/BES Support/137"></Task> </BESAPI> Note: Removed data to keep example short. Request: XML for setting. Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computer/269021/tasks", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=288
|
3/20/2013 5:31:25 PM
|
/api/computergroup
DELETE |
/api/computergroup/{site}/{id} | Deletes the indicated computer group. |
Deletes the indicated computer group. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/computergroup/master/47", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=327
|
3/21/2013 12:38:44 PM
|
GET |
/api/computergroup/{site}/{id} | Fetch the BES XSD representation of the specified computer group. |
Request: URL is all that is required. Response: Return a computer group. Example: https://lab.bigfix.me:52311/api/computergroup/master/47 <?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <ComputerGroup> <Title>Windows XP Computers</Title> <Domain>BESC</Domain> <JoinByIntersection>true</JoinByIntersection> <SearchComponentPropertyReference PropertyName="OS" Comparison="Contains"> <SearchText>WinXP</SearchText> <Relevance>exists (operating system) whose (it as string as lowercase contains "WinXP" as lowercase)</Relevance> </SearchComponentPropertyReference> </ComputerGroup> </BES> Response Schema: BES.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computergroup/master/47", "username", "password"); rr.bes contains the BES object requested. rr.besapi null rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=289
|
3/20/2013 5:33:56 PM
|
POST |
/api/computergroup/{site}/{id} | Add the specified computer group. |
Request: XML file describing the computer group. Request Schema: BES.xsd Response: New BES XML for the computer group. Response Schema: BES.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=349
|
4/16/2013 4:35:13 PM
|
PUT |
/api/computergroup/{site}/{id} | Update the specified computer group. |
Request: XML file describing the computer group. Request Schema: BES.xsd Response: New BES XML for the computer group. Response Schema: BES.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=59
|
3/19/2013 9:07:42 AM
|
GET |
/api/computergroup/{site}/{id}/computers | Fetch a list of computers relevant to this computer group. |
This will essentially give you the computers that are members of this group. Response: List of computer resources that are relevant. Example: https://lab.bigfix.me:52311/api/computergroup/master/47/computers <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Computer Resource="http://lab.bigfix.me:52311/api/computer/269021"></Computer> <Computer Resource="http://lab.bigfix.me:52311/api/computer/1348423"></Computer> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computergroup/master/47/computers", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=290
|
3/20/2013 5:34:41 PM
|
/api/computergroups
GET |
/api/computergroups/{site} | Fetch list of computer groups in the specified site. |
Request: URL is all that is required. Response: List of Computer Groups and their ID. Example: https://lab.bigfix.me:52311/api/computergroups/master <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ComputerGroup Resource="http://lab.bigfix.me:52311/api/computergroup/master/47" LastModified="Tue, 19 Mar 2013 22:26:24 +0000"> <Name>Windows XP Computers</Name> <ID>47</ID> </ComputerGroup> </BESAPI> Request: XML for setting. Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computergroups/master", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=291
|
3/20/2013 5:35:42 PM
|
POST |
/api/computergroups/{site} | Creates a computer group in the specified site as described in the posted XML document. |
Request: Complete XML for the computer groups in the body of the request. Request Schema: BES.xsd Response: Response BESAPI XML listing the created objects. Note for property reference specification variant: Although the Relevance element is required in the SearchComponentPropertyReference element, the value supplied to the api appears to be replaced by a machine generated string using the attributes and SearchText elements. |
|
|
Permalink: https://bigfix.me/restapi/?id=363
|
12/27/2015 1:00:11 PM
|
/api/computers
GET |
/api/computers | Fetch a list of computers. |
Request: URL is all that is required. Response: List of computers and Last Report time. Example: https://lab.bigfix.me:52311/api/computers <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Computer Resource="api/computer/269021"> <LastReportTime>Tue, 19 Mar 2013 22:07:11 +0000</LastReportTime> <ID>269021</ID> </Computer> <Computer Resource="api/computer/1348423"> <LastReportTime>Tue, 19 Mar 2013 22:03:50 +0000</LastReportTime> <ID>1348423</ID> </Computer> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/computers", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=292
|
3/20/2013 5:36:21 PM
|
POST |
/api/computers/settings | Update or create settings for multiple computers. |
Request: XML for setting. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=67
|
3/19/2013 9:11:10 AM
|
/api/dashboardvariable
DELETE |
/api/dashboardvariable/{dashboard ID}/{variable name} | Deletes the specified dashboard variable. |
Deletes the specified dashboard variable. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/dashboardvariable/__WakeOnLANEnabledDashboardID__/__WakeOnLANEnabledVariableName__", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=328
|
3/21/2013 12:39:47 PM
|
GET |
/api/dashboardvariable/{dashboard ID}/{variable name} | Fetch value of a specific dashboard variable. |
Response: Dashboard variable XML. Example: https://lab.bigfix.me:52311/api/dashboardvariable/__WakeOnLANEnabledDashboardID__/__WakeOnLANEnabledVariableName__ <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <DashboardData Resource="http://lab.bigfix.me:52311/api/dashboardvariable/__WakeOnLANEnabledDashboardID__/__WakeOnLANEnabledVariableName__/__WakeOnLANEnabledVariableName__"> <Dashboard>__WakeOnLANEnabledDashboardID__</Dashboard> <Name>__WakeOnLANEnabledVariableName__</Name> <IsPrivate>false</IsPrivate> <Value>true</Value> </DashboardData> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/dashboardvariable/__WakeOnLANEnabledDashboardID__/__WakeOnLANEnabledVariableName__", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=293
|
3/20/2013 5:44:57 PM
|
POST |
/api/dashboardvariable/{dashboard ID}/{variable name} | Update a specific dashboard variable. |
Request: XML for Dashboard variable. Request Schema: BESAPI.xsd Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=71
|
3/19/2013 9:42:22 AM
|
PUT |
/api/dashboardvariable/{dashboard ID}/{variable name} | Update a specific dashboard variable. |
Request: XML for Dashboard variable. Request Schema: BESAPI.xsd Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=70
|
3/19/2013 9:41:57 AM
|
/api/dashboardvariables
GET |
/api/dashboardvariables | Fetch list of dashboard IDs that have stored information. |
Response: XML list of dashboards. Example: https://lab.bigfix.me:52311/api/dashboardvariables <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <DashboardData Resource="http://lab.bigfix.me:52311/api/dashboardvariable/__WakeOnLANEnabledDashboardID__/__WakeOnLANEnabledVariableName__"> <Dashboard>__WakeOnLANEnabledDashboardID__</Dashboard> <Name>__WakeOnLANEnabledVariableName__</Name> <IsPrivate>false</IsPrivate> <Value>true</Value> </DashboardData> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/dashboardvariables", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=294
|
3/20/2013 5:45:34 PM
|
DELETE |
/api/dashboardvariables/* | Deletes all stored variables for a dashboard. |
Deletes all stored variables for a dashboard. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/dashboardvariables/__WakeOnLANEnabledDashboardID__", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=329
|
3/21/2013 12:40:19 PM
|
GET |
/api/dashboardvariables/* | List variables for the specified dashboard. |
Notes: If the variables are private only the ones for the requesting operator will be shown. Response: List of Dashboard variables XML. Example: https://lab.bigfix.me:52311/api/dashboardvariables/__WakeOnLANEnabledDashboardID__ <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <DashboardData Resource="http://lab.bigfix.me:52311/api/dashboardvariables/__WakeOnLANEnabledDashboardID__/__WakeOnLANEnabledVariableName__"> <Dashboard>__WakeOnLANEnabledDashboardID__</Dashboard> <Name>__WakeOnLANEnabledVariableName__</Name> <IsPrivate>false</IsPrivate> <Value>true</Value> </DashboardData> </BESAPI> Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=231
|
3/19/2013 7:33:13 PM
|
POST |
/api/dashboardvariables/* | Create new dashboard variable. |
Request: XML for Dashboard variable. Request Schema: BESAPI.xsd Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=76
|
3/19/2013 9:39:16 AM
|
/api/fixlet
DELETE |
/api/fixlet/{site}/{id} | Delete a Fixlet. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/fixlet/master/39", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=330
|
3/21/2013 12:40:48 PM
|
GET |
/api/fixlet/{site}/{id} | Returns a list of all available commands for the specified resource for each supported HTTP method. |
Request: URL is all that is required Response: XML of Object Example: https://lab.bigfix.me:52311/api/fixlet/master/39 <?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <Fixlet> <Title>Custom Fixlet</Title> <Description><![CDATA[<enter a description of the problem and the corrective action here> ]]></Description> <Relevance>true</Relevance> <Category></Category> <Source>Internal</Source> <SourceID></SourceID> <SourceReleaseDate>2013-03-19</SourceReleaseDate> <SourceSeverity></SourceSeverity> <CVENames></CVENames> <SANSID></SANSID> <MIMEField> <Name>x-fixlet-modification-time</Name> <Value>Tue, 19 Mar 2013 20:41:37 +0000</Value> </MIMEField> <Domain>BESC</Domain> <DefaultAction ID="Action1"> <Description> <PreLink>Click </PreLink> <Link>here</Link> <PostLink> to deploy this action.</PostLink> </Description> <ActionScript MIMEType="application/x-Fixlet-Windows-Shell">// Enter your action script here</ActionScript> </DefaultAction> </Fixlet> </BES> Response Schema: BES.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/fixlet/master/39", "username", "password"); rr.bes contains the BES object requested. rr.besapi null rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=295
|
3/20/2013 5:56:17 PM
|
POST |
/api/fixlet/{site}/{id} | Adds a Fixlet. |
Request: Complete XML for the object in the body of the request. Request Schema: BES.xsd Response Schema: BES.xsd NOTE: This does not appear to be working. Instead it simply adds another copy of the fixlet with a new ID. The Put method updates the current fixlet content. This Post method creates a new fixlet. |
|
|
Permalink: https://bigfix.me/restapi/?id=355
|
7/22/2013 10:38:12 AM
|
PUT |
/api/fixlet/{site}/{id} | Updated a Fixlet. |
Request: Complete XML for the object in the body of the request. Request Schema: BES.xsd Response Schema: plain text Response: The ID of the fixlet that was put NOTE: This does update the fixlet content. NOTE: This method does not respect HTTP Accept header requiring only application/xml return |
|
|
Permalink: https://bigfix.me/restapi/?id=362
|
12/17/2015 2:31:07 PM
|
GET |
/api/fixlet/{site}/{id}/computers | List computers that are relevant for this Fixlet. |
Request: URL is all that is required. Response: XML list of computers. Example: https://lab.bigfix.me:52311/api/fixlet/master/39/computers <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Computer Resource="http://lab.bigfix.me:52311/api/computer/269021"></Computer> <Computer Resource="http://lab.bigfix.me:52311/api/computer/1348423"></Computer> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/fixlet/master/39/computers", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=296
|
3/20/2013 5:57:13 PM
|
/api/fixlets
GET |
/api/fixlets/{site} | Fetch list of Fixlets of a particular site. |
Request: URL is all that is required Example:
Example: https://lab.bigfix.me:52311/api/fixlets/master <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Fixlet Resource="http://lab.bigfix.me:52311/api/fixlet/master/39" LastModified="Tue, 19 Mar 2013 20:41:37 +0000"> <Name>Custom Fixlet</Name> <ID>39</ID> </Fixlet> </BESAPI> Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/fixlets/master", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=297
|
3/20/2013 5:58:33 PM
|
POST |
/api/fixlets/{site} | Create a fixlet in the specified site. |
Request: Complete XML for the object in the body of the request Request Schema: BES.xsd Response Schema: BES.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=86
|
3/19/2013 12:02:09 AM
|
/api/help
GET |
/api/help | List of available top-level resources. |
Returns a list of top-level available resources. Example: https://lab.bigfix.me:52311/api/help/ /api/action /api/actions /api/admin Note: Removed some data to keep example short. |
|
|
Permalink: https://bigfix.me/restapi/?id=237
|
3/19/2013 7:38:03 PM
|
GET |
/api/help/{resource} | List available commands. |
Returns a list of all available commands for the specified resource for each supported HTTP method. Example: https://lab.bigfix.me:52311/api/help/action GET: /api/action/{id} /api/action/{id}/status POST: /api/action/{id}/stop DELETE: /api/action/{id} Note: Removed some data to keep example short. |
|
|
Permalink: https://bigfix.me/restapi/?id=238
|
3/19/2013 7:38:18 PM
|
/api/import
POST |
/api/import/{site} | Import all provided objects in XML document. |
Notes: This will only import items defined in the BES.XSD. Request: Complete XML for the objects in the body of the request. Response: Response BESAPI XML listing the created objects. |
|
|
Permalink: https://bigfix.me/restapi/?id=89
|
3/19/2013 9:09:53 AM
|
/api/ldapdirectories
GET |
/api/ldapdirectories | Fetch all LDAP Directories. |
Request: URL is all that is required. Response: BES XML for the directories. Example: https://lab.bigfix.me:52311/api/ldapdirectories <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <LDAPDirectory Resource="http://lab.bigfix.me:52311/ldapdirectory/34"> <ID>34</ID> <Name>MoranIT Directory</Name> <IsActiveDirectory>true</IsActiveDirectory> <IsGlobalCatalog>true</IsGlobalCatalog> <UseSSL>false</UseSSL> <BaseDN>DC=MoranIT,DC=local</BaseDN> <UIDAttribute>userPrincipalName</UIDAttribute> <UserFilter>(objectCategory=user)</UserFilter> <GroupFilter><![CDATA[(&(objectCategory=group)(groupType:1.2.840.113556.1.4.803:=2147483648))]]></GroupFilter> <Servers> <Server> <Host>dc.moranit.local</Host> <Port>3268</Port> <Priority>0</Priority> </Server> </Servers> </LDAPDirectory> </BESAPI> Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/ldapdirectories", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=298
|
3/20/2013 6:07:48 PM
|
POST |
/api/ldapdirectories | Create LDAP Directory. |
/api/ldapdirectory
DELETE |
/api/ldapdirectory/{id} | Delete Directory. |
Request: URL is all that's needed. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/ldapdirectory/34", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=331
|
3/21/2013 12:41:26 PM
|
GET |
/api/ldapdirectory/{id} | Fetch detailed information for a directory. |
Request: URL is all that is required. Response: BES XML for operator. Example: https://lab.bigfix.me:52311/api/ldapdirectory/34 <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <LDAPDirectory Resource="http://lab.bigfix.me:52311/ldapdirectory/34"> <ID>34</ID> <Name>MoranIT Directory</Name> <IsActiveDirectory>true</IsActiveDirectory> <IsGlobalCatalog>true</IsGlobalCatalog> <UseSSL>false</UseSSL> <BaseDN>DC=MoranIT,DC=local</BaseDN> <UIDAttribute>userPrincipalName</UIDAttribute> <UserFilter>(objectCategory=user)</UserFilter> <GroupFilter><![CDATA[(&(objectCategory=group)(groupType:1.2.840.113556.1.4.803:=2147483648))]]></GroupFilter> <Servers> <Server> <Host>dc.moranit.local</Host> <Port>3268</Port> <Priority>0</Priority> </Server> </Servers> </LDAPDirectory> </BESAPI> Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/ldapdirectory/34", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=299
|
3/20/2013 6:18:00 PM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=96
|
3/19/2013 12:02:09 AM
|
PUT |
/api/ldapdirectory/{id} | Update directory. |
Request: Complete XML for LDAP Directory.
|
|
|
Permalink: https://bigfix.me/restapi/?id=95
|
3/19/2013 9:19:57 AM
|
/api/login
GET |
/api/login | Performs login. |
This can be used to create/refresh your current logged in session. Returns HTTP 200 on success. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/login", "username", "password"); rr.bes null rr.besapi null rr.result returns "ok" rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=300
|
3/20/2013 6:20:50 PM
|
/api/mailbox
POST |
/api/mailbox |
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=103
|
3/19/2013 12:02:09 AM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=100
|
3/19/2013 12:02:09 AM
|
POST |
/api/mailbox/{id} |
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=104
|
3/19/2013 12:02:09 AM
|
DELETE |
/api/mailbox/{id}/{id} |
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=106
|
3/19/2013 12:02:09 AM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=101
|
3/19/2013 12:02:09 AM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=105
|
3/19/2013 12:02:09 AM
|
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=102
|
3/19/2013 12:02:09 AM
|
/api/operator
DELETE |
/api/operator/* | Delete Operator. |
Request: URL is all that's needed. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/operator/BigFixAdmin", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=332
|
3/21/2013 12:46:12 PM
|
GET |
/api/operator/* | Fetch detailed information for a user. |
Request: URL is all that is required. Response: XML for Operator. Example: https://lab.bigfix.me:52311/api/operator/BigFixAdmin <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Operator Resource="http://lab.bigfix.me:52311/api/operator/BigFixAdmin"> <Name>BigFixAdmin</Name> <LastLoginTime>Sat, 16 Mar 2013 15:25:38 +0000</LastLoginTime> <MasterOperator>true</MasterOperator> <CustomContent>true</CustomContent> <ShowOtherActions>true</ShowOtherActions> <LoginPermission>Unrestricted</LoginPermission> <UnmanagedAssetPrivilege>ShowAll</UnmanagedAssetPrivilege> </Operator> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/operator/BigFixAdmin", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=301
|
3/20/2013 6:21:22 PM
|
POST |
/api/operator/* | Update operator. |
Request: Complete or partial XML for Operator. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=111
|
3/19/2013 9:22:21 AM
|
PUT |
/api/operator/* | Fetch detailed information for a user. |
Request: URL is all that is required. Response: XML for Operator. Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=110
|
3/19/2013 9:21:57 AM
|
GET |
/api/operator/*/roles | Shows a list of roles the operator is a member of. |
Request: URL is all that is required. Response: XML listing roles. Example: https://lab.bigfix.me:52311/api/operator/BigFixAdmin/roles <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Role Resource="http://lab.bigfix.me:52311/api/role/35"> <Name>BigFix_Admin</Name> </Role> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/operator/BigFixAdmin/roles", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=302
|
3/20/2013 6:22:09 PM
|
/api/operators
GET |
/api/operators | Fetch all operators. |
Request: URL is all that is required. Response: XML list of operators. Example: https://lab.bigfix.me:52311/api/operators <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Operator Resource="http://lab.bigfix.me:52311/api/operator/BigFixAdmin"> <Name>BigFixAdmin</Name> <LastLoginTime>Sat, 16 Mar 2013 15:25:38 +0000</LastLoginTime> <MasterOperator>true</MasterOperator> <CustomContent>true</CustomContent> <ShowOtherActions>true</ShowOtherActions> <LoginPermission>Unrestricted</LoginPermission> <UnmanagedAssetPrivilege>ShowAll</UnmanagedAssetPrivilege> </Operator> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/operators", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=303
|
3/20/2013 6:22:35 PM
|
POST |
/api/operators | Create operator. |
Request: Operator XML file. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=115
|
3/19/2013 9:21:09 AM
|
/api/properties
GET |
/api/properties | Fetch a list of all properties. |
Request: URL is all that is required. Response: BES XML file containing all properties. Example: https://lab.bigfix.me:52311/api/properties <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Property Resource="http://lab.bigfix.me:52311/api/property/4"> <Name>Computer Name</Name> <ID>4</ID> <IsReserved>1</IsReserved> </Property> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/properties", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=304
|
3/20/2013 6:23:09 PM
|
POST |
/api/properties | Create a new property. |
Request: BES XML for the property/properties. Response Schema: BES.xsd Request Schema: BES.xsd BESProperty besprop = new BESProperty();
besprop.Name = "Relevance " + r.ID; besprop.EvaluationPeriod = "P30D"; besprop.Value = r.Statement; BES bes = new BES(); bes.Items = new object[] { besprop }; bes.ItemsElementName = new ItemsChoiceType2[] { ItemsChoiceType2.Property }; RESTResult _rr = RESTAPI.postREST(restUrl + "/properties", restUser, restPass, bes); if (!_rr.isError) { } |
|
|
Permalink: https://bigfix.me/restapi/?id=353
|
6/4/2013 11:00:57 AM
|
/api/property
DELETE |
/api/property/{id} | Delete the specified property. |
Description: Deletes the specified property. Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/property/4", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=333
|
3/21/2013 12:46:41 PM
|
GET |
/api/property/{id} | Get a specific property. |
Request: URL is all that is required. Example: https://lab.bigfix.me:52311/api/property/4 <?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <Property Name="Computer Name">computer name</Property> </BES> Response Schema: BES.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/property/4", "username", "password"); rr.bes contains the BES object requested. rr.besapi null rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=305
|
3/20/2013 6:23:52 PM
|
POST |
/api/property/{id} | Update the specified property. |
Request: Complete XML for the property. Response Schema: BES.xsd Request Schema: BES.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=122
|
3/19/2013 8:57:51 AM
|
PUT |
/api/property/{id} | Update the specified property. |
Request: Complete XML for the property. Response Schema: BES.xsd Request Schema: BES.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=121
|
3/19/2013 8:57:22 AM
|
/api/query
GET |
/api/query | Evaluate a relevance expression and get the result. |
This runs request is processed through the server to WebReports. Response: XML query results Example: https://lab.bigfix.me:52311/api/query?relevance=names of bes computers <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Query Resource="names of bes computers"> <Result> <Answer type="string">Daniel-XP</Answer> <Answer type="string">Diana-PC</Answer> </Result> <Evaluation> <Time>0.415ms</Time> <Plurality>Plural</Plurality> </Evaluation> </Query> </BESAPI> Request: /api/query?relevance=names of bes computers Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/query?relevance=names of bes computers", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=306
|
3/20/2013 6:24:54 PM
|
POST |
/api/query | Evaluate a relevance expression and get the result. |
This runs request is processed through the server to WebReports. Response: XML query results Request: /api/query Request Body: url-formatted request (i.e. relevance=names+of+bes+computers) Response Schema: BESAPI.xsd NOTE: Not shown in /api/help/query listings. |
|
|
Permalink: https://bigfix.me/restapi/?id=182
|
3/19/2013 9:40:22 AM
|
/api/replication
GET |
/api/replication/server/{id} | Fetch the XML for a specific replication server and it's links. |
Request: URL is all that is required. Example: https://lab.bigfix.me:52311/api/replication/server/0 <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ReplicationServer Resource="http://lab.bigfix.me:52311/api/replication/server/0"> <ServerID>0</ServerID> <URL>http://lab.bigfix.me:52311</URL> <DNS>sql2012.moranit.local</DNS> <ReplicationIntervalSeconds>300</ReplicationIntervalSeconds> </ReplicationServer> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/replication/server/0", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=307
|
3/20/2013 6:25:28 PM
|
POST |
/api/replication/server/{id} | Updates the replication server ReplicationInvtervalSecond and associated links if supplied. |
Request: BES API XML Response: Updated ReplicationServer XML |
|
|
Permalink: https://bigfix.me/restapi/?id=131
|
3/19/2013 9:32:59 AM
|
PUT |
/api/replication/server/{id} | Updates the replication server ReplicationInvtervalSecond and associated links if supplied. |
Request: BES API XML. Response: Updated ReplicationServer XML. |
|
|
Permalink: https://bigfix.me/restapi/?id=129
|
3/19/2013 9:28:49 AM
|
DELETE |
/api/replication/server/{id}/link/{id} | Deletes the specified link. |
Request: URL is all that is required.
|
|
|
Permalink: https://bigfix.me/restapi/?id=134
|
3/19/2013 9:36:12 AM
|
GET |
/api/replication/server/{id}/link/{id} | Fetch the XML for a specific replication server link. |
Request: URL is all that is required. Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=127
|
3/19/2013 9:33:53 AM
|
POST |
/api/replication/server/{id}/link/{id} | Update replication link weight. |
Request: XML describing the link Request/Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=132
|
3/19/2013 9:35:19 AM
|
PUT |
/api/replication/server/{id}/link/{id} | Update replication link weight. |
Request: XML describing the link. Request/Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=130
|
3/19/2013 9:34:50 AM
|
GET |
/api/replication/servers | Fetch a list of all replication servers and their links. |
Request: URL is all that is required. Example: https://lab.bigfix.me:52311/api/replication/servers <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ReplicationServer Resource="http://lab.bigfix.me:52311/api/replication/server/0"> <ServerID>0</ServerID> <URL>http://lab.bigfix.me:52311</URL> <DNS>sql2012.moranit.local</DNS> <ReplicationIntervalSeconds>300</ReplicationIntervalSeconds> </ReplicationServer> </BESAPI> Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=243
|
3/19/2013 7:47:21 PM
|
POST |
/api/replication/servers | Post settings for a single or all servers at once. |
Request: Supply the BESAPI xml for the DSA server settings you want to change. <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ReplicationServer> <ServerID>0</ServerID> <URL>http://spiffy:52311</URL> <DNS>spiffy</DNS> <ReplicationIntervalSeconds>500</ReplicationIntervalSeconds> <ReplicationLink> <SourceServerID>0</SourceServerID> <DestinationServerID>1</DestinationServerID> <Weight>1</Weight> </ReplicationLink> </ReplicationServer> <ReplicationServer> <ServerID>1</ServerID> <URL>http://spiffy-dsa-1:52311</URL> <DNS>spiffy-dsa-1</DNS> <ReplicationIntervalSeconds>500</ReplicationIntervalSeconds> <ReplicationLink> <SourceServerID>1</SourceServerID> <DestinationServerID>0</DestinationServerID> <Weight>1</Weight> </ReplicationLink> </ReplicationServer> </BESAPI> |
|
|
Permalink: https://bigfix.me/restapi/?id=133
|
3/19/2013 9:27:57 AM
|
/api/role
DELETE |
/api/role/{id} | Delete a role. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/role/35", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=334
|
3/21/2013 12:47:26 PM
|
GET |
/api/role/{id} | Fetch the XML for the specified role. |
Request: URL is all that is required. Example: https://lab.bigfix.me:52311/api/role/35 <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Role Resource="http://lab.bigfix.me:52311/api/role/35"> <Name>BigFix_Admin</Name> <ID>35</ID> <MasterOperator>1</MasterOperator> <CustomContent>1</CustomContent> <ShowOtherActions>1</ShowOtherActions> <UnmanagedAssetPrivilege>ShowAll</UnmanagedAssetPrivilege> <Operators> <Explicit>BigFixAdmin</Explicit> </Operators> <LDAPGroups> <Group> <Name>BigFix_Admin</Name> <DN>CN=BigFix_Admin,CN=Users,DC=MoranIT,DC=local</DN> <ServerID>34</ServerID> </Group> </LDAPGroups> </Role> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/role/35", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=308
|
3/20/2013 6:26:02 PM
|
POST |
/api/role/{id} | Replace existing role with supplied XML. |
Request: XML describing the role. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=138
|
3/19/2013 9:00:21 AM
|
PUT |
/api/role/{id} | Update a role. |
Request: Partial or complete XML for the role. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=137
|
3/19/2013 8:59:59 AM
|
/api/roles
GET |
/api/roles | Fetch a list of all Roles. |
Request: URL is all that is required. Response: XML file listing of Roles. Example: https://lab.bigfix.me:52311/api/roles <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Role Resource="http://lab.bigfix.me:52311/api/role/35"> <Name>BigFix_Admin</Name> <ID>35</ID> <MasterOperator>1</MasterOperator> <CustomContent>1</CustomContent> <ShowOtherActions>1</ShowOtherActions> <UnmanagedAssetPrivilege>ShowAll</UnmanagedAssetPrivilege> <LDAPGroups> <Group> <Name>BigFix_Admin</Name> <DN>CN=BigFix_Admin,CN=Users,DC=MoranIT,DC=local</DN> <ServerID>34</ServerID> </Group> </LDAPGroups> </Role> <Role Resource="http://lab.bigfix.me:52311/api/role/42"> <Name>BigFix_Console</Name> <ID>42</ID> <MasterOperator>0</MasterOperator> <CustomContent>1</CustomContent> <ShowOtherActions>0</ShowOtherActions> <UnmanagedAssetPrivilege>ShowNone</UnmanagedAssetPrivilege> <LDAPGroups> <Group> <Name>BigFix_Console</Name> <DN>CN=BigFix_Console,CN=Users,DC=MoranIT,DC=local</DN> <ServerID>34</ServerID> </Group> </LDAPGroups> </Role> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/roles", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=309
|
3/20/2013 6:26:33 PM
|
POST |
/api/roles | Create a new role. |
Request: XML for the role. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd NOTE: there is a bug in the REST implementation which creates the user role... but nothing is configured within the group. It is being worked by the development team for a patched version 9 coming out eventually. |
|
|
Permalink: https://bigfix.me/restapi/?id=352
|
4/18/2013 3:06:17 PM
|
/api/site
DELETE |
/api/site/{site} | Deletes the specified site and it's contents. |
Request: URL is all that is required. Response: HTTP response code. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/site/custom/mycustomsite", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=335
|
3/21/2013 12:47:58 PM
|
GET |
/api/site/{site} | Fetch a specific site. |
Request: URL is all that is required. Response: BES XML representing a site. Example: https://lab.bigfix.me:52311/api/site/master <?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <ActionSite> <Name>ActionSite</Name> <Description></Description> <GlobalReadPermission>false</GlobalReadPermission> <SubscriptionMode>All</SubscriptionMode> </ActionSite> </BES> Response Schema: BES.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/site/master", "username", "password"); rr.bes contains the BES object requested. rr.besapi null rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=310
|
3/20/2013 6:27:05 PM
|
POST |
/api/site/{site} | Create or replaces a site. |
Description: Creates or replaces a site. Request: Complete XML for the object. Request Schema: BES.xsd Note: This is not listed under /api/help/site. |
|
|
Permalink: https://bigfix.me/restapi/?id=179
|
3/19/2013 12:30:13 AM
|
PUT |
/api/site/{site} | Update the specified site. |
Description: Update a site. Request: Complete XML for the object in the body of the request. Request Schema: BES.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=150
|
3/19/2013 12:27:14 AM
|
GET |
/api/site/{site}/content | Fetch a list all content within a site. |
Request: URL is all that is required. Response: API XML File Example: https://lab.bigfix.me:52311/api/site/master/content <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Fixlet Resource="http://lab.bigfix.me:52311/api/fixlet/master/39" LastModified="Tue, 19 Mar 2013 20:41:37 +0000"> <Name>Custom Fixlet</Name> <ID>39</ID> </Fixlet> <Analysis Resource="http://lab.bigfix.me:52311/api/analysis/master/40" LastModified="Tue, 19 Mar 2013 20:41:59 +0000"> <Name>Custom Analysis</Name> <ID>40</ID> </Analysis> <Task Resource="http://lab.bigfix.me:52311/api/task/master/41" LastModified="Tue, 19 Mar 2013 20:43:42 +0000"> <Name>Custom Task</Name> <ID>41</ID> </Task> <ComputerGroup Resource="http://lab.bigfix.me:52311/api/computergroup/master/47" LastModified="Tue, 19 Mar 2013 22:26:24 +0000"> <Name>Windows XP Computers</Name> <ID>47</ID> </ComputerGroup> </BESAPI> Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/site/master/content", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=311
|
3/20/2013 6:27:36 PM
|
DELETE |
/api/site/{site}/file/{id} | Deletes the specified file. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/site/master/file/50", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=336
|
3/21/2013 12:48:50 PM
|
GET |
/api/site/{site}/file/{id} | Get a site file. |
Request: URL is all that is required. Response: application/octet-stream of the file. Example: https://lab.bigfix.me:52311/api/site/master/file/50 This text file returns the contents as below. If it were an image, it'd return the image, etc... Testing Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/site/master/file/50", "username", "password"); rr.bes null rr.besapi null rr.result contains byte array converted to string rr.byteArray contains the raw byte array returned by the server. If you are retrieving images, then bytearray would contain the value of that image. |
|
|
Permalink: https://bigfix.me/restapi/?id=312
|
3/20/2013 6:29:08 PM
|
POST |
/api/site/{site}/file/{id} | Update a site file. |
Request: File contents.
|
|
|
Permalink: https://bigfix.me/restapi/?id=154
|
3/19/2013 12:54:22 AM
|
PUT |
/api/site/{site}/file/{id} | Update a site file. |
Request: File contents.
|
|
|
Permalink: https://bigfix.me/restapi/?id=151
|
3/19/2013 12:54:07 AM
|
GET |
/api/site/{site}/files | Fetch a list all site files. |
Request: URL is all that is required. Response: BESAPI XML File Example: https://lab.bigfix.me:52311/api/site/master/files <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <SiteFile Resource="http://lab.bigfix.me:52311/api/site/master/file/33"> <Name>Relays.dat</Name> <ID>33</ID> <LastModified>Fri, 15 Mar 2013 01:22:09 +0000</LastModified> <FileSize></FileSize> <IsClientFile>0</IsClientFile> </SiteFile> <SiteFile Resource="http://lab.bigfix.me:52311/api/site/master/file/50"> <Name>MyTextFile.txt</Name> <ID>50</ID> <LastModified>Wed, 20 Mar 2013 00:52:32 +0000</LastModified> <FileSize>7</FileSize> <IsClientFile>0</IsClientFile> </SiteFile> </BESAPI> Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/site/master/files", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=313
|
3/20/2013 6:29:43 PM
|
POST |
/api/site/{site}/files | Adds files to a site. |
Description: Add file(s). To post to 'files' instead of 'file' you need to supply the files in a MIME document. The simplest example of this would be the curl command: curl -k -u mo -X POST -F "file=@/temp/file.xml" "https://spiffy:52313/api/site/custom/TestSite/files" More than one file can be included in this manner in a single post. Response: BESAPI showing the ID of the created file. Post File Example: Content-Length: 1136 Content-Type: multipart/form-data; boundary=----------------------------27beaea68af8 ------------------------------27beaea68af8 Content-Disposition: form-data; name="file"; filename="file.data" Content-Type: application/octet-stream file data goes here ------------------------------27beaea68af8-- |
|
|
Permalink: https://bigfix.me/restapi/?id=155
|
3/19/2013 12:53:03 AM
|
DELETE |
/api/site/{site}/permission/*/* | Removes permission from site. |
Request: URL is all that is required Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/site/master/permission/operator/BigFixAdmin", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=337
|
3/21/2013 12:49:15 PM
|
GET |
/api/site/{site}/permission/*/* | Returns specific site permission for operator or role. |
Response: Example: https://lab.bigfix.me:52311/api/site/master/permission/operator/BigFixAdmin <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <SitePermission Resource="http://lab.bigfix.me:52311/api/site/master/permission/operator/BigFixAdmin"> <Permission>Owner</Permission> <Operator Resource="http://lab.bigfix.me:52311/api/operator/BigFixAdmin">BigFixAdmin</Operator> </SitePermission> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/site/master/permission/operator/BigFixAdmin", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=314
|
3/20/2013 6:30:07 PM
|
POST |
/api/site/{site}/permission/*/* | Sets site permission for specified user or role. |
Request: BESAPI SitePermission XML. Response Schema: BESAPI.xsd Request Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=156
|
3/19/2013 12:37:18 AM
|
PUT |
/api/site/{site}/permission/*/* | Updates site permission for specified user or role. |
Request: BESAPI SitePermission XML. Response Schema: BESAPI.xsd Request Schema: BESAPI.xs |
|
|
Permalink: https://bigfix.me/restapi/?id=152
|
3/19/2013 12:36:54 AM
|
DELETE |
/api/site/{site}/permissions | Removes the permissions for a site. |
Request: URL is all that is required. Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/site/master/permissions", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=338
|
3/21/2013 12:49:48 PM
|
GET |
/api/site/{site}/permissions | Fetch list of operators/roles/LDAP groups and their permissions on the specified site. |
Request: URL is all. Response: BESAPI XML Response. Example: https://lab.bigfix.me:52311/api/site/master/permissions <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <SitePermission Resource="http://lab.bigfix.me:52311/api/site/master/permission/role/35"> <Permission>Owner</Permission> <Role Resource="http://lab.bigfix.me:52311/api/role/35">35</Role> </SitePermission> <SitePermission Resource="http://lab.bigfix.me:52311/api/site/master/permission/operator/BigFixAdmin"> <Permission>Owner</Permission> <Operator Resource="http://lab.bigfix.me:52311/api/operator/BigFixAdmin">BigFixAdmin</Operator> </SitePermission> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/site/master/permissions", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=315
|
3/20/2013 6:30:37 PM
|
POST |
/api/site/{site}/permissions | Sets the permissions for a site. |
Request: BESAPI, SitePermission XML. Request Schema: BESAPI.xsd Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=157
|
3/19/2013 12:32:57 AM
|
PUT |
/api/site/{site}/permissions | Sets the permissions for a site. |
Request: SitePermission XML. Request Schema: BESAPI.xsd Response Schema: BESAPI.xsd |
|
|
Permalink: https://bigfix.me/restapi/?id=153
|
3/19/2013 12:32:16 AM
|
/api/sites
GET |
/api/sites | Fetches a list of sites. |
Description: Fetch a list of sites and their types. Request: URL is all that is required. Response: XML listing all visible sites to the authenticated operator. Example: https://lab.bigfix.me:52311/api/sites <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <ExternalSite Resource="http://lab.bigfix.me:52311/api/site/external/BES%20Support"> <Name>BES Support</Name> </ExternalSite> <OperatorSite Resource="http://lab.bigfix.me:52311/api/site/operator/BigFixAdmin"> <Name>BigFixAdmin</Name> </OperatorSite> <ActionSite Resource="http://lab.bigfix.me:52311/api/site/master"> <Name>ActionSite</Name> </ActionSite> </BESAPI> Response Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/sites", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=316
|
3/20/2013 6:31:14 PM
|
POST |
/api/sites | Creates a site. |
Description: Creates a site. Request: BES XML for the site. Request Schema: BES.xsd Response Schema: BESAPI.xsd This method will create a custom site within the infrastructure. It returns a BESAPICustomSite object. |
|
|
Permalink: https://bigfix.me/restapi/?id=350
|
4/16/2013 5:26:15 PM
|
/api/task
DELETE |
/api/task/{site}/{id} | Delete a task from the specified site. |
Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.deleteREST("https://lab.bigfix.me:52311/api/task/master/41", "username", "password"); rr.bes null rr.besapi null rr.result contains the XML string coverted from the byte array rr.byteArray contains the raw byte array returned by the server. NOTE: Deletion of a Task in a custom site seems to be broken. The API gives a successful exit code, however the task isn't deleted. Deletion of a Fixlet in a custom site works as expected. WORK-AROUND: After some testing, i've discovered if you make a minor change to the resource url... change it from .../api/task/... to .../api/fixlet/... and call the delete, it works just fine. Fixlets and Tasks are only slightly different. |
|
|
Permalink: https://bigfix.me/restapi/?id=359
|
7/29/2013 1:54:33 PM
|
GET |
/api/task/{site}/{id} | Retrieves the specified task from the specified site. |
Response: Example: https://lab.bigfix.me:52311/api/task/master/41 <?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <Task> <Title>Custom Task</Title> <Description><![CDATA[<enter a description of the task here> ]]></Description> <Relevance>true</Relevance> <Category></Category> <Source>Internal</Source> <SourceID></SourceID> <SourceReleaseDate>2013-03-19</SourceReleaseDate> <SourceSeverity></SourceSeverity> <CVENames></CVENames> <SANSID></SANSID> <MIMEField> <Name>x-fixlet-modification-time</Name> <Value>Tue, 19 Mar 2013 20:43:42 +0000</Value> </MIMEField> <Domain>BESC</Domain> <DefaultAction ID="Action1"> <Description> <PreLink>Click </PreLink> <Link>here</Link> <PostLink> to deploy this action.</PostLink> </Description> <ActionScript MIMEType="application/x-Fixlet-Windows-Shell">// Enter your action script here</ActionScript> </DefaultAction> </Task> </BES> Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/task/master/41", "username", "password"); rr.bes contains the BES object requested. rr.besapi null rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=317
|
3/20/2013 6:31:42 PM
|
POST |
/api/task/{site}/{id} | Adds a Task |
You have to send it a BES file containing a "Fixlet", but you POST to the task url. Note: on the public wiki, this action says it will Update the task... but instead it Adds it. Tracking to see if this is a bug or not with Benjamin. |
|
|
Permalink: https://bigfix.me/restapi/?id=343
|
4/16/2013 9:36:04 AM
|
PUT |
/api/task/{site}/{id} | Updates a Task |
You have to pass in a "Fixlet" object... but rest assured you'll be posting to the "task" url thus creating a task. Remember there is essentially no difference between fixlets and tasks except for a few minor differences that don't relate to the content object itself.
|
|
|
Permalink: https://bigfix.me/restapi/?id=344
|
4/16/2013 9:37:12 AM
|
GET |
/api/task/{site}/{id}/computers | Lists the relevant computers for the specified task in the specified site. |
Response: Example: https://lab.bigfix.me:52311/api/task/master/41/computers <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Computer Resource="http://lab.bigfix.me:52311/api/computer/269021"></Computer> <Computer Resource="http://lab.bigfix.me:52311/api/computer/1348423"></Computer> </BESAPI> Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/task/master/41/computers", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=318
|
3/20/2013 6:32:12 PM
|
/api/tasks
GET |
/api/tasks/{site} | Fetch list of Tasks of a particular site. |
Request: URL is all that is required Example:
Example: https://lab.bigfix.me:52311/api/tasks/master <?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <Task Resource="http://lab.bigfix.me:52311/api/task/master/41" LastModified="Tue, 19 Mar 2013 20:43:42 +0000"> <Name>Custom Task</Name> <ID>41</ID> </Task> </BESAPI> Schema: BESAPI.xsd Using my RESTAPI.cs file in C#, you can do the following: RESTResult rr = RESTAPI.getREST("https://lab.bigfix.me:52311/api/tasks/master", "username", "password"); rr.bes null rr.besapi contains BESAPI object requested. rr.result contains the XML string converted from byteArray rr.byteArray contains the raw byte array returned by the server. |
|
|
Permalink: https://bigfix.me/restapi/?id=319
|
3/20/2013 6:32:55 PM
|
POST |
/api/tasks/{site} |
Tell us what you know about this API Resource... click the pencil icon to the right.
|
|
|
Permalink: https://bigfix.me/restapi/?id=173
|
3/19/2013 12:02:09 AM
|
/api/upload
POST |
/api/upload | Upload one or more files. |
Description: Upload file(s). This can be used to upload a single file as the POST body or multiple files in a mime document. The simplest example of uploading multiple files would be the curl command: curl -k -u mo -X POST -F "file=@/temp/file.xml" -F "file=@/temp/file2.xml" "https://spiffy:52311/api/upload" Multi-file POST body example: Content-Length: 1136 Content-Type: multipart/form-data; boundary=----------------------------27beaea68af8 ------------------------------27beaea68af8 Content-Disposition: form-data; name="file"; filename="file.data" Content-Type: application/octet-stream file data goes here ------------------------------27beaea68af8-- More than one file can be included in this manner in a single post. For uploading a single file you can specify the filename in the content-disposition header and send the file as the body. Content disposition example: Content-Disposition: attachment; filename="file.xml" Response: BESAPI showing the name, url, sha1, and size of file. |
|
|
Permalink: https://bigfix.me/restapi/?id=175
|
3/19/2013 12:02:09 AM
|
NOTE: Many of the C# examples take advantage of a series of classes most converted from the official BES.xsd and BESAPI.xsd.
Click here to download my RESTAPI.cs file.
Or download the Visual Studio 2010 C# Sample application which use these classes.
Or download the PowerShell Example ps1 script which can be used to get you started.
A C# REST API Community Library has been started which incorporates many fixes not implemented in the above .cs file. This library is open source and available for free under the MIT license. Download the source or just the DLLs here: https://bitbucket.org/bigfixme/bigfix-rest-api-c-library