REST API PHP: Check the existence of single room

Y at - there a way that miss me in the api, or another way to check the existence of a single piece before calling

AFCSAccount createRoom?   I see that there is a getRoomInfo method, but that seems to apply only to the rooms which are active (well at least I get nothing for inactive rooms, I could hurt).   I see also there is a listRooms method but when I have 10,000 rooms that will be a call quite unprofitable.

So, I'm looking for a way to check if a room is available before calling createRoom.   Any advice would be appreciated.

Thank you

Eric

Currently there is no way to verify the existence of a room (in fact, it is a way, but is not exposed).

But considering that no matter what you do it will cost an HTTP request anyway, just always create the room and catch the error (the HTTP request returns a 403 error)

Tags: Adobe LiveCycle

Similar Questions

  • How to improve the custom rule by checking the existence of the role with INSERT permission?

    Hello

    following a custom rule to check the existence of some columns of audit - how can I improve this rule only to run for tables where there is a role with privileges to INSERT?

    Günter cordially

    function checkAudit (table) {}

    inserted_by = false;

    inserted_at = false;

    ruleMessage ="";

    tNom = table.getName ();

    If (tname.indexOf ('_DWH_') == - 1).

    {

    columns = table.getElements ();

    l = columns.length;

    for (var c = 0; c < l; c ++)

    {

    CNAME = columns [c] .getName ();

    If (cname == "INSERTED_AT") {inserted_at = true}

    If (cname == "INSERTED_BY") {inserted_by = true}

    }

    If (! inserted_at) ruleMessage = ruleMessage + not 'INSERTED_AT ';

    If (! inserted_by) ruleMessage = ruleMessage + not 'INSERTED_BY ';

    }

    If (ruleMessage! = "")

    Returns false;

    on the other

    Returns true;

    }

    checkAudit (table);

    Hi Gunter,

    the function to check if the column of table a insert privilege for role is less.

    It is possible insert are defined in table instead of the column - that does not check the function below.

    Philippe

    function hasColumnWithInsertForRole(table){
        sd = table.getRelationalModel().getStorageDesign();
        tp = sd.getStorageObject(table.getObjectID());
        if(tp!=null){
            roles = sd.getRoleSet().toArray();
            for(var i=0;i-1){
                    return true;
                }
            }
        }
        return false;
    }
    hasColumnWithInsertForRole(table);
    
  • There the rest APIs to retrieve the metadata for entity for eloqua objects?

    There is a list of all the objects that are accessible by the REST for CRUD in this link: REST API - Documentation for kernel objects in the objects of the core section.

    For each of the objects listed in the objects of the core section are there is a metadata field in the Properties section.

    For example, for the purpose of the e-mail message, The REST API - to access Emails , under the Properties section, there entered corresponding to the fields of the object of the emails under the
    Name, Type, Description and validation topics.

    Is there a REST API to retrieve the same information, i.e. metadata field for an object programmatically eloqua?
    Otherwise, this is a serious obstacle to building systems that are the metadata engine and support for SOAP is removed...

    The closest to what you are looking for would be endpoints of assistance for a description of the fields. Example of /api/bulk/1.0/contact/fields

    {

    "items": [{}

    'name': "E-mail address",

    "internalName": "C_EmailAddress",

    'dataType': 'emailAddress;

    'hasReadOnlyConstraint': false,

    'hasNotNullConstraint': false,

    'hasUniquenessConstraint': true,

    'Déclaration': '{{Contact.Field (C_EmailAddress)}}.

    "uri": "/ contact/field/100001",

    "converted': ' / Date (-2208970800000) /"

    'updatedAt': ' / Date (-2208970800000) / ".

    },

    {

    'name': "First name",

    "internalName": "C_FirstName",

    'dataType': "string",.

    'hasReadOnlyConstraint': false,

    'hasNotNullConstraint': false,

    'hasUniquenessConstraint': false,

    'Déclaration': '{{Contact.Field (C_FirstName)}}.

    "uri": "/ contact/field/100002."

    "converted': ' / Date (-2208970800000) /"

    "updatedBy": "MgrzzzOracleCloudSupportP01E10",

    'updatedAt': ' / Date (1408993722380) / ".

    },.....

    If so, it will also include an element "defaultValue". How many characters you can store in a field (precision) is documented here: Type of data (data and Digital Formats). The same endpoint exist in bulk 2.0, and there are variants for the account fields and Objetpersonnalise. Another exists in the REST through Api/rest/2.0/assets/contact/fields?depth=complete... It does not include the declaration of ML, but there other useful information such as the type of default update and a flag 'isAccountLinkageField '.

    Similarly, if you describe a form via SOAP or REST, it also will give you the fields and their type.

    Kind regards

    Bojan

  • Y at - it another way to check the existence of the file other than utl_file.fgetattr oracle

    Hi, I'm checking the existence of the file in pl/sql with utl_file.

    DECLARE

    Yn BOOLEAN;

    FLEN NUMBER;

    BSIZE NUMBER;

    BEGIN

    UTL_FILE.fgetattr ('RMCMIFIDDWH_OUTPUT', - directory

    'filname.txt', - filename

    Yn, - Boolean Yes or no.

    FLEN, - length of file

    BSIZE);-block size

    IF yn THEN

    dbms_output.put_line ("'File Exists");

    ON THE OTHER

    dbms_output.put_line ('file does not exist');

    END IF;

    dbms_output.put_line (' length of file: ' |) To_char (Flen));

    dbms_output.put_line (' block size: ' |) To_char (BSIZE));

    END fgetattr;

    Please help me if there is another way to do the same thing.

    There is no problem, but I was looking for a simple method to check only file existence and for this reason only I have my question here with the solution.

  • Using the REST API to delete the contact from the contacts list

    Hello world

    I am looking for some info for the creation of a request to delete a contact from a list of Contact using the REST API.   Here's what I have in Java where the contact id is 1 'and my list is 72'.     I'm open to responses in Java, c# or other languages.

    serverAddress = new URL ("https://secure.p03.eloqua.com/API/REST/1.0/assets/contact/list/72");

    establish communication stuff

    connection = null;

    Set up the initial connection

    connection = (HttpURLConnection) serverAddress.openConnection ();

    connection.setRequestMethod ("PUT");

    connection.setRequestProperty ("content-type", "json; charset=utf-8 ");"

    connection.setRequestProperty ("authorization", 'Basic BLOCKED');

    String body = '{\"membershipDeletions\":[\"1\']}";

    connection.setDoOutput (true);

    connection.getOutputStream () .write (body.getBytes ("UTF8"));

    connection.setReadTimeout (10000);

    Connection.Connect ();

    When I test with it I get a '400' HTTP response

    Thank you!

    Hi Noel,

    The following document describes the operations available for lists of contacts in the Rest API. Please note that we also have a project open source c# example illustrates the use of these endpoints.

    Repositories are all available to the public on Github. Hope this helps and please let me know if you need more information.

    Thank you

    Fred

  • Sorting of emails [REST API] [PHP]

    Hello, I am trying to sort emails by using URL parameters. I am trying to sort the messages by date of creation, or in any case that would have the most recently created e-mail first and in descending order.

    So far, I have https://secure.eloqua.com/API/REST/1.0/assets/emails?search= * SNL * & page = 1 & number = 50 & depth minimum = & spell = converted & dir = desc

    The & sort = converted & dir = desc settings seem to do absolutely nothing.

    I think that converted is a timestamp because updatedAt resembling a timestamp as well, but this is perhaps the place where it was created. Maybe even sorting by ID would be a good thing because

    I think that id autoincrements. So more the ID, the most recent of the email, but this assumption may fail in some cases. I tried & sort = id & dir = desc and which does not change the order as well.

    So what are the properties can I sort through emails? Any ideas on how to sort to have emails more recently created first and in descending order?

    I also use an instance of E9.

    Hi John,.

    You can use the following query parameters when you search Emails using the REST API:

    • GET/assets/emails? depth = {depth} & count = {number} & page = {page} & search = {search} & orderBy = {orderBy} & lastUpdatedAt = {lastUpdatedAt}

    The document following (to access emails using the REST API) described the available properties on the object of the contract. To retrieve the most recent, you can order in "updatedAt.

    I hope this helps.

    Thank you

    Fred

  • REST api call for the properties of the object in the html bridge provides resource not found (404) error.

    Hello

    I added a bridge Html summary view to our existing plugin (which is in Flex). The html page is displayed in the Summary tab with static data like images and titles. But the .gestJSON of the REST api call fails with the error ' could not load resources: the server responded with a 404 (Not Found) status.

    I followed the bridge Html sample chassisB (chassis - summary.js and html) to create the new page.

    Web.XML of the user interface of the plugin is configured to map/rest / *. bean dataAccessController is defined in the bundle context.

    Java package has the DataAccessController same class as the DataAccessController chassisB class

    This is the URL that I see in the javascript debugger and call API is a failure for this url.  There is no error in the virgo.log.

    https:// /vsphere-client/webui_ui_ns/rest/data/properties/323de5b9-4D2E-4dd7-ae32-98277dd44e90%252Fmf8k-h38?properties=name,model,version < vcenter ip >

    webui_ui_ns-client/vSphere is the value of Web-ContextPath in the plugin MANIFESTO. MF

    I spent a lot of time to understand the issue, but no luck. What I'm doing wrong here? Any help is appreciated.

    version of vCenter server appliance 6.0.0

    SDK - vSphere SDK Web 5.5.0

    1.7.0_79 64-bit JDK

    Thank you

    Deepa

    It was a configuration problem. I missed the tag in the bundle context of spring.

    After you add the 2 lines, it worked.

    Thanks for your time.

  • How to check the existence of a value in a table before copying the data?

    Experts,

    I have a requirement in which I need to copy data (4 columns) table A to table B (4 columns)

    Table A (entry)

    PART_ID PART_NAME PART_OPT_CD ENGG_OPT_CD

    1 "AAA" 10 100
    2 'BBB' 20 200
    3 'CCC' 30 300
    4 'DDD' 40 400
    5 'EEE' 50 500


    I have a table named OPTIONS with a single column. This is a table of reference of business which has the master list of option codes.

    OPT_CD
    10
    20
    30
    50
    60
    100
    200
    400
    500


    I need to copy Table A to Table B, but in doing so, I need to check the values of columns 3 and 4 in the OPTIONS array.
    If there is copy the folder B. Otherwise error in the log in a file/table and continue with the next copy

    TABLE B (exit)

    PART_ID PART_NAME PART_OPT_CD ENGG_OPT_CD

    1 "AAA" 10 100
    2 'BBB' 20 200
    5 'EEE' 50 500

    WARNING file or a table should have the details below.

    300 ENGG_OPT_CD does not exist in the table OPTIONS, so part_id 3 have not migrated
    40 PART_OPT_CD does not exist in the table OPTIONS, then part_id 4 have not migrated

    Company don't bother about the format of error, we need this information to correct the OPT_CD in the OPTIONS table.

    Can anyone suggest a better way to do this. Thank you for your help in advance

    Hello

    Its very similar to your previous post.
    Re: PL/SQL help
    The only difference being that you have to outer join to your superimposed master table, since your search in two columns values occur only in a single column on your Master table.

    Something like that;

    create table a (part_id number, part_name varchar2(10),part_opt_cd number,engg_opt_cd number);
    
    insert into a
    (select 1 Part_ID, 'AAA' Part_Name, 10 Part_Opt_CD, 100 ENGG_Opt_CD from dual union all
    select 2, 'BBB', 20, 200 from dual union all
    select 3, 'CCC', 30, 300 from dual union all
    select 4, 'DDD', 40, 400 from dual union all
    select 5, 'EEE', 50, 500 from dual union all
    select 6, 'FFF', 60, 500 from dual
    )
    /
    
    create table b (part_id number, part_name varchar2(10),part_opt_cd number,engg_opt_cd number);
    
    insert into b
    (select 1 Part_ID, 'AAA' Part_Name, 10 Part_Opt_CD, 100 ENGG_Opt_CD from dual union all
    select 2, 'BBB', 20, 200 from dual union all
    select 5, 'EEE', 50, 500 from dual
    )
    /
    
    Create table master (OPT_CD number);
    
    insert into master (
    select 10 opt_cd from dual union all
    select 20 from dual union all
    select 30 from dual union all
    select 50 from dual union all
    select 60 from dual union all
    select 100 from dual union all
    select 200 from dual union all
    select 400 from dual union all
    select 500 from dual
    )
    /
    
    create table log_msg
    (msg varchar2(100)
    ,t timestamp default current_timestamp)
    / 
    
    SQL> insert all
      2    when Master1_ID is not null and
      3         Master2_ID is not null then
      4      into b (Part_ID, Part_Name, Part_Opt_CD, ENGG_Opt_CD)
      5      values (Part_ID, Part_Name, Part_Opt_CD, ENGG_Opt_CD)
      6    when Master1_ID is null or
      7         Master2_ID is null then
      8      into log_msg (msg) values (Part_Opt_CD || ' ' || ENGG_Opt_CD || ' does not exist on the Master table')
      9  select m1.Opt_CD      as Master1_ID
     10        ,m2.Opt_CD      as master2_ID
     11        ,a.Part_ID      as Part_ID
     12        ,a.Part_Name    as Part_Name
     13        ,a.Part_Opt_CD  as Part_Opt_CD
     14        ,a.ENGG_Opt_CD  as ENGG_Opt_CD
     15  from (
     16        select a.Part_ID, a.Part_Name, a.Part_Opt_CD, a.ENGG_Opt_CD
     17        from a
     18        left outer join b on  a.Part_ID = b.Part_ID
     19        where b.Part_ID is null
     20      ) a
     21  left outer join master m1 on   a.Part_Opt_CD = m1.Opt_CD
     22  left outer join master m2 on   a.ENGG_Opt_CD = m2.Opt_CD
     23  /
    
    3 rows created.
    
    SQL> select * from log_msg;
    
    MSG                                         T
    ------------------------------------------- -------------------------
    40 400 does not exist on the Master table   05-OCT-11 09.44.17.621000
    30 300 does not exist on the Master table   05-OCT-11 09.44.17.621000
    
    SQL> select * from b;
    
       PART_ID PART_NAME  PART_OPT_CD ENGG_OPT_CD
    ---------- ---------- ----------- -----------
             1 AAA                 10         100
             2 BBB                 20         200
             5 EEE                 50         500
             6 FFF                 60         500
    

    Note, I have included an additional line in table A in order to prove that the INSERTION will occur in table B. Errors, as you can see have been inserted in the table LOG_MSG.

    Published by: bluefrog October 5, 2011 09:48

  • DRM validation to check the existence of nodes in a different hierarchy as a property value

    Hello gurus,

    I have two hierarchies, named A and B respectively. I need to create a validation for nodes in A hierarchy that checks the value of a property such that the node must have the property value equal to any node name in the hierarchy B.

    Means that the values for this particular property for the nodes in A hierarchy must exist as a node in the hierarchy B.

    It would be very grateful if someone can give an idea to achieve this.

    Hello

    Try this in a type formula validation-

    NodeInHier (PropValue (Custom.PropName), B)

    This returns false if the value of the property is not a node in the hierarchy B and True if it's.

    So, you will get a validation message whenever the property is loaded with a value that is not a node in the hierarchy of B.

    Thanks, let me know

    Denzz

  • Unable to use the REST API to start the workflow from the upgrade to vCO 6.0.0

    I upgraded my vCO 6.0.0. I am more able to GET or POST to run my workflow. When I'm browing at "https://{IP/Hostname}": 8281/vco/api/production flow ", I can not get anything more. "

    Does anyone have an idea?

    /VCO/api/and/vco/api/docs/allow unauthenticated then access /vco/api/flow/requires authentication. Maybe 'advanced rest client' or Chrome itself try to use part of the updated credentials cached (or other stuff cached).

    Could you open a new window in incognito in Chrome (Ctrl + Shift + N) and try with the URL/vco/api/flow/directly in the URL from Chrome bar (without advanced customer rest) check if the request will ask for identification and return the list of workflows?

    An alternative would be to try with a command-line, client like curl or similar.

  • FDM API to check the POV is locked or not

    Hello

    Can anyone help on how to create a script to check if the FDM POV is locked or not?
    I want to write a script that read a file of data, then go on the POV in the data file to FDM
    and check if the POV in FDM is locked or not. Any guide / tips will be useful.
    Thank you.

    The web client is not enough for relatively complicated event scripts and Custom. You must use Workbench to modify these scripts. In Workbench, an accelerator that defines exactly how to recover the lock status of POV there.

  • How to check the existence of field in a chain at the level of the header?

    Hello


    I have a bunch of fields on my_form, just for example here in this announcement I'm on U.S. State names, say for example.

    I have 3 domains, their names are as below

    1) NY,

    2) CA,

    (3) TX

    I placed a hidden his name, a text field is FGL (I mean, the gray field list), uses this GFL for my purpose of programming

    Since the back-end (in our case, its an ERP - SAP) am filling/filling this field GFL, say for example... its data looks like, CA TX (I mean, am concatenating the names of State with a separation of a space)

    (FYI... I already have some piece of JS in my_form INITIALIZATION and for certain other purposes docReady event)

    Now my requirement is as below,

     

    (1) LOOP all objects domain (here they are like state names) of my_form, then check if their name (NY) existing data of GFL... If exisitng (in our case, its not existing) pls shaded with readOnly... If not existing

    (in our case, its not existing) pass the coloring and readOnly, go to the next loop / iteration / state / field

    Actually, I can achieve my requirement by putting the JS in initialization event each object field as mmee below, (but I have about 200 fields in my_form, that's why I want to put all the field objects of my_form in one piece of code at the level of the header in a generic way in loop),

    var myStateName = / NY /;

    var returnValue = GFL.search (myStateName);

    If (returnValue! = - 1) {;} / / This state/field/object is found in the list of fields of gray, so dimmed with readOnly

    this.ui.oneOfChild.border.fill.color.value = "192,192,192."

    This.Access = "readOnly";


    };

    For certain other requirements, one of the experts provided below JS in these forums, as below

    function findNodes (vNode) {}

    If (vNode.className = 'field') {}

    If (vNode.isPropertySpecified ("name") = true) {}

    If (.search(/_U$/g) vNode.getAttribute ('name')! ==-1) {}

    / / Script to run, when a match is found

    ...

    }

    }

    }

    for (var i = 0; i < vNode.nodes.length; i += 1) {}

    findNodes (vNode.nodes.item (i));

    }

    }

    findNodes (xfa.form);

    In fact, I tried to change the JS above according to my needs, but its does not work, please provide me with the correct JS according to my requirement.

    Thank you

    Try this:

    function findNodes (vNode) {}

    If (vNode.className = 'field') {}

    If (vNode.isPropertySpecified ("name") = true) {}

    var myStateName = new RegExp (vNode.name);

    var returnValue = GFL.search (myStateName);

    If (returnValue! =-1) {}

    this.ui.oneOfChild.border.fill.color.value = "192,192,192";

    This.Access = "ReadOnly";

    }

    else {}

    this.ui.oneOfChild.border.fill.color.value="255,255,255";//whatever color is free access

    This.Access = "Open";

    }

    }

    }

    for (var a = 0;<>

    findNodes (vNode.nodes.item (a));

    }

    }

    findNodes (xfa.form);

    Kyle

  • How to check the existence of database table?

    I want to check if a certain database table exists, if so run the code / display message etc.
    not if the table contains data or not, but if it's in the database.

    Any idea?

    Thank you!

    find a way to query the system tables, assuming that you have permission to do so. The details are specific to db.

  • checking the existence of a table - MySQL

    I use MySQL and I just want to see if a table exists so that I can select data from it or if it does not exist, I want to shoot the same fields of a table I already know exists.

    Any help would be greatly appreciated.

    Thank you

    Quote:
    Posted by: Alexandre
    using MySQL


    SELECT count (*) did testValue
    FROM information_schema.tables
    WHERE table_schema = 'the_database_name. '
    AND table_name = 'your_table_name '.



    SELECT *.
    Of your_table_name



    SELECT *.
    Of other_table_name

    Thanks Alexandre! This works perfectly. I do not administer the ColdFusion server, so I hope that administrators manage security issues.

  • QUESTION: Can't create a firewall rule to (edge) with the REST API

    Dear Sir

    I am trying to create a firewall rule for simple and basic edge using the REST API.

    I use the REST API guide as a reference on page 158.


    edge-fw-rule.png

    I use the following code (single) in my client REST API (with good content Type (application/xml)):

    < rule >

    < ruleTag > < / ruleTag >

    < name > edge5-rest-rule < / name >

    all < source > < / source >

    < destination > all < / destination >

    < application > all < / application >

    < matchTranslated > true < / matchTranslated >

    < management > in < / direction >

    < action > deny < / action >

    < enabled > false < / enabled >

    < loggingEnabled > true < / loggingEnabled >

    rest-api-rule of the < description > < / description >

    < / rule >

    The error message that I receive is the following:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < error >

    request details invalid <>. Found no match for item rule. < / details >

    < > 223 errorCode < / errorCode >

    < / error >

    The full screenshot of my action REST API is in the screenshot below:

    full-request.png

    Anyone know what I'm doing wrong here?

    Thank you!

    Try this as the body...

    rest-rule

    user

    true

    in

    deny

    fake

    true

    rest-api-rule

Maybe you are looking for