Difference between revisions of "REST API:applicationAccess Resource"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric m (Text replace - '{domain}' to '{{domain}}') |
||
Line 10: | Line 10: | ||
;Method:GET | ;Method:GET | ||
;URI:<tt><nowiki>https://{domain}/networking/rest/applicationAccess</nowiki></tt> | ;URI:<tt><nowiki>https://{{domain}}/networking/rest/applicationAccess</nowiki></tt> | ||
;Response: | ;Response: | ||
Line 38: | Line 38: | ||
;Method:GET | ;Method:GET | ||
;URI:<tt><nowiki>https://{domain}/networking/rest/applicationAccess/{applicationId}</nowiki></tt> | ;URI:<tt><nowiki>https://{{domain}}/networking/rest/applicationAccess/{applicationId}</nowiki></tt> | ||
;Response: | ;Response: | ||
Line 50: | Line 50: | ||
<role_id>1</role_id> | <role_id>1</role_id> | ||
<created_id type="" ... | <created_id type="" ... | ||
uri="https://{domain}/networking/rest/user/3" | uri="https://{{domain}}/networking/rest/user/3" | ||
displayValue=" System">3</created_id> | displayValue=" System">3</created_id> | ||
<modified_id type="" | <modified_id type="" | ||
uri="https://{domain}/networking/rest/user/3" | uri="https://{{domain}}/networking/rest/user/3" | ||
displayValue=" System">3</modified_id> | displayValue=" System">3</modified_id> | ||
<date_modified>2012-07-02</date_modified> | <date_modified>2012-07-02</date_modified> | ||
Line 72: | Line 72: | ||
;Method:POST | ;Method:POST | ||
;URI:<tt><nowiki>https://{domain}/networking/rest/applicationAccess</nowiki></tt> | ;URI:<tt><nowiki>https://{{domain}}/networking/rest/applicationAccess</nowiki></tt> | ||
;Request: | ;Request: | ||
Line 99: | Line 99: | ||
;Method:PUT | ;Method:PUT | ||
;URI:<tt><nowiki>https://{domain}/networking/rest/applicationAccess/{recordId}</nowiki></tt> | ;URI:<tt><nowiki>https://{{domain}}/networking/rest/applicationAccess/{recordId}</nowiki></tt> | ||
;Request: | ;Request: | ||
Line 126: | Line 126: | ||
;Method:DELETE | ;Method:DELETE | ||
;URI:<tt><nowiki>https://{domain}/networking/rest/applicationAccess/{recordId}</nowiki></tt> | ;URI:<tt><nowiki>https://{{domain}}/networking/rest/applicationAccess/{recordId}</nowiki></tt> | ||
;Response: | ;Response: | ||
Line 143: | Line 143: | ||
;Method:GET | ;Method:GET | ||
;URI:<tt><nowiki>https://{domain}/networking/rest/applicationAccess?{query_parameters}</nowiki></tt> | ;URI:<tt><nowiki>https://{{domain}}/networking/rest/applicationAccess?{query_parameters}</nowiki></tt> | ||
{{:REST API:Dynamic Search}} | {{:REST API:Dynamic Search}} | ||
Revision as of 19:18, 25 April 2014
Manage Application Access records using the REST API.
- Learn more: REST API Conventions and Considerations.
Permissions
Users that have the Access Control permission can use this resource..
Get an Application Access Record
- Method
- GET
- URI
- https://{{domain}}/networking/rest/applicationAccess/{applicationId}
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<record>
<id>8e657280c4a084857a212313e029c49</id>
<application_id>0c848119d6a343d88a3302164fb41a1b</application_id>
<reference_type>USER</reference_type>
<reference_id>1</reference_id>
<role_id>1</role_id>
<created_id type="" ...
uri="https://{yourDomain}/networking/rest/user/3"
displayValue=" System">3</created_id>
<modified_id type=""
uri="https://{yourDomain}/networking/rest/user/3"
displayValue=" System">3</modified_id>
<date_modified>2012-07-02</date_modified>
<date_created>2012-07-02</date_created>
</record>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Add an Application Access Record
- Method
- POST
- URI
- https://{{domain}}/networking/rest/applicationAccess
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<applicationAccess> ... </applicationAccess>
</platform> </syntaxhighlight>
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
<id>...</id>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Update an Application Access Record
- Method
- PUT
- URI
- https://{{domain}}/networking/rest/applicationAccess/{recordId}
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<applicationAccess> ... </applicationAccess>
</platform> </syntaxhighlight>
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Delete an Application Access Record
- Method
- DELETE
- URI
- https://{{domain}}/networking/rest/applicationAccess/{recordId}
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Dynamic Search for Application Access Records
- Method
- GET
- URI
- https://{{domain}}/networking/rest/applicationAccess?{query_parameters}
- Query Parameters
- fieldList - A comma-separated list of field names to retrieve
- The asterisk (*) wildcard specifies all fields
- {fieldname} specifies an individual field (e.g. name)
- (Use the REST API:field Resource to get a complete list of fields.)
- For a Composite Object, specify {alias}.{fieldname} to select a related-record field, where the alias is defined in the Object Relationships.
- For a Database View, specify {alias}.{fieldname}, where the object alias is defined in the Database View.
- alias.* specifies all fields in the aliased object.
- filter - Filtering criteria to filter the records
- For more examples, see Filter Expressions in REST APIs and the REST API Examples.)
- pageSize - Number of records to retrieve from the result set in order to make a "page".
- page - Number of the logical page in a database result set. The first page is page "zero" (0).
- Page zero is returned by default, so appending &pageSize=1 to your query returns a single record.
- getTotalRecordCount returns the number of total records.
Causes the following structure to be returned, where N is the total number of records:
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<status>
<packageDeploy>
...
</packageDeploy>
</status>
<message>
0
<description>Success</description>
</message>
<totalRecordCount>N</totalRecordCount>
</platform> </syntaxhighlight>
- sortBy - Field name for primary sort
Ex: &sortBy=name - sortOrder - Sort order of the primary field, either asc or desc (ascending or descending)
Ex: &sortOrder=desc - sortBy2 - Field name for secondary sort
- sortOrder2 - Sort order of the second field, either asc or desc (ascending or descending)
- sortBy - Field name for primary sort
- For more information, see: Specifying Query Parameters in REST APIs
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
....
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Fields
Name Type Attribute Description Additional Information id String This record's ID application_id String The ID of an application reference_type String The kind of entity granted access (user or team) Values: - USER or
- TEAM
reference_id String The ID of the user or team role_id String The ID of a role the user or team member can assume in the application date_modified Date Read Only UTC Format date_created Date Read Only UTC Format created_id Lookup Read Only User ID modified_id Lookup Read Only User ID
Error Codes
Platform Code with Http Status Description -7000 BAD_REQUEST (400) Invalid ID
Learn more:
- See the REST API:Error Codes for common Http error codes
- See the javadoc constants for a complete list of PlatformException error-code constants.