Skip to main content

resourcefiles

Creates, updates, deletes, gets or lists a resourcefiles resource.

Overview​

Nameresourcefiles
TypeResource
Idgoogle.apigee.resourcefiles

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
contentTypestringThe HTTP Content-Type header value specifying the content type of the body.
datastring (byte)The HTTP request/response body as raw binary.
extensionsarrayApplication specific response metadata. Must be set in the first response for streaming APIs.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_resourcefiles_getselectorganizationsId, environmentsId, type, nameGets the contents of a resource file. For more information about resource files, see Resource files.
organizations_environments_resourcefiles_list_environment_resourcesselectorganizationsId, environmentsId, typeLists all resource files, optionally filtering by type. For more information about resource files, see Resource files.
organizations_environments_resourcefiles_listselectorganizationsId, environmentsIdtypeLists all resource files, optionally filtering by type. For more information about resource files, see Resource files.
organizations_environments_resourcefiles_createinsertorganizationsId, environmentsIdname, typeCreates a resource file. Specify the Content-Type as application/octet-stream or multipart/form-data. For more information about resource files, see Resource files.
organizations_environments_resourcefiles_updatereplaceorganizationsId, environmentsId, type, nameUpdates a resource file. Specify the Content-Type as application/octet-stream or multipart/form-data. For more information about resource files, see Resource files.
organizations_environments_resourcefiles_deletedeleteorganizationsId, environmentsId, type, nameDeletes a resource file. For more information about resource files, see Resource files.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
environmentsIdstring
namestring
organizationsIdstring
typestring
namestring
typestring

SELECT examples​

Gets the contents of a resource file. For more information about resource files, see Resource files.

SELECT
contentType,
data,
extensions
FROM google.apigee.resourcefiles
WHERE organizationsId = '{{ organizationsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND type = '{{ type }}' -- required
AND name = '{{ name }}' -- required
;

INSERT examples​

Creates a resource file. Specify the Content-Type as application/octet-stream or multipart/form-data. For more information about resource files, see Resource files.

INSERT INTO google.apigee.resourcefiles (
data__contentType,
data__data,
data__extensions,
organizationsId,
environmentsId,
name,
type
)
SELECT
'{{ contentType }}',
'{{ data }}',
'{{ extensions }}',
'{{ organizationsId }}',
'{{ environmentsId }}',
'{{ name }}',
'{{ type }}'
RETURNING
name,
type
;

REPLACE examples​

Updates a resource file. Specify the Content-Type as application/octet-stream or multipart/form-data. For more information about resource files, see Resource files.

REPLACE google.apigee.resourcefiles
SET
data__contentType = '{{ contentType }}',
data__data = '{{ data }}',
data__extensions = '{{ extensions }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND type = '{{ type }}' --required
AND name = '{{ name }}' --required
RETURNING
name,
type;

DELETE examples​

Deletes a resource file. For more information about resource files, see Resource files.

DELETE FROM google.apigee.resourcefiles
WHERE organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND type = '{{ type }}' --required
AND name = '{{ name }}' --required
;