Constructor
new v2_1()
- Source:
Example
import { CRESTv2_1 } from "@forgerock/crest-js";
const resource = new CRESTv2_1("http://www.example.com");
Extends
Members
(readonly) protocolVersion
- Source:
- Overrides:
CREST protocol version.
Methods
action(action, optionsopt) → {Promise.<Response>}
- Source:
- Inherited From:
- See:
Invokes an action on a resource provider.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
action |
string | Action name. | ||||||||||||||
options |
object |
<optional> |
{}
|
Options.
Properties
|
Returns:
A Promise that resolves to a Response object.
- Type
- Promise.<Response>
create(body, optionsopt) → {Promise.<Response>}
- Source:
- Inherited From:
- See:
Creates a resource.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
body |
object | Resource representation. | ||||||||||||||
options |
object |
<optional> |
{}
|
Options.
Properties
|
Returns:
A Promise that resolves to a Response object.
- Type
- Promise.<Response>
delete(id, optionsopt) → {Promise.<Response>}
- Source:
- Inherited From:
- See:
Deletes a single resource by ID.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
string | Resource ID. | ||||||||||||||
options |
object |
<optional> |
{}
|
Options.
Properties
|
Returns:
A Promise that resolves to a Response object.
- Type
- Promise.<Response>
get(id, optionsopt) → {Promise.<Response>}
- Source:
- Inherited From:
- See:
Retrieves a single resource by ID.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
string | Resource ID. | ||||||||||
options |
object |
<optional> |
{}
|
Options.
Properties
|
Returns:
A Promise that resolves to a Response object.
- Type
- Promise.<Response>
queryFilter(optionsopt) → {Promise.<Response>}
- Source:
- Inherited From:
- See:
Queries a resource collection.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Options.
Properties
|
Returns:
A Promise that resolves to a Response object.
- Type
- Promise.<Response>
update(id, body, optionsopt) → {Promise.<Response>}
- Source:
- Inherited From:
- See:
Updates a single resource by ID.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
string | Resource ID. | ||||||||||||||
body |
object | Resource representation. | ||||||||||||||
options |
object |
<optional> |
{}
|
Options.
Properties
|
Returns:
A Promise that resolves to a Response object.
- Type
- Promise.<Response>