...
The following operations allow you to work with contact methodsfiles. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with contact methodsfiles, see Sample configuration.
Operation details
This section provides further details on the operations related to contact methodsfiles.
...
...
...
Attaching a file to an object
The attachFile
operation attaches the uploaded file to an object.
Code Block |
---|
language | xml |
---|
title | createContactMethod attachFile |
---|
|
<pagerduty<podio.createContactMethod>attachFile>
<userId><isSilent>{$ctx:userIdisSilent}</userId>isSilent>
<type><fileId>{$ctx:typefileId}</type>fileId>
<address><refId>{$ctx:addressrefId}</address>
<countryCode>{$ctx:countryCode}</countryCode>
<label>{$ctx:label}</label>
<isSendShortEmail>refId>
<refType>{$ctx:isSendShortEmailrefType}</isSendShortEmail>refType>
</pagerdutypodio.createContactMethod>attachFile> |
Properties
userId:
The unique identifier of the user.typeisSilent:
If "true", the object will not be bumped up in the stream.fileId:
The type ID of the contact method. One of the phone, SMS and e-mailfile.addressrefId:
The address of the contact depending on the typeID of the reference.countryCoderefType:
The number code for the country. Not used for e-mail. Defaults to 1. label:
The label for identifying the contact method.isSendShortEmail:
The boolean flag indicating whether to send an abbreviated e-mail message.- The reference type of the file.
Sample request
Following is a sample REST/JSON request that can be handled by the createContactMethod
attachFile
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for createContactMethod attachFile |
---|
|
{
"apiUrl" : "https://virasoftapi.pagerdutypodio.com",
"apiTokenaccessToken" : "uAB6yAsCkWxPqdCbuJqd8d416711e5974846b7f44425e37a348e",
"userIdfileId" : "PAR9SSS149738248",
"typerefId" : "phone"28900126,
"addressrefType" : "785145654task",
"countryCodeisSilent" : "94",
"label" : "My Mobile",
"isSendShortEmail" : "false"
true"
} |
Related
...
Podio Documentation
https://developerdevelopers.pagerdutypodio.com/documentationdoc/rest/users/contact_methods/createfiles/attach-file-22518
...
...
Retrieving ...
the file details
The listContactMethods
operation retrieves all contact methods for a user. getFile
operation retrieves the file details.
Code Block |
---|
language | xml |
---|
title | listContactMethods getFile |
---|
|
<pagerduty<podio.listContactMethods>getFile>
<userId><fileId>{$ctx:userIdfileId}</userId>fileId>
</pagerdutypodio.listContactMethods>getFile> |
Properties
userIdfileId:
The unique identifier ID of the userfile.
Sample request
Following is a sample REST/JSON request that can be handled by the listContactMethods
operation getFile
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for listContactMethods getFile |
---|
|
{
"apiUrl" : "https://virasoftapi.pagerdutypodio.com",
"apiTokenaccessToken" : "uAB6yAsCkWxPqdCbuJqd49806ca6128f47c59d4a8e29e84f5a6f",
"userIdfileId" : "PGT0HSD149592541"
} |
Related
...
Podio Documentation
https://developerdevelopers.pagerduty.com/documentation/rest/users/contact_methods/listpodio.com/doc/files/get-file-22451
Uploading a new file The uploadFile
operation uploads a new file.
Code Block |
---|
language | xml |
---|
title | uploadFile |
---|
|
<podio.uploadFile>
<apiUrl>{$url:apiUrl}</apiUrl>
</podio.uploadFile> |
Properties
apiUrl:
The URL to access the Podio API.
Info |
---|
|
The authorization header has to be passed by the user. |
Sample request
Following is a sample REST/JSON request that can be handled by the uploadFile
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for uploadFile |
---|
|
http://localhost:8280/services/podio_uploadFile?apiUrl=https://api.podio.com |
Related Podio Documentation
https://developers.podio.com/doc/files/upload-file-1004361
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configuration
Following is a sample proxy service that illustrates how to connect to PagerDuty Podio with the init
operation and use the createContactMethod
operation attachFile
operation. The sample request for this proxy can be found in the createContactMethodattachFile sample request. You can use this sample as a template for using other operations in this category.
Code Block |
---|
language | xml |
---|
title | Sample Proxy |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="pagerdutypodio_createContactMethodattachFile"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence onError="faultHandlerSeq">
<property name="apiUrl" expression="json-eval($.apiUrl)"/>
<property name="apiTokenaccessToken" expression="json-eval($.apiTokenaccessToken)"/>
<property name="userIdfileId" expression="json-eval($.userIdfileId)"/>
<property name="typerefType" expression="json-eval($.typerefType)"/>
<property name="addressrefId" expression="json-eval($.addressrefId)"/>
<property name="countryCodeisSilent" expression="json-eval($.countryCodeisSilent)"/>
<property name="label" expression="json-eval($.label)"/>
<property name="isSendShortEmail" expression="json-eval($.isSendShortEmail)"/>
<pagerduty.<podio.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<apiToken><accessToken>{$ctx:apiTokenaccessToken}</apiToken>accessToken>
</pagerdutypodio.init>
<pagerduty<podio.createContactMethod>attachFile>
<userId><isSilent>{$ctx:userIdisSilent}</userId>isSilent>
<type><fileId>{$ctx:typefileId}</type>fileId>
<address><refId>{$ctx:addressrefId}</address>refId>
<countryCode><refType>{$ctx:countryCoderefType}</countryCode>refType>
</podio.attachFile>
<label>{$ctx:label}</label> <respond/>
<isSendShortEmail>{$ctx:isSendShortEmail}</isSendShortEmail>inSequence>
<outSequence>
</pagerduty.createContactMethod> <send/>
<respond/> </outSequence>
</inSequence>target>
<description/>
</proxy> <outSequence> <send/> </outSequence> </target> <description/> </proxy> |